Closed joshmoore closed 10 months ago
Versioneer looks nice. So the release steps (currently https://ome-contributing.readthedocs.io/en/latest/python-development.html) are now:
struggling with pre-commit here. options are:
Is it a workflow that you see rolling out to other repositories when ready?
Not sure. Happy to discuss. The two big benefits are:
If you need to have version strings updated anywhere else, though, this won't do it for you.
So the release steps ... are now:
More like either:
Or:
Pushed another attempt. Apparently the import versioneer
in setup.py leads to mypy checking it no matter what (unless follows are disabled). This just ignores setup.py as a (temporary?) fix. See https://github.com/pre-commit/pre-commit/issues/2936 which convinced me that the excludes should work.
We should really settle on one of these two:
Discussing with @will-moore and @jburel, this looks to be working. You can also test locally with:
$ python setup.py version
running version
keywords are unexpanded, not using
got version from VCS {'version': '0.5.4+9.gb243a8d', 'full-revisionid': 'b243a8d3f49b344c209594e2967cf545f10dea77', 'dirty': False, 'error': None, 'date': '2023-12-07T12:01:13+0100'}
Version: 0.5.4+9.gb243a8d
full-revisionid: b243a8d3f49b344c209594e2967cf545f10dea77
dirty: False
date: 2023-12-07T12:01:13+0100
One key difference is that we now need to have 2 Python files included in the project tree _version.py
and versionner.py
. This should be indicated in the README since those files are solely for version and have nothing to do with the plugin itself.
At least for versioneer.py
, it's possible to choose not to check it in, but that requires installing the versioneer library at runtime.
So what's the next step here?
I'm needing to use this PR now to continue to export from IDR, and it's working. So I'm in favour of getting it merged ASAP and released to fix the current broken release.
I think @jburel was just wanting some mention of the versioneer changes in the README?
For versionner.py
, I think we should keep it out. The other one is a config file similar to the one used by bump2version
Following from https://github.com/ome/omero-cli-zarr/pull/157#issuecomment-1875434580, @jburel, you're saying that you want me to introduce a dependency on the versioneer library here? You can find out more about the "experimental build-time dependency mode" here: https://github.com/python-versioneer/python-versioneer?tab=readme-ov-file#build-time-dependency-mode
Closing in favor of #159 for the moment.
Move to the use of https://github.com/python-versioneer/python-versioneer for defining a version from the current tag. This also removes the need to use bump2version, therefore releases can be handled completely from the GH UI.
cc: @will-moore