From 1f9caf5995ea68282c8f9fc2eb80fb26c7613dac Mon Sep 17 00:00:00 2001 From: Adam Talbot Date: Fri, 5 May 2023 13:23:00 +0100 Subject: [PATCH 1/2] Fix: Detect docker name and append quay.io Changes: - Detects simple docker name by having a single slash and colon in the string - adds quay.io as default registry for this docker container - Should fix problems where nfcore/ubuntu:20.04 did not find correct URL fixes #2280 --- CHANGELOG.md | 1 + nf_core/modules/lint/main_nf.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 116e55eb30..42d3f10ed6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ### Linting - Warn if container access is denied ([#2270](https://github.com/nf-core/tools/pull/2270)) +- Detect if container is 'simple name' and try to contact quay.io server by default. ### Modules diff --git a/nf_core/modules/lint/main_nf.py b/nf_core/modules/lint/main_nf.py index 102d5ead12..90f92d0ff7 100644 --- a/nf_core/modules/lint/main_nf.py +++ b/nf_core/modules/lint/main_nf.py @@ -290,8 +290,9 @@ def check_process_section(self, lines, fix_version, progress_bar): else: self.failed.append(("docker_tag", "Unable to parse docker tag", self.main_nf)) docker_tag = None - if l.startswith("biocontainers/"): - # When we think it is a biocontainer, assume we are querying quay.io/biocontainers and insert quay.io as prefix + # Guess if container name is simple one (e.g. nfcore/ubuntu:20.04) + # If so, add quay.io as default container prefix + if l.count("/") == 1 and l.count(":") == 1: l = "quay.io/" + l url = urlparse(l.split("'")[0]) # lint double quotes From 09817321b2273f7af359fad544f87c3dd851ef40 Mon Sep 17 00:00:00 2001 From: Adam Talbot Date: Fri, 5 May 2023 13:26:52 +0100 Subject: [PATCH 2/2] CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42d3f10ed6..4f90fb86c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ ### Linting - Warn if container access is denied ([#2270](https://github.com/nf-core/tools/pull/2270)) -- Detect if container is 'simple name' and try to contact quay.io server by default. +- Detect if container is 'simple name' and try to contact quay.io server by default ([#2281](https://github.com/nf-core/tools/pull/2281)) ### Modules