Skip to content

Latest commit

Β 

History

History
72 lines (37 loc) Β· 1.25 KB

contributing.rst

File metadata and controls

72 lines (37 loc) Β· 1.25 KB

Overview

Cawdrey uses tox to automate testing and packaging, and pre-commit to maintain code quality.

Install pre-commit with pip and install the git hook:

bash

python -m pip install pre-commit pre-commit install

Coding style

formate is used for code formatting.

It can be run manually via pre-commit:

bash

pre-commit run formate -a

Or, to run the complete autoformatting suite:

bash

pre-commit run -a

Automated tests

Tests are run with tox and pytest. To run tests for a specific Python version, such as Python 3.6:

bash

tox -e py36

To run tests for all Python versions, simply run:

bash

tox

Type Annotations

Type annotations are checked using mypy. Run mypy using tox:

bash

tox -e mypy

Build documentation locally

The documentation is powered by Sphinx. A local copy of the documentation can be built with tox:

bash

tox -e docs