Implement dynamic versioning with setuptools-scm#129
Merged
Conversation
Replace manual version management with setuptools-scm for automatic version derivation from git tags. Development versions now include commit hash and date for better traceability. Changes: - Add setuptools-scm to build requirements and dev dependencies - Configure setuptools-scm to generate src/targetdb/_version.py - Update __init__.py to import version from generated file with fallback - Add _version.py to .gitignore - Support both v.x.x.x and vx.x.x tag formats for backward compatibility Version format: 0.8.1.dev44+g8e7d5a28e.d20260109 - Base version from git tag - Dev info with commit count - Git commit hash - Build date Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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
0.8.1.dev44+g8e7d5a28e.d20260109)__init__.pyChanges
Configuration
[tool.setuptools_scm]with version file generation and tag regex[tool.setuptools.dynamic]section (handled by setuptools-scm)Code
_version.pywith fallbacksrc/targetdb/_version.pyto ignore generated fileVersion Format
0.8.0(clean version)0.8.1.dev44+g8e7d5a28e.d202601090.8.1(next version after tag)dev44(44 commits since v0.8.0)g8e7d5a28ed20260109(2026-01-09)Future Release Workflow
Test Plan
python -m setuptools_scm→0.8.1.dev44+g8e7d5a28e.d20260109import targetdb; targetdb.__version__src/targetdb/_version.pyv.x.x.xandvx.x.xformats🤖 Generated with Claude Code