Skip to main content

Development workflow

All development happens in this repository, in the open, for maintainers and contributors alike.

Branches​

BranchPurpose
mainThe only long-lived branch. Every release is cut from it.
topic branchesShort-lived. One change each, merged into main through a pull request.
release/x.yOnly when an older minor needs a patch after main moved on. Cut from its v<x.y.z> tag. None exist today.

Version tags (v<version>) live on main. A maintainer pushes one to publish that version.

Making a change​

  1. Branch from an up-to-date main. Maintainers branch in this repository; contributors branch in a fork.
  2. Install the hooks once: .venv/bin/pre-commit install --hook-type pre-commit --hook-type pre-push. The commit hooks run the quick checks: formatting, lint, source headers, pinned actions, the lock and a secrets scan. The push hooks run type checking, the sync/async twin check, the API snapshot and the offline tests. A push that changes only examples/ and website/ runs just the notebook and docs tests.
  3. Commit with git commit -s. See the contribution workflow for the sign-off and the AI-assistance lines.
  4. Before you open the pull request, run the full gate: .venv/bin/python -m tools.verify. The hooks are an early warning, not a replacement for it. A change limited to examples/ and website/ needs only the notebook and docs tests: .venv/bin/python -m tools.change_scope --run-tests --base origin/main.
  5. Open a pull request against main. CI runs the gate on Python 3.11 to 3.14, the newest allowed dependencies, the docs build, and the wheel on Linux, macOS and Windows. For a pull request that changes only examples/ and website/, CI runs the docs build and the notebook and docs tests instead. Every push to main runs everything.
  6. A maintainer reviews it and squash-merges it once CI is green.

Dependabot opens its weekly update pull requests the same way. They get the same review and the same checks.

Releasing​

A release is a pull request that changes the version. Once it merges, a maintainer tags the merge commit, and pushing the tag starts the release workflow. See the release runbook for the steps, including the live run whose evidence the workflow checks.