From 310d74d0a9bbfe7fc6815816cc7ed342a9ab1d6d Mon Sep 17 00:00:00 2001 From: Maxime Borry Date: Wed, 24 Jul 2024 14:01:35 +0000 Subject: [PATCH 1/2] fix: tag latest dropped for version comparison --- AMDirT/core/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/AMDirT/core/__init__.py b/AMDirT/core/__init__.py index e4545b4..3c18b3e 100644 --- a/AMDirT/core/__init__.py +++ b/AMDirT/core/__init__.py @@ -60,9 +60,14 @@ def get_amdir_tags(): "https://api.github.com/repos/SPAAM-community/AncientMetagenomeDir/tags" ) if r.status_code == 200: + tags = [ + tag['name'] + for tag in r.json() + if tag['name'] != 'latest' + ] return [ tag["name"] - for tag in r.json() + for tag in tags if version.parse(tag["name"]) >= version.parse("v22.09") ] else: From e1daf70999e9f3cecc29d7a0ee0c1efc11ae2b6e Mon Sep 17 00:00:00 2001 From: Maxime Borry Date: Wed, 24 Jul 2024 14:03:59 +0000 Subject: [PATCH 2/2] fix: tag is str --- AMDirT/core/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AMDirT/core/__init__.py b/AMDirT/core/__init__.py index 3c18b3e..f636f95 100644 --- a/AMDirT/core/__init__.py +++ b/AMDirT/core/__init__.py @@ -66,9 +66,9 @@ def get_amdir_tags(): if tag['name'] != 'latest' ] return [ - tag["name"] + tag for tag in tags - if version.parse(tag["name"]) >= version.parse("v22.09") + if version.parse(tag) >= version.parse("v22.09") ] else: logger.warning(