Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get version number dynamically from tag #244

Merged
merged 4 commits into from
Mar 22, 2023
Merged

Conversation

paddyroddy
Copy link
Collaborator

Fixes #219.

Following #231 the shared libraries are now built dynamically in CI. As a result, VERSION.txt is not needed, as we can dynamically get the version from the current tag.

The main advantage of this is it's one less thing to remember to update. Another is that we can have a current development version. For example, for me locally:

import btrack
print(btrack.__version__)

prints 0.5.1.dev160+g4a43956.d20230322.

@paddyroddy paddyroddy self-assigned this Mar 22, 2023
@paddyroddy paddyroddy marked this pull request as draft March 22, 2023 12:47
@quantumjot quantumjot marked this pull request as ready for review March 22, 2023 12:49
@deprecated-napari-hub-preview-bot
Copy link

deprecated-napari-hub-preview-bot bot commented Mar 22, 2023

Preview page for your plugin is ready here:
https://preview.napari-hub.org/quantumjot/btrack/244
Updated: 2023-03-22T12:55:37.618857

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.04 🎉

Comparison is base (4a43956) 82.94% compared to head (e67ef24) 82.98%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #244      +/-   ##
==========================================
+ Coverage   82.94%   82.98%   +0.04%     
==========================================
  Files          19       19              
  Lines        1560     1552       -8     
  Branches      263      260       -3     
==========================================
- Hits         1294     1288       -6     
+ Misses        191      190       -1     
+ Partials       75       74       -1     
Impacted Files Coverage Δ
btrack/constants.py 100.00% <ø> (ø)
btrack/libwrapper.py 96.22% <ø> (-0.07%) ⬇️
btrack/__init__.py 91.66% <100.00%> (+1.66%) ⬆️
btrack/config.py 92.18% <100.00%> (+0.12%) ⬆️
btrack/core.py 84.00% <100.00%> (+0.66%) ⬆️
btrack/io/hdf.py 72.79% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Owner

@quantumjot quantumjot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Only concern is the possibility of a mismatch between the compiled version and the python library. I guess that now we have the CI compilation it should be less of an issue.

@paddyroddy
Copy link
Collaborator Author

Looks good. Only concern is the possibility of a mismatch between the compiled version and the python library. I guess that now we have the CI compilation it should be less of an issue.

Yes, unfortunately that problem may exist but shouldn't be that common. As long as it is made clear to users who are developing locally that you must run build.sh first before doing pip install -e .. However, if you just run the latter you'll be missing the binaries anyway, so you'll get the right version.

@paddyroddy paddyroddy merged commit 79d3945 into main Mar 22, 2023
@paddyroddy paddyroddy deleted the remove-version-hacker branch March 22, 2023 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can we remove the hardcoded btrack/VERSION.txt version file?
3 participants