Set up a virtual environment - venv is recommended - and install the dev dependencies.
python -m venv .venv
source .venv/bin/activate
pip install ./dev-requirements[all]
Install the following extensions:
.vscode/settings.json
{
"editor.formatOnSave": true,
"python.defaultInterpreterPath": ".venv/bin/python",
"python.formatting.provider": "black",
"[python]": {
"editor.codeActionsOnSave": {
"source.fixAll": true
}
}
}
¯\_(ツ)_/¯
CI is run using nox
. Before creating a PR make sure all default pipelines have passed.
Nox must be downloaded with pip install nox
.
You can run all default pipelines with just nox
or specific ones with nox -s foo bar
. To see all available pipelines run nox -l
.
If you have a slow connection use nox --no-install
to skip installing dependencies.
Formatting is done by black and is checked by ruff. The project loosely follows pep8, but anything that is not covered by black or ruff is up to the developer.
Refer to pyright's type-completness guidelines and standard typing library's type-completness guidelines to see how to properly type your code.