Skip to content

Commit 7912b48

Browse files
committed
Add docs to readme and contrib.md, del requirements.txt, disable precommit
1 parent 2dbf8ca commit 7912b48

File tree

4 files changed

+31
-47
lines changed

4 files changed

+31
-47
lines changed

.github/workflows/precommits_check.yml

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
name: Pre-commit checks
22
on:
3-
pull_request:
4-
branches:
5-
- dev
6-
- main
7-
types:
8-
- opened
9-
- edited
10-
- synchronize
3+
workflow_dispatch:
114

125
jobs:
136
pre-commit-checks:

CONTRIBUTING.md

+11-29
Original file line numberDiff line numberDiff line change
@@ -4,54 +4,36 @@
44

55
### Bounty Board
66

7-
The bounty board will have various features, issues, and requests that are up for grabs.
7+
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.
88

99
See the spreadsheet [here](https://docs.google.com/spreadsheets/d/1psHSfFXENAxhQTd5veKRzKydVubD2Ov62aKQHiYC-CQ/edit?usp=sharing) for the current bounties.
1010

11-
1211
## Setting-up
1312

14-
### Create new environment
15-
16-
```bash
17-
conda create --name dspy python=3.11
18-
```
13+
To run the tests, you need to first clone the repository.
1914

20-
or
15+
Then install the package through poetry:
16+
Note - You may need to install poetry. See [here](https://python-poetry.org/docs/#installing-with-the-official-installer)
2117

2218
```bash
23-
python3 -m venv dspy
19+
poetry install --with test
2420
```
2521

26-
## Pre-commit hook
27-
28-
Before using pre-commit hook you need to install it in your python environment.
29-
30-
```bash
31-
conda install -c conda-forge pre-commit
32-
```
22+
## Testing
3323

34-
go to the root folder and then activate it as follows (it will first download all required dependencies):
24+
To run the all tests, or a specific test suite, use the following commands:
3525

3626
```bash
37-
pre-commit install
38-
```
39-
40-
> Pre-commit hooks will attempt to fix all your files and so you will need to (add + commit) them once the fixes are done !
41-
42-
### Optional
43-
44-
Generally the pre-commit will run automatically before each of your commit,
45-
but you can also manually trigger it, as follows:
46-
47-
```bash
48-
pre-commit run --all-files
27+
poetry run pytest
28+
poetry run pytest tests/PATH_TO_TEST_SUITE
4929
```
5030

5131
## Commit Message format
5232

5333
Commit message format must be respected, with the following regex:
5434

35+
This ends up looking like feature(dspy): added new feature
36+
5537
```
5638
^(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]+)
5739
```

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,27 @@ This is very useful in many settings, but it's generally focused on low-level, s
326326
In 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.
327327
</details>
328328

329+
## Testing
329330

331+
To run the tests, you need to first clone the repository.
330332

333+
Then install the package through poetry:
334+
Note - You may need to
335+
336+
```bash
337+
poetry install --with test
338+
```
339+
340+
Then run the all tests, or a specific test suite, with the following commands:
341+
342+
```bash
343+
poetry run pytest
344+
poetry run pytest tests/PATH_TO_TEST_SUITE
345+
```
346+
347+
## Contribution Quickstart
348+
349+
See [CONTRIBUTING.md](CONTRIBUTING.md) for a quickstart guide to contributing to DSPy.
331350

332351
## Contributors & Acknowledgements
333352

requirements.txt

-10
This file was deleted.

0 commit comments

Comments
 (0)