Skip to content

Commit

Permalink
Merge #2353: Download: Add apptainer to the list of false positve c…
Browse files Browse the repository at this point in the history
…ontainer strings

This is needed, should the keyword "apptainer" start to pop up in DSL2 container definitions.
  • Loading branch information
MatthiasZepper authored Jun 30, 2023
2 parents ffd8f64 + 464f2fb commit d74b909
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,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

Expand Down
5 changes: 2 additions & 3 deletions nf_core/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -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<quote>[\'\"])(?P<param>(?:.(?!\1))*.?)\1[\s}]*",
re.DOTALL,
r"container\s+[\s{}=$]*(?P<quote>[\'\"])(?P<param>(?:.(?!\1))*.?)\1[\s}]*", re.DOTALL
)

local_module_findings = re.findall(container_regex, search_space)
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit d74b909

Please sign in to comment.