Skip to content

Development Workflow

LinJHS edited this page Dec 20, 2025 · 1 revision

Development Workflow

This project uses a standard branching strategy combined with setuptools_scm for automatic version management.

Branching Strategy

  • main: The stable branch. This branch reflects the latest released version. Code here is production-ready.
  • dev: The active development branch. New features and fixes are committed here first.

Versioning

We use setuptools_scm to handle versioning automatically based on Git tags. You do not need to manually edit any version numbers in the code.

How it works

  1. On dev branch:

    • When you commit to dev, the version number is dynamically calculated as a "development version".
    • Format example: 0.1.1.dev3+g123abc
      • 0.1.1: The next anticipated release (or current state).
      • dev3: 3 commits since the last tag.
      • g123abc: The git commit hash.
  2. On main branch (Release):

    • When you are ready to release, merge dev into main.
    • Create a Git Tag on main (e.g., v0.2.0).
    • setuptools_scm will recognize this tag and set the package version to exactly 0.2.0.

Release Process

  1. Develop:

    git checkout dev
    # Make changes...
    git add .
    git commit -m "feat: add new feature"
    git push origin dev
  2. Merge: Once features are tested and ready:

    git checkout main
    git merge dev
    git push origin main
  3. Release (Tag): Trigger a release by creating a tag:

    git tag v0.2.0
    git push origin v0.2.0

    This will trigger the GitHub Actions workflow to build and publish the package to PyPI and Docker Hub.

Clone this wiki locally