Skip to content

Automate version bumping in CI/CD pipeline #36

@baogorek

Description

@baogorek

Problem

Version bumping is currently manual and error-prone. The recent 0.5.0 release was delayed because:

  1. make changelog includes bump-version changelog.yaml pyproject.toml but this step either wasn't run or failed silently
  2. CHANGELOG.md was updated to show 0.5.0, but pyproject.toml still had 0.4.3
  3. CI's skip-existing: true silently skipped publishing since 0.4.3 already existed on PyPI
  4. The weight distribution diagnostics feature (PR Add weight distribution diagnostics and use_gates option #35) was merged but never published

Current Workflow

Manual steps required before pushing to main:

  1. Add entry to changelog_entry.yaml
  2. Run make changelog
  3. Verify pyproject.toml was updated
  4. Commit and push

Proposed Solution

Automate version bumping in the CI pipeline so that:

  • When a PR is merged with a changelog_entry.yaml file, CI automatically runs the changelog/version bump
  • Or: Add a pre-push hook or CI check that fails if changelog.yaml has unpublished bumps

Options to consider:

  1. GitHub Action for changelog: Run make changelog in CI before the publish step
  2. Pre-commit hook: Validate that versions are in sync before allowing commits
  3. CI version check: Fail the build if changelog.yaml bump directives don't match pyproject.toml

Additional Note

l0/__init__.py has __version__ which was also out of sync (showed 0.1.0). Consider either:

  • Removing it and reading version from importlib.metadata
  • Including it in the bump-version command

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions