DSPy: The framework for programming—not prompting—language models
Python
Add docs to readme and contrib.md, del requirements.txt, disable precommit
Isaac Miller7912b48a6c4d
diff --git a/.github/workflows/precommits_check.yml b/.github/workflows/precommits_check.ymlindex 52c59da6d..7ac80deda 100644--- a/.github/workflows/precommits_check.yml+++ b/.github/workflows/precommits_check.yml@@ -1,13 +1,6 @@name: Pre-commit checkson:- pull_request:- branches:- - dev- - main- types:- - opened- - edited- - synchronize+ workflow_dispatch:jobs:pre-commit-checks:diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 7ecf622c3..65c3c9f18 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -4,54 +4,36 @@### Bounty Board-The bounty board will have various features, issues, and requests that are up for grabs.+The bounty board will have various features, issues, and requests that are up for grabs. We are still working on this. Come to the discord and ask for the current bounties.See the spreadsheet [here](https://docs.google.com/spreadsheets/d/1psHSfFXENAxhQTd5veKRzKydVubD2Ov62aKQHiYC-CQ/edit?usp=sharing) for the current bounties.-## Setting-up-### Create new environment--```bash-conda create --name dspy python=3.11-```+To run the tests, you need to first clone the repository.-or+Then install the package through poetry:+Note - You may need to install poetry. See [here](https://python-poetry.org/docs/#installing-with-the-official-installer)```bash-python3 -m venv dspy+poetry install --with test```-## Pre-commit hook--Before using pre-commit hook you need to install it in your python environment.--```bash-conda install -c conda-forge pre-commit-```+## Testing-go to the root folder and then activate it as follows (it will first download all required dependencies):+To run the all tests, or a specific test suite, use the following commands:```bash-pre-commit install-```--> Pre-commit hooks will attempt to fix all your files and so you will need to (add + commit) them once the fixes are done !--### Optional--Generally the pre-commit will run automatically before each of your commit,-but you can also manually trigger it, as follows:--```bash-pre-commit run --all-files+poetry run pytest+poetry run pytest tests/PATH_TO_TEST_SUITE```## Commit Message formatCommit message format must be respected, with the following regex:+This ends up looking like feature(dspy): added new feature+```^(break|build|ci|docs|feat|fix|perf|refactor|style|test|ops|hotfix|release|maint|init|enh|revert)\([a-z,A-Z,0-9,\-,\_,\/,:]+\)(:)\s{1}([\w\s]+)```diff --git a/README.md b/README.mdindex 26cce3b1b..489eb952d 100644--- a/README.md+++ b/README.md@@ -326,8 +326,27 @@ This is very useful in many settings, but it's generally focused on low-level, sIn contrast, **DSPy** automatically optimizes the prompts in your programs to align them with various task needs, which may also include producing valid structured ouputs. That said, we are considering allowing **Signatures** in **DSPy** to express regex-like constraints that are implemented by these libraries.</details>+## Testing+To run the tests, you need to first clone the repository.+Then install the package through poetry:+Note - You may need to++```bash+poetry install --with test+```++Then run the all tests, or a specific test suite, with the following commands:++```bash+poetry run pytest+poetry run pytest tests/PATH_TO_TEST_SUITE+```++## Contribution Quickstart++See [CONTRIBUTING.md](CONTRIBUTING.md) for a quickstart guide to contributing to DSPy.## Contributors & Acknowledgementsdiff --git a/requirements.txt b/requirements.txtdeleted file mode 100644index 8dc43dd62..000000000--- a/requirements.txt+++ /dev/null@@ -1,10 +0,0 @@-backoff-joblib<=1.3.2-openai<=0.28.1-pandas-regex-ujson-tqdm-datasets-requests-optuna