brainglobe / cellfinder-core

Standalone cellfinder cell detection algorithm
https://brainglobe.info/documentation/cellfinder/index.html
BSD 3-Clause "New" or "Revised" License
19 stars 16 forks source link

Fix dynamic versioning #177

Closed willGraham01 closed 1 year ago

willGraham01 commented 1 year ago

Description

What is this PR

Why is this PR needed? cellfinder_core.__version__ is statically set at 0.3.1 but we're now at (at least) 0.4.0.

There are also some underlying problems with building on conda because of this; for example needing to fix the cellfinder-core to version 0.3.1 in the conda-forge recipe for the brainglobe meta-package. (https://github.com/conda-forge/staged-recipes/pull/23136)

What does this PR do? cellfinder_core.__version__ will now read from the metadata in pyproject.toml. There shouldn't be a need to manually update the version number in future releases.

References

How has this PR been tested?

Local pip install of the package now returns the dynamic version when requested.

Is this a breaking change?

Not a breaking change, but we need a new version uploaded because v0.4.0 still reports that it's version 0.3.1 when requested via cellfinder_core.__version__.

Does this PR require an update to the documentation?

No

Checklist:

adamltyson commented 1 year ago

Good catch. I think there will be a few repos with this problem. We used to use bump2version that automatically wrote to these files, and I'm not sure we went through all the __init__.py files to fix it.