Closed sbesson closed 3 years ago
We have multiple variations of the version set up. e.g. https://github.com/ome/omero-py/blob/master/src/omero_version.py (name variations for https://github.com/ome/omero-web/blob/master/omeroweb/version.py)
Web apps followed the approach first introduced in mapr: https://github.com/ome/omero-mapr/blob/master/omero_mapr/__init__.py and https://github.com/ome/omero-mapr/blob/master/omero_mapr/utils/version.py see https://www.python.org/dev/peps/pep-0440/
I do not have strong opinion. I think we need to stick to one across the various repos
since you are adjusting setup.py
, you may want to fix the classifier i.e. 'Programming Language :: Python :: 2',
does not match the python version requires
Pushed a couple of commits to update a few classifiers.
Answering the version management heterogeneity:
briefly audited all the repositories where the package version is defined in another place than setup.py
:
__version__
defined in <module>/__init__.py
: ome-files-py, omero-mapr, __version__
defined in <module>/version.py
: ome-files-py, omero-fpbioimage__version__
defined in <module>/utils.py
: omero-figure, version
defined in <module>/_version.py
: omero-certificates<module>_version
defined in <module>_version.py
: omero-py<module>_version
defined in <module>/version.py
: omero-webIf we choose to standardize, my personal inclination would be to define __version__
either in <module>/__init__.py
or <module>/version.py
as per the PEP mentioned above. Obviously individual packages can choose to have this version also defined in another module and using another name esp. to preserve backwards compatibility.
/cc @joshmoore @manics
to preserve backwards compatibility
Certainly for omero-web and omero-py these are part of the public API. I could see having the value that is imported into <module>/__init__.py
be the thing we want to standardize on, but that doesn't solve the question of where to generate the value to.
Giving until tomorrow EOB for another round of discussions or alternate proposals and then I'll move forward with the release of ome-model 6.2.0
.
Discussed with @manics and @joshmoore, this PR adds some logic to
setup.py
to write the current module version underome_model/version.py
using the__version___
attribute - see https://www.python.org/dev/peps/pep-0396/. If__init__.py
or another variable name is preferable, I have no strong opinion but I was not able to find a PEP authoritatively defining the recommended behavior.The module is also updated to store
ome_model x.y.z[.dev0]
in theOME.Creator
attribute similarly to the implementation in Bio-Formats - see https://github.com/ome/bioformats/pull/2207.