Release Guide

This guide documents the complete release process for py-gbcms using git-flow workflow.

Pre-Release Checklist

Before starting a release, ensure:


Version Locations

All these files must be updated with the new version:

File
Location
Format

pyproject.toml

Line 3

version = "X.Y.Z"

src/gbcms/__init__.py

Line 11

__version__ = "X.Y.Z"

rust/Cargo.toml

Line 3

version = "X.Y.Z"

nextflow/modules/local/gbcms/run/main.nf

Line 7

container "ghcr.io/msk-access/py-gbcms:X.Y.Z"

CHANGELOG.md

Top section

## [X.Y.Z] - YYYY-MM-DD


Release Workflow


Step-by-Step Instructions

1. Create Release Branch

2. Update Version Numbers

Update all version locations listed above. Use this command to verify:

3. Update CHANGELOG.md

Add new section at top:

4. Run Pre-Release Checks

5. Commit and Push

6. Create PR: release/X.Y.Z → main

  • Title: Release X.Y.Z

  • Describe changes from CHANGELOG

  • Wait for CI to pass

7. Merge to main (creates tag)

After PR approval:

  • Squash and merge to main

  • Create tag: git tag X.Y.Z && git push origin X.Y.Z

8. CI Release Pipeline

The tag triggers .github/workflows/release.yml:

  1. Build wheels (Linux x86_64, aarch64; macOS x86_64, arm64; Windows)

  2. Publish to PyPI (via maturin)

  3. Build Docker image → push to ghcr.io/msk-access/py-gbcms:X.Y.Z

  4. Deploy docs → GitHub Pages

9. Merge main back to develop

10. Cleanup


Hotfix Workflow

For critical production fixes:


Automation Scripts

git-flow-helper.sh

Interactive helper for git-flow operations:

Makefile Targets

Target
Description

make lint

Run ruff and mypy

make format

Run black and ruff --fix

make test

Run pytest

make test-cov

Run tests with coverage

make docker-build

Build Docker image locally


CI Workflows

Workflow
Trigger
Purpose

test.yml

Push to develop/main, PR

Run tests

release.yml

Tag push X.Y.Z

Build wheels, publish PyPI, Docker

deploy-docs.yml

Push to main (docs/)

Deploy docs to gh-pages

deploy-docs-staging.yml

Push to develop (docs/)

Build docs (staging)


Troubleshooting

PyPI Upload Fails

  • Check if version already exists on PyPI (versions cannot be overwritten)

  • Verify PYPI_TOKEN secret is set in GitHub repository

Docker Build Fails

  • Check Dockerfile paths match the new folder structure

  • Verify rust/Cargo.toml version matches

Docs Build Fails

  • Verify mkdocs-mermaid2-plugin is installed in workflow

  • Check snippet paths are correct (relative to root)

Last updated