Skip to content

Commit 9297bbf

Browse files
committed
make sure we compare against the latest spec release
1 parent 957bc0e commit 9297bbf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_bioimageio_spec_version.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ def test_bioimageio_spec_version(mamba_cmd: Optional[str]):
2323
)
2424
full_out = mamba_repoquery.stdout # full output includes mamba banner
2525
search = json.loads(full_out[full_out.find("{") :]) # json output starts at '{'
26-
rmaj, rmin, rpatch, *_ = search["result"]["pkgs"][0]["version"].split(".")
26+
latest_spec = max(search["result"]["pkgs"], key=lambda entry: entry["timestamp"])
27+
rmaj, rmin, rpatch, *_ = latest_spec["version"].split(".")
2728
released = Version(f"{rmaj}.{rmin}.{rpatch}")
2829

2930
# get currently pinned bioimageio.spec version

0 commit comments

Comments
 (0)