CORNETO uses public main as its trunk. Every public change reaches it through a
pull request, and an annotated Git tag is the single source of truth for a
release version. Poetry Dynamic Versioning reads that tag; do not edit a version
in project files for a release.
- Develop and validate changes in the private workbench as needed.
- Review the exact publishable snapshot for confidential material.
- Push that snapshot to a temporary public
publication/<topic>branch and open one pull request into publicmain. - The public-main pull request is the release gate. Its CI validates the merge result with the Python test matrix, quality checks, documentation build, and package smoke test.
- After the PR merges, fast-forward the private mirror's
mainbranch to publicmain. - Create the release tag from that public
maincommit.
There is no public dev branch in this workflow. The private dev branch may
remain an unpublished integration line, but it is never a public promotion
target.
Only tag a clean local checkout on main after the public-main PR has passed
and merged:
git checkout main
git pull --ff-only origin main
poetry install
poetry run release v1.2.3 --dry-run
poetry run release v1.2.3Pre-release tags use the same flow, for example v1.2.3-alpha.0,
v1.2.3-beta.0, or v1.2.3-rc.0. The helper confirms that the tree is clean,
the checkout is on and matches the selected remote's main, and the tag does
not already exist. It also validates the committed release page before a tag
can be created.
Add docs/releases/<tag>.md and include it in docs/releases/index.md before
opening the public release pull request. Use the tag exactly as written; do not
rewrite v1.0.0-rc.4 as CORNETO 1.0.0 RC4. Pre-releases include the same
badge used by the documentation release synchronizer:
# Release v1.0.0-rc.4 {bdg-warning}`Pre-release`
One or two sentences describing the purpose of the release.
## Highlights
- The most important user-facing change.
- Another important change.
## Additional context
Optional installation, migration, compatibility, or method-specific details.For a stable release, omit the pre-release badge:
# Release v1.0.0The release helper and tag publication workflow both enforce the canonical
title and the ## Highlights section. This keeps manually prepared pages
consistent with pages produced by scripts/sync_releases.py.
Useful options:
poetry run release v1.0.0-rc.1 --dry-run
poetry run release v1.0.0-rc.1 --yesIn the private workbench, the public repository is configured as public and
must be named explicitly:
poetry run release v1.0.0-rc.1 --remote public --dry-run
poetry run release v1.0.0-rc.1 --remote publicThe release process intentionally gives each workflow one job:
- Pull requests into
mainrun the complete release gate. - Pushes to
maindeploy the stable documentation only. - Release tags build the exact tagged distributions, check them, publish to PyPI, create the GitHub Release, and deploy versioned documentation.
This avoids repeating the full test matrix for temporary branch pushes, the
post-merge main push, and the release tag. The tagged package remains
protected by artifact-specific validation, while the merged PR is the code
quality gate.
Before opening the public-main PR, run the checks relevant to the change. A full release-candidate check normally includes:
poetry run pytest
poetry run ruff check --no-fix corneto tests
poetry run ruff format --check corneto tests
poetry check
poetry run sphinx-build -W --keep-going -b html docs docs/_build/html
poetry build
poetry run twine check dist/*The GitHub release pipeline uses OIDC trusted publishing, creates release notes automatically, and marks alpha, beta, and RC tags as pre-releases.