Contributing
April 19, 2025 ยท View on GitHub
Before the first commit:
pip install -e .[dev,scripts]
pre-commit install
pre-commit run --all-files
Run pre-commit after staging, and before committing. Make sure all the tests pass (By running pytest). Note that the pytest hook of pre-commit only runs the tests in the testing/ folder. To run all the tests, which take longer, run pytest manually.
The codebase uses:
blackformatter for code styleflake8for lintingpyrightfor static type checking
The pre-commit hooks ensure code quality and type safety across the project. The pyright configuration includes all project directories including tutorials/examples and testing.
Recommended Editor Setup (VS Code / Cursor)
For the best development experience, we recommend using VS Code or Cursor with the following extensions:
- Python: Core Python support.
- Black Formatter: Integrates the
blackcode formatter. - isort: Integrates the
isortimport sorter. - Pyright: Provides static type checking.
Important: This project uses pyright for static type checking. To ensure consistency with the pre-commit hooks and avoid conflicting diagnostics, please install the Pyright extension and disable the Pylance extension in your VS Code/Cursor workspace settings.
Making Documentation Changes Locally
To make the docs locally:
cd docs
make html
open build/html/index.html