Phase 1: Dynamic versioning from git tags via setuptools-scm#17
Draft
Phase 1: Dynamic versioning from git tags via setuptools-scm#17
Conversation
- Remove static version from pyproject.toml, add dynamic = ["version"] - Add setuptools-scm>=8 to build-system requires - Configure scikit-build-core metadata.version.provider - Add [tool.setuptools_scm] section - Update __init__.py to read version via importlib.metadata Co-authored-by: rilma <14822065+rilma@users.noreply.github.com> Agent-Logs-Url: https://github.com/rilma/pyHWM14/sessions/fe9b4fd3-2200-4f81-ab2b-32ebce284437
Copilot
AI
changed the title
[WIP] Create an automated Python package release workflow
Phase 1: Dynamic versioning from git tags via setuptools-scm
Mar 21, 2026
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.
Description
Switches from hardcoded
version = "1.1.0"to git-tag-derived versioning usingsetuptools-scm. Maintainers tag a release (git tag v1.2.0 && git push --tags) and the version propagates automatically through build and runtime — no manual bumps needed.pyproject.toml:versionwithdynamic = ["version"]setuptools-scm>=8to build requiresscikit_build_core.metadata.setuptools_scmas the version provider[tool.setuptools_scm]sectionpyhwm2014/__init__.py:__version__ = "1.1.0"withimportlib.metadata.version()lookup, falling back to"0.0.0"when not installed from a built packageType of Change
Checklist
Testing
Additional Context
This is Phase 1 of the automated release plan. Subsequent phases will add towncrier changelog generation,
uv build, and a GitHub Actions release workflow triggered by version tags.Original prompt
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.