-
Install pre-commit and setup pre-commit hooks.
pre-commit install -
Install Nox.
pip install nox
Code should be formatted with Black. Imports should be sorted with isort.
To format code and sort imports, use nox -rs format.
Docstrings should conform to PEP 257.
To check for conformance using pydocstyle, use nox -rs pydocstyle.
Pylint can catch some types of errors without running a pipeline.
To run Pylint, use nox -rs lint
To run tests, use nox -rs test
Use pytest to run tests.
To build documentation with Sphinx, use nox -rs build_docs.
reStructuredText references:
To view documentation (after building it), use nox -rs serve_docs and open http://localhost:8000 in a web browser.
List dependencies in the install_requires section of setup.cfg.
For development dependencies, list direct dependencies in requirements.dev.in and use pip-compile to generate requirements.dev.txt (nox -rs pip_compile -- requirements.dev.in).