Everyone that wants to contribute to the project should read this document.
You may follow these steps if you wish to create a pull request. Fork the repo and clone it on your local machine. Then in the project's directory run this if you're on macOS (requires Homebrew):
brew install python
brew install poetry # More info: https://python-poetry.org
make clean
On Ubuntu (including Windows WSL2):
sudo apt-get update && sudo apt-get install make python3-virtualenv python3
curl -sSL https://install.python-poetry.org | python3 -
make clean
Then see if you can run lints and tests:
make deps all
For medium to large changes you'll need to include tests in your pull request. This project uses pytest.
Code style must remain consistent in this project. When you're done writing your code you can use Black to automatically format Python files:
poetry run black .
Additional code style rules:
- Write docstrings for all classes, functions, methods, and modules.
- Document all function/method arguments and return values.
- Document all class variables instance variables.
- Documentation guidelines also apply to tests.
- Avoid
isinstance()
(it breaks duck typing).
If you're adding a new feature you'll need to update the Sphinx documentation for this project. Docs are located in the docs directory and can be written using reStructuredText or Markdown.
To locally build docs and view them in a browser you can run:
make docs
Then browse to: docs/_build/html/index.html
Thanks for fixing bugs or adding features to the project!