Process of Contributing Code to Quantarhei#
Thank you for considering a contribution to Quantarhei. The process is straightforward:
Open an issue on the issue tracker describing the bug or feature. For non-trivial changes, discuss the approach with the maintainer before writing code.
Fork and branch — see Using the GitHub Repository for the mechanics. Work on a dedicated branch, never on
master.Write tests first — every change must come with tests. See How to Write Tests for Quantarhei for guidance on unit tests, doctests, and acceptance tests.
Keep changes focused — one logical change per pull request. Large changes are hard to review and slow to merge.
Pass CI — your PR must pass the full CI pipeline (lint, format, type check, unit tests on Python 3.10/3.11/3.12) before it can be merged.
Commit message format — every commit must start with the GitHub issue number:
#123 fix: correct energy calculation in aggregateOpen a draft PR early — you can open a draft pull request before the work is finished to get early feedback.
Code Style#
Quantarhei uses ruff for linting and formatting. Run before committing:
$ ruff check quantarhei/ --fix
$ ruff format quantarhei/
Type annotations are encouraged for new code. mypy is run in CI:
$ mypy quantarhei/