Skip to content

maltextract: replace UNZIP setup with nft-utils extract() - #13690

Merged
maxulysse merged 12 commits into
nf-core:masterfrom
maxulysse:maltextract-nft-utils
Nov 16, 2026
Merged

maxulysse merged 12 commits into
nf-core:masterfrom
maxulysse:maltextract-nft-utils

Conversation

@maxulysse

@maxulysse maxulysse commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Use nft-utils extract() instead of a setup run of the UNZIP module to unpack ncbi_taxmap.zip in the maltextract test, as a trial before doing the same in the other modules with UNZIP setups.

  • modules/nf-core/maltextract/tests/main.nf.test: drop setup { run("UNZIP") } and tag "unzip"; in setup, ncbi_taxmap = extract(modules_testdata_base_path + 'genomics/.../ncbi_taxmap.zip') extracts into a temporary directory (deleted when nf-test exits, never under outputDir), passed as input[2] = file('${ncbi_taxmap}'); modules_testdata_base_path is NXF_MODULES_TESTDATA_BASE or the same default as params.modules_testdata_base_path, because config params are not available in nf-test's setup/when Groovy code
  • nf-test.config: bump nft-utils 1.2.1 to 1.3.0, which adds extract() (local paths, s3, named extractDir/compression, throws on failure)

Tested with nft-utils 1.3.0: nf-test test modules/nf-core/maltextract --profile=+docker (2/2 pass, snapshot unchanged).

🤖 Generated with Claude Code
🧑‍🦱 Verified by @maxulysse

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@SPPearce SPPearce left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does curlAndExtract work on local file paths? i.e. if modules_testdata_base_path is set locally, does it still work?

@adamrtalbot adamrtalbot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wooo!

@maxulysse
maxulysse marked this pull request as draft November 12, 2026 09:11
@maxulysse maxulysse changed the title test(maltextract): replace UNZIP setup with nft-utils curlAndExtract WIP: DO NOT MERGE test(maltextract): replace UNZIP setup with nft-utils curlAndExtract Nov 12, 2026
@prototaxites

Copy link
Copy Markdown
Contributor

Does curlAndExtract work on local file paths? i.e. if modules_testdata_base_path is set locally, does it still work?

My suspicion is that this won't work

@maxulysse

Copy link
Copy Markdown
Member Author

My suspicion is that this won't work

Right, nft-utils 1.2.1 curlAndExtract passes everything to curl, which rejects a bare path (curl: (3) URL rejected: No host part in the URL). nf-core/nft-utils#102 adds extract(), which reads bare local paths in place (and s3:// via nextflow fs cp), and fails the test on any download/extraction error. Tested locally with a build of #102, with both the default and a local NXF_MODULES_TESTDATA_BASE.

maxulysse and others added 8 commits November 12, 2026 16:15
…Data.modulesBase()

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tData.groovy

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…xtract() returns

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@maxulysse maxulysse changed the title WIP: DO NOT MERGE test(maltextract): replace UNZIP setup with nft-utils curlAndExtract test(maltextract): replace UNZIP setup with nft-utils extract() Nov 16, 2026
@maxulysse
maxulysse marked this pull request as ready for review November 16, 2026 11:29
@maxulysse
maxulysse requested review from a team as code owners November 16, 2026 11:29
@maxulysse

Copy link
Copy Markdown
Member Author

@SPPearce @prototaxites nft-utils 1.3.0 is released, so this PR now bumps nf-test.config to it and uses the released extract(); CI passes and this is ready for review.

@maxulysse maxulysse changed the title test(maltextract): replace UNZIP setup with nft-utils extract() maltextract: replace UNZIP setup with nft-utils extract() Nov 16, 2026

@prototaxites prototaxites left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Have you validated it works with an offline copy of the test data?

@maxulysse

Copy link
Copy Markdown
Member Author

Looking good. Have you validated it works with an offline copy of the test data?

I have tested with local data, it works

@adamrtalbot adamrtalbot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm up for trying it! better than process dependencies in the tests.

@maxulysse
maxulysse added this pull request to the merge queue Nov 16, 2026
Merged via the queue into nf-core:master with commit bb3ab79 Nov 16, 2026
21 of 25 checks passed
@maxulysse
maxulysse deleted the maltextract-nft-utils branch November 16, 2026 16:05
This was referenced Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants