Release Process¶
Branch convention¶
Release branches must follow:
release/vX.Y.Z
Example:
release/vX.Y.Z
Automated release flow¶
On push to a release/vX.Y.Z branch, the Release workflow:
- validates branch naming
- validates project version consistency
- validates NumPy/Pandas ABI compatibility
- runs release test suite + coverage gate
- builds wheel and source distributions
- installs built wheel and runs quickstart smoke validation (
validate+build --dry-run) - publishes package to PyPI (OIDC trusted publishing)
- creates and pushes Git tag
vX.Y.Z - creates GitHub release with artifacts
Idempotency behavior:
- If the same version is already published on PyPI, publish is skipped.
- If tag/release already exist, those steps are skipped.
- This keeps reruns green when a release branch receives a follow-up docs/metadata commit.
Version consistency contract¶
These must match:
pyproject.toml->[project].versionslideflow/__init__.py->__version__- release branch suffix ->
release/vX.Y.Z
PyPI package identity:
- distribution name:
slideflow-presentations - import namespace:
slideflow - CLI command:
slideflow
Pre-release checklist¶
- Ensure tests pass locally.
-
Update docs + changelog in the same release prep PR:
-
update user-facing docs for new behavior/flags/workflows
-
update
CHANGELOG.mdwith release notes and known issues -
Ensure docs build cleanly:
uv sync --extra docs --extra dev --extra ai --locked
source .venv/bin/activate
uv lock --check
uv pip check
uv run python scripts/ci/check_numpy_binary_compatibility.py
uvx --from black==26.3.1 black --check slideflow tests scripts
python -m ruff check slideflow tests scripts
python -m mypy slideflow
uv run pytest -q
uv run mkdocs build --strict
-
Verify dependency constraints are still within policy:
-
runtime dependencies have explicit upper bounds
- dbt adapters remain compatible with the supported
dbt-corerange - security-sensitive dependency minimums are preserved
-
uv.lockis current for the release branch -
Bump versions in
pyproject.tomlandslideflow/__init__.py. - Create release branch
release/vX.Y.Z. - Push and monitor
CI,Docs, andReleaseworkflows.
PyPI trusted publishing setup¶
- Create PyPI project (or use existing).
- Add trusted publisher for this GitHub repo/workflow.
- Configure GitHub environment
pypiwith any required reviewers. - Keep
id-token: writeenabled in release workflow permissions.
Rollback guidance¶
If release publish fails after tag creation:
- fix issue in a new commit on release branch
- re-run workflow (or push follow-up commit)
- if needed, delete bad tag and recreate only when corrected artifacts are ready