Recipes

Goal-oriented walkthroughs for common bumpwright workflows.

Library release

Releasing a Python package and tagging the repository.

Scenario

After merging changes you need a new library version on PyPI.

Minimal config

[project]
public_roots = ["src"]
[analysers]
cli = true

More options are documented in concepts/configuration and analysers/cli.

Command sequence

  1. Initialise the repository (run once):

    bumpwright init
    
  2. Apply the version bump, commit and tag:

    bumpwright bump --commit --tag
    

Expected output

Command

Sample output

bumpwright init

Creates baseline commit v1.2.3

bumpwright bump --commit --tag

Markdown ### v1.2.4 and a Git tag

Service deployment

Checking API compatibility before deploying a web service.

Scenario

CI should block breaking HTTP route changes.

Minimal config

[analysers]
web_routes = true

See analysers/web_routes for analyser behaviour.

Command sequence

  1. Compare against origin/main in CI:

    bumpwright decide --base origin/main --format json
    
  2. Deploy only when level is not major.

Expected output

Command

Sample output

bumpwright decide --base origin/main --format json

{"level": "minor", "confidence": 1.0}

Changelog generation

Updating a changelog alongside version bumps.

Scenario

Release notes should be appended automatically.

Minimal config

[changelog]
path = "CHANGELOG.md"
repo_url = "https://github.com/me/project"

Configuration details live in changelog/index.

Command sequence

  1. Preview the changelog locally:

    bumpwright bump --changelog CHANGELOG.md --dry-run --format md
    
  2. Apply bump, commit, tag and update the changelog:

    bumpwright bump --changelog CHANGELOG.md --commit --tag --format md
    

Expected output

Command

Sample output

bumpwright bump --changelog CHANGELOG.md --dry-run --format md

### v1.2.4\n- feat: add feature

bumpwright bump --changelog CHANGELOG.md --commit --tag --format md

Same as above and a release tag