Thanks for your interest in improving torchquad! The full guide lives in the contributing documentation; this file is the quick reference GitHub shows when you open a pull request.
torchquad uses a two-branch model:
develop— the integration branch. All feature and fix PRs targetdevelop.main— release branch. It only ever receives releases (via adevelop→mainmerge) and the occasional documentation hotfix for the currently released version.
So, unless you are fixing docs for the current release, branch off develop
and open your PR against develop. Releases are cut by merging develop into
main, tagging, and publishing; main therefore stays a subset of develop.
Fork and clone the repo, then set up an editable install with all backends and the dev tooling. Either uv or conda works:
# uv (fast, CPU wheels)
uv pip install -e ".[dev,all]"
# or conda (installs every backend, CPU)
conda env create -f environment_all_backends.yml
conda activate torchquad
pip install -e ".[dev]"See the installation docs for GPU builds and per-backend options.
CI enforces formatting, linting, docstrings, dead-code, and the full test suite.
Run these locally first (see CLAUDE.md / the CI docs for the full list):
ruff format .
ruff check .
pydoclint torchquad/
cd tests/ && pytestOr install the hooks once with pre-commit install so they run automatically.
PRs are reviewed against REVIEW.md (correctness-first, backend-agnostic,
vectorize-or-fail, fail-hard). Skimming it before you open a PR helps your
change land faster.