Conversation
.github/workflows/publish.yml
Outdated
Comment on lines
+4
to
+6
| push: | ||
| tags: | ||
| - 'v*' |
There was a problem hiding this comment.
The CONTRIBUTING.md file documents the release process as "Create a GitHub Release - this triggers PyPI publishing automatically" (line 202). However, this change modifies the workflow to trigger on tag push instead of GitHub release creation. The documentation in CONTRIBUTING.md should be updated to reflect this new workflow. For example, step 4 could be changed to: "Push tags: git push --tags - this triggers PyPI publishing automatically" and remove the GitHub release creation step, or clarify that GitHub releases are optional.
Suggested change
| push: | |
| tags: | |
| - 'v*' | |
| release: | |
| types: | |
| - published |
added 3 commits
February 21, 2026 14:57
- Replace static version in pyproject.toml with dynamic setuptools_scm - Add setuptools_scm>=8.0 to build-system requires - Add [tool.setuptools_scm] config (post-release scheme, no local version) - Replace hardcoded __version__ with importlib.metadata lookup - Remove version verification step from publish workflow (no longer needed) - Delete .bumpversion.cfg
…NG.md - Change publish workflow trigger from push:tags to release:published - Update CONTRIBUTING.md to remove bump2version, reflect new release steps
Replace bump2version-specific tests with checks that verify: - pyproject.toml uses dynamic version (not static) - setuptools_scm is configured in pyproject.toml - __init__.py uses importlib.metadata (not hardcoded string)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the manual
bump2versionversioning workflow withsetuptools_scm, which derives the package version automatically from git tags.Changes
pyproject.tomlsetuptools_scm>=8.0to[build-system].requiresversion = "..."withdynamic = ["version"][tool.setuptools_scm]config (post-releasescheme, no local version suffix)bump2versionfrom dev dependenciessrc/alpha_hwr/__init__.py__version__ = "..."withimportlib.metadata.version()lookup.github/workflows/publish.ymlpush: tags: v*torelease: types: [published]setuptools_scmto the pip install stepCONTRIBUTING.mdbump2versionsteps, document newgit tag + GitHub Releaseworkflowtests/test_version_consistency.py.bumpversion.cfg— deletedRelease workflow (new)
git tag v0.5.1 git push --tags # Then create a GitHub Release from that tag — PyPI publish triggers automatically