Skip to content

Commit

Permalink
Merge pull request #361 from bioimage-io/fix_spec_pinning
Browse files Browse the repository at this point in the history
pin bioimageio.spec again to 0.4.9.*
  • Loading branch information
FynnBe authored Nov 15, 2023
2 parents 225a7d2 + b586b86 commit 099cc73
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bioimageio/core/VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "0.5.10"
"version": "0.5.11"
}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
],
packages=find_namespace_packages(exclude=["tests"]), # Required
install_requires=[
"bioimageio.spec==0.4.9",
"bioimageio.spec==0.4.9.*",
"imageio>=2.5",
"numpy",
"ruamel.yaml",
Expand Down
14 changes: 6 additions & 8 deletions tests/test_bioimageio_spec_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@ def test_bioimageio_spec_version():
print(req)
assert req.startswith("bioimageio.spec ==")
spec_ver = req[len("bioimageio.spec ==") :]
assert spec_ver.count(".") == 2
pmaj, pmin, ppatchand_and_post = spec_ver.split(".")
assert (ppatchand_and_post.isdigit() or ppatchand_and_post[:-1].isdigit()) and (
ppatchand_and_post[-1] == "*" or ppatchand_and_post[-1].isdigit()
), "bioimageio.spec version should be pinned down to patch, e.g. '0.4.9*'"
assert spec_ver.count(".") == 3
pmaj, pmin, ppatch, post = spec_ver.split(".")
assert (
pmaj.isdigit() and pmin.isdigit() and ppatch.isdigit() and post == "*"
), "bioimageio.spec version should be pinned down to patch, e.g. '0.4.9.*'"

ppatch = ppatchand_and_post[:-1] if ppatchand_and_post[-1] == "*" else ppatchand_and_post
pinned = Version(f"{pmaj}.{pmin}.{ppatch}")

assert pinned >= released, "bioimageio.spec pinned to an old version!"
assert pinned == released, "bioimageio.spec not pinned to the latest version"

0 comments on commit 099cc73

Please sign in to comment.