feat: replace hardcoded __version__ with git-tag-based versioning - #88
Merged
Merged
Conversation
aryanputta
requested review from
WarningRan,
eklee15,
lasch,
mcalman and
yuhaohaoyu
as code owners
March 21, 2026 05:09
Member
|
@aryanputta thank you for starting this effort, really appreciated! There are a few minor things to address to make the build process and checks happy.
|
Contributor
Author
|
Will check right now and fix it also just started doing open source so any advice will be great. |
Member
|
NP. Take it easy.
|
Contributor
Author
|
Yeah I'll work on it , thanks for the advice. If you have any other things you'd like me to work on after this let me know. Thanks! |
aryanputta
force-pushed
the
feat/git-tag-versioning
branch
from
March 23, 2026 19:39
30f7195 to
56b9566
Compare
lasch
reviewed
Mar 23, 2026
lasch
left a comment
Member
There was a problem hiding this comment.
An appreciated addition. Looks good. Thx.
Before merging, it requires the commits to have both:
- sign-off and
- verified signature
The first version had the verified signature but no sign-off, this time it's the other way around.
Should be an easy fix. Otherwise, good to go.
aryanputta
force-pushed
the
feat/git-tag-versioning
branch
from
March 23, 2026 20:26
56b9566 to
917a702
Compare
aryanputta
force-pushed
the
feat/git-tag-versioning
branch
from
March 23, 2026 20:27
a161f54 to
917a702
Compare
Signed-off-by: aryan <aryansputta@gmail.com>
Signed-off-by: aryan <aryansputta@gmail.com>
lasch
approved these changes
Mar 23, 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.
Fixes #45
Description
The version number in this package was hardcoded as a string in
src/aiu_trace_analyzer/__init__.py. This means every release requires a manual commit to bump it, which is error-prone and easy to forget.This PR switches to git-tag-based versioning using setuptools-scm. The version is now derived automatically from the current git tag. If the package is installed from a checkout that is not on a tagged commit, the version will include a dev suffix. If the package is not installed at all, it falls back to "unknown".
Changes Made
pyproject.toml: added setuptools-scm>=8 to build requirements and added an empty [tool.setuptools_scm] section to activate git-tag versioningsrc/aiu_trace_analyzer/__init__.py: replaced__version__ = "1.0.2"with an importlib.metadata lookup that reads the version from the installed package metadataHow Was This Tested?
AI Usage Disclosure