From d2b8a45d6387a99aa4abc266cfcb7b8bbb9b17cf Mon Sep 17 00:00:00 2001 From: Matthias Zepper Date: Fri, 30 Jun 2023 12:00:35 +0200 Subject: [PATCH 1/2] Add apptainer keyword to the list of false positive matches. Bare minimum to possibly support a future apptainer.registry notation. --- nf_core/download.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nf_core/download.py b/nf_core/download.py index c5d0e2de60..f049b41ab5 100644 --- a/nf_core/download.py +++ b/nf_core/download.py @@ -733,8 +733,7 @@ def find_container_images(self, workflow_directory): re.DOTALL is used to account for the string to be spread out across multiple lines. """ container_regex = re.compile( - r"container\s+[\s{}=$]*(?P[\'\"])(?P(?:.(?!\1))*.?)\1[\s}]*", - re.DOTALL, + r"container\s+[\s{}=$]*(?P[\'\"])(?P(?:.(?!\1))*.?)\1[\s}]*", re.DOTALL ) local_module_findings = re.findall(container_regex, search_space) @@ -850,7 +849,7 @@ def rectify_raw_container_matches(self, raw_findings): for _, capture in container_value_defs: # common false positive(s) - if capture in ["singularity"]: + if capture in ["singularity", "apptainer"]: continue # Look for a http download URL. From 464f2fb63ac433d7a9c0512191edac2a5f40b024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Mir=20Pedrol?= Date: Fri, 30 Jun 2023 14:25:45 +0000 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82ad6172a6..9386e27f5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ - Refactored the CLI parameters related to container images. Although downloading other images than those of the Singularity/Apptainer container system is not supported for the time being, a generic name for the parameters seemed preferable. So the new parameter `--singularity-cache-index` introduced in [#2247](https://github.com/nf-core/tools/pull/2247) has been renamed to `--container-cache-index` prior to release ([#2336](https://github.com/nf-core/tools/pull/2336)). - To address issue [#2311](https://github.com/nf-core/tools/issues/2311), a new parameter `--container-library` was created allowing to specify the container library (registry) from which container images in OCI format (Docker) should be pulled ([#2336](https://github.com/nf-core/tools/pull/2336)). - Container detection in configs was improved. This allows for DSL2-like container definitions inside the container parameter value provided to process scopes [#2346](https://github.com/nf-core/tools/pull/2346). +- Add apptainer to the list of false positve container strings ([#2353](https://github.com/nf-core/tools/pull/2353)). #### Updated CLI parameters