Fix empty neuron.__version__ when git describe fails in shallow clones - #3840
Conversation
Release dry-runs build wheels from a depth-1 checkout without creating the release tag. git describe then fails while .git still exists, so GIT_DESCRIBE stayed empty and neuron.__version__ (nrnversion(5)) was "", breaking ModelDB CI workdir creation. Fall back to PROJECT_VERSION and assert non-empty __version__ in wheel tests.
|
|
@ramcdougal Please approve. |
|
✔️ d668f5d -> Azure artifacts URL |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/9.0 #3840 +/- ##
============================================
Coverage 68.17% 68.17%
============================================
Files 688 688
Lines 111016 111016
============================================
Hits 75686 75686
Misses 35330 35330 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



Summary
git describefails while.gitstill exists.add_cpp_git_informationleftGIT_DESCRIBEempty in that case, soneuron.__version__(nrnversion(5)) was""and ModelDB CI failed onrunmodels --workdir=$nrn_ver(mkdir('')).PROJECT_VERSIONwhen describe fails/empty so dry-run and ship wheels get the same non-empty string (e.g.9.0.2).__version__intest_wheels.sh.Test plan
python -c "import neuron; print(repr(neuron.__version__))"is non-empty (e.g.'9.0.2')upload=true, tag checkout) still reports the tag version via describe