Skip to content

Commit d827a52

Browse files
committed
Add dev setup and testing section to CONTRIBUTING.md
1 parent 6f4f3dd commit d827a52

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

CONTRIBUTING.md

+42
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,45 @@ Please be aware of the following things when filing bug reports:
5555
If you do not provide all of these things, it will take us much longer to
5656
fix your problem. If we ask you to clarify these and you never respond, we
5757
will close your issue without fixing it.
58+
59+
## Development Setup
60+
61+
To get your development environment setup, run:
62+
63+
```sh
64+
pip install -e .
65+
pipenv install --dev
66+
```
67+
68+
This will install the repo version of Pipenv and then install the development
69+
dependencies. Once that has completed, you can start developing.
70+
71+
The repo version of Pipenv must be installed over other global versions to
72+
resolve conflicts with the `pipenv` folder being implicitly added to `sys.path`.
73+
See pypa/pipenv#2557 for more details.
74+
75+
### Testing
76+
77+
Tests are written in `pytest` style and can be run very simply:
78+
79+
```sh
80+
pytest
81+
```
82+
83+
This will run all Pipenv tests, which can take awhile. To run a subset of the
84+
tests, the standard pytest filters are available, such as:
85+
86+
- provide a directory or file: `pytest tests/unit` or `pytest tests/unit/test_cmdparse.py`
87+
- provide a keyword expression: `pytest -k test_lock_editable_vcs_without_install`
88+
- provide a nodeid: `pytest tests/unit/test_cmdparse.py::test_parse`
89+
- provide a test marker: `pytest -m lock`
90+
91+
#### Package Index
92+
93+
To speed up testing, tests that rely on a package index for locking and
94+
installing use a local server that contains vendored packages in the
95+
`tests/pypi` directory. Each vendored package should have it's own folder
96+
containing the necessary releases. When adding a release for a package, it is
97+
easiest to use either the `.tar.gz` or universal wheels (ex: `py2.py3-none`). If
98+
a `.tar.gz` or universal wheel is not available, add wheels for all available
99+
architectures and platforms.

0 commit comments

Comments
 (0)