You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

969 B

Development

Setup

Clone the repo locally, and create a Python virtual env (recommend using pew):

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:

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.