Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Docs #272

Closed
wants to merge 109 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
4fee372
Create sweep.yaml
sweep-ai[bot] Dec 20, 2023
15375b2
Create sweep template
sweep-ai[bot] Dec 20, 2023
8d56c7c
Merge pull request #1 from darinkishore/sweep/add-sweep-config
darinkishore Dec 20, 2023
deaba87
Update sweep.yaml
darinkishore Dec 20, 2023
5da350b
Update sweep.yaml
darinkishore Dec 20, 2023
bf1169e
feat: Added conf.py for Sphinx documentation confi
sweep-ai[bot] Dec 20, 2023
011593c
feat: Create index.rst for documentation
sweep-ai[bot] Dec 20, 2023
5a06559
feat: Add .readthedocs.yaml configuration file for
sweep-ai[bot] Dec 20, 2023
faeb6dc
feat: Updated dspy/primitives/module.py
sweep-ai[bot] Dec 20, 2023
c54a118
feat: Updated dspy/primitives/assertions.py
sweep-ai[bot] Dec 20, 2023
526e993
feat: Updated dspy/primitives/box.py
sweep-ai[bot] Dec 20, 2023
735516c
feat: Updated dspy/primitives/example.py
sweep-ai[bot] Dec 20, 2023
62d69ad
feat: Updated dspy/primitives/prediction.py
sweep-ai[bot] Dec 20, 2023
8b7b1b2
feat: Updated dspy/primitives/program.py
sweep-ai[bot] Dec 20, 2023
9552a01
feat: Updated dspy/primitives/python_interpreter.p
sweep-ai[bot] Dec 20, 2023
479c73d
Delete failing sweep.yaml
sweep-ai[bot] Dec 20, 2023
1da26f4
Update sweep.yaml
darinkishore Dec 20, 2023
a9591d4
first commit
darinkishore Dec 20, 2023
3817d12
Merge pull request #4 from darinkishore/sweep/set_up_project_for_read…
darinkishore Dec 20, 2023
e765bf2
Update .readthedocs.yaml
darinkishore Dec 20, 2023
c733b0f
commit_msg
darinkishore Dec 20, 2023
46d3cc4
feat: Updated docs/modules.md
sweep-ai[bot] Dec 20, 2023
7ded89d
commit_msg
darinkishore Dec 20, 2023
f7a6d17
Merge main into sweep/update-docs
sweep-ai[bot] Dec 20, 2023
9360135
No changes detected.
darinkishore Dec 20, 2023
64b874e
Merge main into sweep/update-docs
sweep-ai[bot] Dec 20, 2023
108e140
No changes detected.
darinkishore Dec 20, 2023
b1601d6
Merge main into sweep/update-docs
sweep-ai[bot] Dec 20, 2023
d0a3735
No changes detected.
darinkishore Dec 20, 2023
1250e38
Merge main into sweep/update-docs
sweep-ai[bot] Dec 20, 2023
4f9c502
No changes detected.
darinkishore Dec 20, 2023
c6f5b3e
Merge main into sweep/update-docs
sweep-ai[bot] Dec 20, 2023
4a48c9c
No changes detected.
darinkishore Dec 20, 2023
d502b97
Merge main into sweep/update-docs
sweep-ai[bot] Dec 20, 2023
f7e1e9d
No changes detected.
darinkishore Dec 20, 2023
bf5dbdd
Merge main into sweep/update-docs
sweep-ai[bot] Dec 20, 2023
6a14181
Merge pull request #6 from darinkishore/sweep/update-docs
darinkishore Dec 20, 2023
5c7fee7
feat: Updated docs/conf.py
sweep-ai[bot] Dec 20, 2023
406cacf
feat: Updated docs/index.rst
sweep-ai[bot] Dec 20, 2023
d40f4f8
Merge pull request #11 from darinkishore/sweep/set_up_readthedocs_doc…
darinkishore Dec 20, 2023
48d0e9b
feat: Updated docs/modules.md
sweep-ai[bot] Dec 20, 2023
b4688a0
Refactor documentation structure
darinkishore Dec 21, 2023
480e8da
Merge main into sweep/issue-removal-duplicate-code
sweep-ai[bot] Dec 21, 2023
873fea3
Added .readthedocs.yaml configuration file.
darinkishore Dec 21, 2023
adbdca5
Update .gitignore
darinkishore Dec 21, 2023
7c3afe0
Merge main into sweep/issue-removal-duplicate-code
sweep-ai[bot] Dec 21, 2023
7df2cf3
Update sweep.yaml
darinkishore Dec 21, 2023
9697869
Merge main into sweep/issue-removal-duplicate-code
sweep-ai[bot] Dec 21, 2023
0f8111e
aider: Set the root path of the project to the correct directory for …
darinkishore Dec 21, 2023
2b3c0ce
Update index.rst
darinkishore Dec 21, 2023
dfdc664
Update index.rst
darinkishore Dec 21, 2023
ac10079
Merge remote-tracking branch 'origin/main'
darinkishore Dec 21, 2023
2081c14
Merge main into sweep/issue-removal-duplicate-code
sweep-ai[bot] Dec 21, 2023
dac7427
Merge pull request #15 from darinkishore/sweep/issue-removal-duplicat…
darinkishore Dec 21, 2023
796d88a
Add rst version of docs
darinkishore Dec 21, 2023
adab66a
Update README.md
darinkishore Dec 21, 2023
1aba982
Replace Create React App documentation with DSPy framework introducti…
darinkishore Dec 21, 2023
e3c5950
Merge remote-tracking branch 'origin/main'
darinkishore Dec 21, 2023
13cf3d8
feat: Updated docs/source/index.rst
sweep-ai[bot] Dec 21, 2023
230e01c
Merge pull request #27 from darinkishore/sweep/refactor_indexrst_to_d…
darinkishore Dec 21, 2023
232b421
Update documentation and tutorial notebook with examples
darinkishore Dec 21, 2023
a18ce01
feat: Updated docs/README.rst
sweep-ai[bot] Dec 21, 2023
982498c
Merge pull request #30 from darinkishore/sweep/revise_docsreadmerst_f…
darinkishore Dec 21, 2023
f2f9050
Remove detailed content from index.rst in docs/source.
darinkishore Dec 21, 2023
22fc826
Merge remote-tracking branch 'origin/main'
darinkishore Dec 21, 2023
f08893d
feat: Updated docs/source/index.rst
sweep-ai[bot] Dec 21, 2023
528191b
Merge pull request #35 from darinkishore/sweep/restore-index-content_1
darinkishore Dec 21, 2023
642efe5
feat(docs): add initial documentation files and structure
darinkishore Dec 22, 2023
fd2a94e
feat: Updated docs/DOCS_README.md
sweep-ai[bot] Dec 22, 2023
6aa6f03
feat: Updated docs/conf.py
sweep-ai[bot] Dec 22, 2023
247309e
feat: Updated docs/index.rst
sweep-ai[bot] Dec 22, 2023
68d98be
Merge pull request #38 from darinkishore/sweep/update_cloned_document…
darinkishore Dec 22, 2023
fd54518
docs is getting done!
darinkishore Dec 22, 2023
c7a522a
chore(.readthedocs.yaml): update Sphinx configuration path from "docs…
darinkishore Dec 22, 2023
8ee1fbc
docs: Add documentation for DSPy signatures
sweep-ai[bot] Dec 22, 2023
345885f
feat: Updated docs/modules/modules.md
sweep-ai[bot] Dec 22, 2023
645444c
docs: Add documentation for Assertions in dspy/ass
sweep-ai[bot] Dec 22, 2023
c539479
Merge pull request #55 from darinkishore/sweep/add_documentation_for_…
darinkishore Dec 22, 2023
d625b58
Merge main into sweep/ensure_signatures_in_the_dspy_folder_has
sweep-ai[bot] Dec 22, 2023
2be7cfa
Merge pull request #54 from darinkishore/sweep/ensure_signatures_in_t…
darinkishore Dec 22, 2023
94d03ce
Update sweep.yaml
darinkishore Dec 22, 2023
135dc58
Update sweep.yaml
darinkishore Dec 22, 2023
1f1e8d4
Update sweep.yaml
darinkishore Dec 22, 2023
8a65953
Update sweep.yaml
darinkishore Dec 22, 2023
2edbec9
docs is getting done!
darinkishore Dec 22, 2023
942bc83
Update sweep.yaml
darinkishore Dec 23, 2023
864695e
Update sweep.yaml
darinkishore Dec 23, 2023
3332b6a
Create sweep.yaml
darinkishore Dec 23, 2023
bd7a12d
Update sweep.yaml
darinkishore Dec 23, 2023
46e1936
Update sweep.yaml
darinkishore Dec 23, 2023
4b3f914
Update sweep.yaml
darinkishore Dec 23, 2023
3d936d7
Remove Algolia CSS and update documentation structure
darinkishore Jan 6, 2024
48537ca
Update DOCS_README.md with instructions for live-reloading server for…
darinkishore Jan 6, 2024
20b3226
Remove redundant README file
darinkishore Jan 6, 2024
77ed808
Refactor documentation structure and update file locations
darinkishore Jan 6, 2024
098f3da
Merge branch 'main' into dev
darinkishore Jan 6, 2024
29c807e
Update documentation structure and remove redundant README
darinkishore Jan 6, 2024
c2f9d64
Merge remote-tracking branch 'origin/dev' into dev
darinkishore Jan 6, 2024
89a5a8d
feat(assertions.ipynb): add guide for DSPy Assertions
darinkishore Jan 6, 2024
b6b3939
feat(docs): update index.rst to remove language model clients and add…
darinkishore Jan 7, 2024
e4d2097
Remove redundant API reference documents from language models.
darinkishore Jan 7, 2024
50ce9b4
addded bunch of stuff
darinkishore Jan 7, 2024
27d577b
docs(conf.py): comment out hoverxref.extension to disable hover featu…
darinkishore Jan 7, 2024
40e6bb8
merge
darinkishore Jan 7, 2024
9e9b71a
Remove multiple language model guide files
darinkishore Jan 7, 2024
dcc65e2
docs(api_reference/modules): update module names and headers to match…
darinkishore Jan 7, 2024
336efcb
Merge branch 'main' into dev
darinkishore Jan 12, 2024
97b7e2b
Create pyproject.toml
darinkishore Jan 12, 2024
b192794
Merge branch 'main' into dev
darinkishore Jan 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/sweep-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Sweep Issue
title: 'Sweep: '
description: For small bugs, features, refactors, and tests to be handled by Sweep, an AI-powered junior developer.
labels: sweep
body:
- type: textarea
id: description
attributes:
label: Details
description: Tell Sweep where and what to edit and provide enough context for a new developer to the codebase
placeholder: |
Unit Tests: Write unit tests for <FILE>. Test each function in the file. Make sure to test edge cases.
Bugs: The bug might be in <FILE>. Here are the logs: ...
Features: the new endpoint should use the ... class from <FILE> because it contains ... logic.
Refactors: We are migrating this function to ... version because ...
3 changes: 1 addition & 2 deletions .github/workflows/build_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,4 @@ jobs:
- name: Test import dsp
shell: bash
working-directory: ${{ vars.RUNNER_TEMP }}
run: python -c "import dsp"

