Skip to content

build: drop rc0 pre-release tag and add dynamic git versioning#2235

Open
ko3n1g wants to merge 4 commits intomainfrom
dynamic-git-versioning
Open

build: drop rc0 pre-release tag and add dynamic git versioning#2235
ko3n1g wants to merge 4 commits intomainfrom
dynamic-git-versioning

Conversation

@ko3n1g
Copy link
Copy Markdown
Contributor

@ko3n1g ko3n1g commented Apr 8, 2026

Summary

  • Drops the rc0 pre-release tag — version is now X.Y.Z (clean semver)
  • Appends +<short-sha> to __version__ at import/build time via git rev-parse --short HEAD
  • Gracefully falls back to the base version if git is unavailable or the code is not in a git repo
  • Set NO_VCS_VERSION=1 to opt out (e.g. for release builds)
  • Pins build-test-publish-wheel to FW-CI-templates@7a6fd6d (sets NO_VCS_VERSION=1 in the build step to prevent sdist/wheel version mismatch); will be replaced with a version tag once fix: set NO_VCS_VERSION=1 in wheel build step FW-CI-templates#443 is released

Example

>>> import nemo_rl; nemo_rl.__version__
'0.5.0+5142e790'

>>> NO_VCS_VERSION=1 python -c "import nemo_rl; print(nemo_rl.__version__)"
0.5.0

Test plan

  • CI build-test-publish-wheel workflow passes
  • Installed package version string contains +<sha> suffix
  • NO_VCS_VERSION=1 suppresses the suffix

Append +<short-sha> to __version__ at import time using only the git
binary. Falls back silently if git is unavailable or not in a repo.
Set NO_VCS_VERSION=1 to opt out (e.g. for release builds).

Also pins build-test-publish-wheel to FW-CI-templates@7a6fd6d which
sets NO_VCS_VERSION=1 in the build step, preventing sdist/wheel version
mismatch. Will be replaced with a version tag once
NVIDIA-NeMo/FW-CI-templates#443 is released.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
@ko3n1g ko3n1g requested review from a team as code owners April 8, 2026 14:55
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot bot commented Apr 8, 2026

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions bot added the CI Relating to CI label Apr 8, 2026
ko3n1g and others added 3 commits April 8, 2026 15:14
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
@kajalj22
Copy link
Copy Markdown
Contributor

kajalj22 commented Apr 9, 2026

/ok to test c2c6542

@kajalj22 kajalj22 added the CI:L1 Run doctests, unit tests, and functional tests label Apr 9, 2026
@copy-pr-bot copy-pr-bot bot deployed to nemo-ci April 10, 2026 23:29 Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:L1 Run doctests, unit tests, and functional tests CI Relating to CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants