quantumjot / btrack

Bayesian multi-object tracking
https://btrack.readthedocs.io
MIT License
310 stars 50 forks source link

Get version number dynamically from tag #244

Closed paddyroddy closed 1 year ago

paddyroddy commented 1 year ago

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.

deprecated-napari-hub-preview-bot[bot] commented 1 year ago

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 commented 1 year ago

Codecov Report

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

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

:mega: 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 ```diff @@ 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](https://codecov.io/gh/quantumjot/btrack/pull/244?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alan+R+Lowe) | Coverage Δ | | |---|---|---| | [btrack/constants.py](https://codecov.io/gh/quantumjot/btrack/pull/244?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alan+R+Lowe#diff-YnRyYWNrL2NvbnN0YW50cy5weQ==) | `100.00% <ø> (ø)` | | | [btrack/libwrapper.py](https://codecov.io/gh/quantumjot/btrack/pull/244?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alan+R+Lowe#diff-YnRyYWNrL2xpYndyYXBwZXIucHk=) | `96.22% <ø> (-0.07%)` | :arrow_down: | | [btrack/\_\_init\_\_.py](https://codecov.io/gh/quantumjot/btrack/pull/244?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alan+R+Lowe#diff-YnRyYWNrL19faW5pdF9fLnB5) | `91.66% <100.00%> (+1.66%)` | :arrow_up: | | [btrack/config.py](https://codecov.io/gh/quantumjot/btrack/pull/244?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alan+R+Lowe#diff-YnRyYWNrL2NvbmZpZy5weQ==) | `92.18% <100.00%> (+0.12%)` | :arrow_up: | | [btrack/core.py](https://codecov.io/gh/quantumjot/btrack/pull/244?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alan+R+Lowe#diff-YnRyYWNrL2NvcmUucHk=) | `84.00% <100.00%> (+0.66%)` | :arrow_up: | | [btrack/io/hdf.py](https://codecov.io/gh/quantumjot/btrack/pull/244?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alan+R+Lowe#diff-YnRyYWNrL2lvL2hkZi5weQ==) | `72.79% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alan+R+Lowe). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alan+R+Lowe)

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

paddyroddy commented 1 year ago

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.