Skip to content

Latest commit

 

History

History
77 lines (45 loc) · 1.96 KB

CONTRIBUTING.rst

File metadata and controls

77 lines (45 loc) · 1.96 KB

Contributing Guidelines

Building the Documentation

To build library documentation, you need to install Graphviz and the documentation dependencies.

pip install -r docs/requirements.txt

Note

Installing graphviz differs depending on your platform.

Linux users can simply,

sudo apt-get install graphviz

Windows users will have to install the binaries from the official Graphviz downloads. Just be sure that the installed bin folder is added to your environment's PATH variable.

Finally, build the documentation with Sphinx:

sphinx-build -E -W docs docs/_build/html

The rendered HTML files should now be located in the docs/_build/html folder. Point your internet browser to this path and check the changes have been rendered properly.

Linting the source code

This library uses pre-commit for some linting tools like

To use pre-commit, you must install it and create the cached environments that it needs.

pip install pre-commit
pre-commit install

Now, every time you commit something it will run pre-commit on the changed files. You can also run pre-commit on staged files:

pre-commit run

Testing the source code

Code coverage/testing is done with pytest and coverage libraries. Install these tools (and this library's dependencies) with:

pip install -r test/requirements.txt -r requirements.txt

Run the tests and collect the code coverage with:

coverage run -m pytest