From cfc2c00ca25de4d35c6fdf2516aea037f42b1a3c Mon Sep 17 00:00:00 2001 From: sameeul Date: Mon, 9 Dec 2024 14:05:06 -0500 Subject: [PATCH 1/2] Append "_latest" to image id if no tag is present --- cwltool/singularity.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cwltool/singularity.py b/cwltool/singularity.py index 40d1bc9b5..5e5b72157 100644 --- a/cwltool/singularity.py +++ b/cwltool/singularity.py @@ -134,10 +134,14 @@ def is_version_3_10_or_newer() -> bool: def _normalize_image_id(string: str) -> str: + if ":" not in string: + string+="_latest" return string.replace("/", "_") + ".img" def _normalize_sif_id(string: str) -> str: + if ":" not in string: + string+="_latest" return string.replace("/", "_") + ".sif" From 1edc295e515cb1f911069a16d8f99d95b8792ad2 Mon Sep 17 00:00:00 2001 From: sameeul Date: Mon, 9 Dec 2024 15:10:56 -0500 Subject: [PATCH 2/2] Make linter happy --- cwltool/singularity.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cwltool/singularity.py b/cwltool/singularity.py index 5e5b72157..d0e46fb27 100644 --- a/cwltool/singularity.py +++ b/cwltool/singularity.py @@ -135,13 +135,13 @@ def is_version_3_10_or_newer() -> bool: def _normalize_image_id(string: str) -> str: if ":" not in string: - string+="_latest" + string += "_latest" return string.replace("/", "_") + ".img" def _normalize_sif_id(string: str) -> str: if ":" not in string: - string+="_latest" + string += "_latest" return string.replace("/", "_") + ".sif"