parent
86e86e2bde
commit
ef1df886b1
@ -0,0 +1,23 @@
|
|||||||
|
# Development
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
Clone the repo locally, and create a Python virtual env (recommend using [pew](https://github.com/berdario/pew)):
|
||||||
|
```bash
|
||||||
|
pew new preserve
|
||||||
|
```
|
||||||
|
|
||||||
|
Inside the repo (beside `setup.py`) and inside the virtual env, install as an editable python package, using the `dev` extras with:
|
||||||
|
```bash
|
||||||
|
pip install -e ./[dev]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
### During development
|
||||||
|
Run `pytest` within venv to run test suite and flake8 (linting+style) checks.
|
||||||
|
|
||||||
|
To get a coverage report, run `pytest --cov preserve`. Run `coverage html` afterward or `pytest --cov preserve --cov-report html` to generate a html report with line-specific coverage data.
|
||||||
|
|
||||||
|
Assuming `pew` was used for the venv, running `pew wipeenv` will uninstall all packages to allow the pip install to be run from scratch.
|
||||||
|
|
||||||
|
### Before release
|
||||||
|
Run `tox` within venv to check the tests for all supported python versions, and check package installation all works. Use `tox -r` to force recreation of every environment.
|
||||||
Loading…
Reference in new issue