run: python -c "import dsp"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
/logs/
/docs/downloads/
/docs/experiments/
/docs/doctrees/
/docs/html/
/docs/_build/
docs/_static/

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
14 changes: 14 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2

build:
os: "ubuntu-22.04"
tools:
python: "3.9"

python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
sphinx:
configuration: docs/conf.py
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
GIT_ROOT ?= $(shell git rev-parse --show-toplevel)

help: ## Show all Makefile targets.
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[33m%-30s\033[0m %s\n", $$1, $$2}'

test: ## Run tests via pytest.
pytest tests

watch-docs: ## Build and watch documentation.
sphinx-autobuild docs/ docs/_build/html --open-browser --watch $(GIT_ROOT)/dspy/
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
current docs link: https://dspy-ai.readthedocs.io/en/latest/

<p align="center">
<img align="center" src="docs/images/DSPy8.png" width="460px" />
</p>
Expand Down Expand Up @@ -27,7 +29,7 @@ The **DSPy compiler** _bootstraps_ prompts and finetunes from minimal data **wit
For complex tasks, **DSPy** can routinely teach powerful models like `GPT-3.5` and local models like `T5-base` or `Llama2-13b` to be much more reliable at tasks. **DSPy** will compile the _same program_ into different few-shot prompts and/or finetunes for each LM.


If you want to see **DSPy** in action, **[open our intro tutorial notebook](intro.ipynb)**.
If you want to see **DSPy** in action, **[open our intro tutorial notebook](docs/getting_started/beginner/intro.ipynb)**.


### Table of Contents
Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
api
53 changes: 53 additions & 0 deletions docs/DOCS_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Documentation Guide

## A guide for docs contributors

The `docs` directory contains the sphinx source text for DSPy docs, visit
https://dspy.readthedocs.io/ to read the full documentation.

This guide is made for anyone who's interested in running DSPy documentation locally,
making changes to it and make contributions. DSPy is made by the thriving community
behind it, and you're always welcome to make contributions to the project and the
documentation.

## Build Docs

If you haven't already, clone the DSPy Github repo to a local directory:

```bash
git clone https://github.com/[DSPY_REPO_PATH].git && cd DSPy
```

Install all dependencies required for building docs (mainly `sphinx` and its extension):

- [Install poetry](https://python-poetry.org/docs/#installation) - this will help you manage package dependencies
- `poetry shell` - this command creates a virtual environment, which keeps installed packages contained to this project
- `poetry install --with docs` - this will install all dependencies needed for building docs


#### Watch Docs

Just run the following command from DSPy project's root directory:
```bash
make watch-docs
```

This will start a live-reloading server, which rebuilds the documentation and refreshes any open pages automatically when
changes are saved. Open your browser to http://0.0.0.0:8000/ to view the generated docs.

#### Build Docs Manually

```bash
cd docs
make html
```

The docs HTML files are now generated under `docs/_build/html` directory, you can preview
it locally with the following command:

```bash
python -m http.server 8000 -d _build/html
```

And open your browser at http://0.0.0.0:8000/ to view the generated docs.

20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -j 8
Loading
Loading