Skip to content

Commit 273f35a

Browse files
Update CONTRIBUTION.md with pdm->poetry and pytest instructions (#164)
1 parent 67ddeaa commit 273f35a

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

CONTRIBUTION.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -67,47 +67,47 @@ Contributions that align with the items detailed in our roadmap, found in the ma
6767

6868
## Development Environment
6969

70-
Adala uses [PDM](https://pdm.fming.dev/latest) to manage dependencies (both application and development) and packaging. To create an development environment, [install PDM](https://pdm.fming.dev/latest/#recommended-installation-method), navigate to the repository root and run:
70+
Adala uses [Poetry]((https://python-poetry.org/) to manage dependencies (both application and development) and packaging. To create an development environment, [install Poetry](https://python-poetry.org/docs/#installation), navigate to the repository root and run:
7171

7272
```bash
73-
pdm install --dev
73+
poetry install --with dev
7474
```
7575

76-
to specifically install Adala development only dependencies (using `pdm`'s [direct support for such](https://pdm.fming.dev/latest/usage/dependency/#add-development-only-dependencies)).
76+
to specifically install Adala development only dependencies.
7777

7878
After this, activate the environment by running
7979

8080
```bash
81-
eval $(pdm venv activate)
81+
poetry shell
8282
```
8383

8484
And run the test suite with
8585

8686
```bash
87-
pytest --cov
87+
pytest
8888
```
8989

90-
You can expand with additional test dependencies using `pdm` with
91-
90+
Adala uses [pytest-recording](https://pypi.org/project/pytest-recording/) to cache network calls in [VCR cassette files](https://vcrpy.readthedocs.io/en/latest/), so that the test suite can be run in CI and without network access. When adding tests that make network calls, such as to OpenAI, run the test suite with
9291
```bash
93-
pdm add -dG test <package-name>
92+
pytest --record_mode=once --block-network
9493
```
94+
and commit the resulting cassette `.yml` files that are generated. `--block-network` ensures that new tests do not make network calls without being marked `@pytest.mark.vcr`. To modify existing tests that make network calls, delete their cassette files before running pytest, or run only those tests with `--record_mode=rewrite`.
95+
96+
## Server
97+
98+
See the [server README](https://github.com/HumanSignal/Adala/tree/master/server) for instructions on running, developing, and testing Adala as a server rather than as a Python library. The server pytests are not run by default.
9599

96100
Happy developing, we're excited to review your contributions!
97101

98102
### Documentation
99103

100-
Interested in contributing to our docs? Wonderful! Docs are located in `./docs`. After installing dev dependecies (including `docs` group), you can build and serve docs dynamically with
104+
Interested in contributing to our docs? Wonderful! Docs are located in `./docs`. After installing dev dependecies, you can build and serve docs dynamically with
101105

102106
```bash
103107
mkdocs serve -f ./docs/mkdocs.yml
104108
```
105109

106-
All doc dependencies are managed by `pdm`, and similar to test development dependenices, can be expanded upon with
107-
108-
```bash
109-
pdm add -dG doc <package-name>
110-
```
110+
All doc dependencies are managed by `poetry` as part of development dependencies.
111111

112112
## Code of Conduct
113113

0 commit comments

Comments
 (0)