Skip to content

Commit

Permalink
Use verioneer for tagging (Fix ome#154)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
joshmoore committed Dec 7, 2023
1 parent 7ab7fa3 commit 2695002
Show file tree
Hide file tree
Showing 8 changed files with 3,066 additions and 25 deletions.
20 changes: 0 additions & 20 deletions .bumpversion.cfg

This file was deleted.

1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/omero_zarr/_version.py export-subst
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ venv/
build/
dist/
__pycache__
src/omero_zarr/_version.py
7 changes: 7 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[versioneer]
VCS = git
style = pep440
versionfile_source = src/omero_zarr/_version.py
versionfile_build =
tag_prefix = v
parentdir_prefix = src/omero_zarr/
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

from setuptools import setup

import versioneer


def get_long_description() -> str:
here = os.path.abspath(os.path.dirname(__file__))
Expand All @@ -29,10 +31,12 @@ def get_long_description() -> str:


long_description = get_long_description()
version = versioneer.get_version()

setup(
name="omero-cli-zarr",
version="9.9.9",
version=version,
cmdclass=versioneer.get_cmdclass(),
packages=["omero_zarr", "omero.plugins"],
package_dir={"": "src"},
description="Plugin for exporting images in zarr format.",
Expand All @@ -55,6 +59,4 @@ def get_long_description() -> str:
long_description=long_description,
keywords=["OMERO.CLI", "plugin"],
url="https://github.com/ome/omero-cli-zarr/",
setup_requires=["setuptools_scm"],
use_scm_version={"write_to": "src/omero_zarr/_version.py"},
)
5 changes: 4 additions & 1 deletion src/omero_zarr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@

from ome_zarr.format import CurrentFormat

from ._version import version as __version__
from . import _version

ngff_version = CurrentFormat().version

__all__ = [
"__version__",
]


__version__ = _version.get_versions()["version"]
Loading

0 comments on commit 2695002

Please sign in to comment.