imagej / pyimagej

Use ImageJ from Python
https://pyimagej.readthedocs.io/
Other
472 stars 82 forks source link

Add a __version__ attribute for dynamic version introspection #187

Closed gselzer closed 2 years ago

gselzer commented 2 years ago

Many modules, like numpy support this.

Under the hood, Numpy uses Versioneer (they call it here)

ctrueden commented 2 years ago

Thanks @gselzer for researching that!

ctrueden commented 2 years ago

It looks like PyImageJ already had a __version__ attribute since 508507c8e55e9c2fd4be6a5175c5c901814a07ca back in 2020. But with 1bab722f431d43a7ac3073d913b84807c379d7f0, @gselzer improved it to use scyjava's snazzy get_version function, which is a nice way to keep things DRY and respect PEP8's restrictive module-level dunders rule.