Contributing
You want to contribute? Great!
Below you will find instructions how to setup environment, launch tests, build docs etc.
Setup environment
Before you start install [pyenv]https://github.com/pyenv/pyenv) if you haven't yet - it is tool for managing python versions.
- Clone repo.
-
Install appropriate python versions supported by this repository by
pyenv:$ pyenv install 3.8.0 && pyenv install 3.7.5 && pyenv install 3.6.9 -
Make
pyenvautomatically use those versions - it will use first version and fallback to next ones when there is need (what will be used when launchingtox):$ pyenv local 3.8.0 3.7.5 3.6.9 -
Install poetry - tool for dependency managing, building and deploying packages:
$ pip install poetry -
Make poetry install all needed packages (from
pyproject.toml) and create virtualenv for you:$ poetry install -
Go inside virtualenv created by
poetry:$ poetry shellNote
If you will exit shell and open it afresh make sure to execute this command again - otherwise installed python packages probably won't be available.
-
poetryhave already installed pre-commit for you - we use it to run various formatters automatically on every commit. To turn on (install)pre-commitin this repository type:$ pre-commit install
Running tests
You can run tests either against you actual python version - faster version (good for fast checking if our changes didn't break anything):
$ pytest tests
or run them against all supported python versions using tox - slower version (good for final check if everything we've done works):
$ tox
Building and running docs
To build and live-preview docs use following mkdocs command:
$ mkdocs serve
and then paste link outputted by this command to web browser.