From 8c1cce0d04d05d92430a981683ca696847cfd856 Mon Sep 17 00:00:00 2001 From: "Harrison H. Vaughn Reed" Date: Wed, 29 Apr 2026 18:02:47 -0400 Subject: [PATCH 01/10] feat(maltextract): add stub block and migrate to topic channel versions - Replace versions.yml / END_VERSIONS with topic channel emit (versions_maltextract) - Version eval: MaltExtract --help | head -n 2 | tail -n 1 | sed - Add stub block: mkdir -p results - Update tests: sanitizeOutput on both tests, add stub test case - Remove legacy versions output block from meta.yml Contributes to #4570 --- modules/nf-core/maltextract/main.nf | 10 +-- modules/nf-core/maltextract/meta.yml | 30 +++++++-- .../nf-core/maltextract/tests/main.nf.test | 28 ++++++++- .../maltextract/tests/main.nf.test.snap | 62 ++++++++++++++++--- 4 files changed, 111 insertions(+), 19 deletions(-) diff --git a/modules/nf-core/maltextract/main.nf b/modules/nf-core/maltextract/main.nf index 386d64ffdfd0..2b27c62722c8 100644 --- a/modules/nf-core/maltextract/main.nf +++ b/modules/nf-core/maltextract/main.nf @@ -14,7 +14,7 @@ process MALTEXTRACT { output: tuple val(meta), path("results") , emit: results - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('maltextract'), eval('MaltExtract --help | head -n 2 | tail -n 1 | sed \'s/MaltExtract version//\''), emit: versions_maltextract, topic: versions when: task.ext.when == null || task.ext.when @@ -30,10 +30,10 @@ process MALTEXTRACT { -r $ncbi_dir \\ -o results/ \\ $args + """ - cat <<-END_VERSIONS > versions.yml - "${task.process}": - maltextract: \$(MaltExtract --help | head -n 2 | tail -n 1 | sed 's/MaltExtract version//') - END_VERSIONS + stub: + """ + mkdir -p results """ } diff --git a/modules/nf-core/maltextract/meta.yml b/modules/nf-core/maltextract/meta.yml index d19900c5c066..9f2a59deacbb 100644 --- a/modules/nf-core/maltextract/meta.yml +++ b/modules/nf-core/maltextract/meta.yml @@ -1,6 +1,6 @@ name: maltextract -description: Tool for evaluation of MALT results for true positives of ancient metagenomic - taxonomic screening +description: Tool for evaluation of MALT results for true positives of ancient + metagenomic taxonomic screening keywords: - malt - MaltExtract @@ -22,7 +22,8 @@ tools: documentation: https://github.com/rhuebler/hops tool_dev_url: https://github.com/rhuebler/hops doi: "10.1186/s13059-019-1903-0" - licence: ["GPL 3"] + licence: + - "GPL 3" identifier: "" input: - - meta: @@ -60,7 +61,28 @@ output: description: File containing software versions pattern: "versions.yml" ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - edam: http://edamontology.org/format_3750 + versions_maltextract: + - - ${task.process}: + type: string + description: The name of the process + - maltextract: + type: string + description: The name of the tool + - MaltExtract --help | head -n 2 | tail -n 1 | sed 's/MaltExtract version//': + type: eval + description: The expression to obtain the version of the tool +topics: + versions: + - - ${task.process}: + type: string + description: The name of the process + - maltextract: + type: string + description: The name of the tool + - MaltExtract --help | head -n 2 | tail -n 1 | sed 's/MaltExtract version//': + type: eval + description: The expression to obtain the version of the tool authors: - "@jfy133" maintainers: diff --git a/modules/nf-core/maltextract/tests/main.nf.test b/modules/nf-core/maltextract/tests/main.nf.test index c7ef7d19325d..5f7d3f6bfc65 100644 --- a/modules/nf-core/maltextract/tests/main.nf.test +++ b/modules/nf-core/maltextract/tests/main.nf.test @@ -37,10 +37,34 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - process.out.versions, - path("${process.out.results.get(0).get(1)}/ScanSummary.txt") + path("${process.out.results.get(0).get(1)}/ScanSummary.txt"), + sanitizeOutput(process.out) ).match() }, ) } } + + test("test_maltextract - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ [], // meta map + file(params.modules_testdata_base_path + 'delete_me/malt/test.rma6') + ] + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/db/maltextract/taxon_list.txt') + input[2] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + } } diff --git a/modules/nf-core/maltextract/tests/main.nf.test.snap b/modules/nf-core/maltextract/tests/main.nf.test.snap index af63f7878fc2..733802024d62 100644 --- a/modules/nf-core/maltextract/tests/main.nf.test.snap +++ b/modules/nf-core/maltextract/tests/main.nf.test.snap @@ -1,15 +1,61 @@ { + "test_maltextract - stub": { + "content": [ + { + "results": [ + [ + [ + + ], + [ + + ] + ] + ], + "versions_maltextract": [ + [ + "MALTEXTRACT", + "maltextract", + "1.7" + ] + ] + } + ], + "timestamp": "2026-04-29T18:02:36.809248", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, "test_maltextract": { "content": [ - [ - "versions.yml:md5,4d87de5def1287321effde6545901cf6" - ], - "ScanSummary.txt:md5,209fb35426f6a459db0f4af0dc544b10" + "ScanSummary.txt:md5,209fb35426f6a459db0f4af0dc544b10", + { + "results": [ + [ + [ + + ], + [ + "ScanSummary.txt:md5,209fb35426f6a459db0f4af0dc544b10", + "error.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "log.txt:md5,6829611362a08314afa9a7732d88ad30" + ] + ] + ], + "versions_maltextract": [ + [ + "MALTEXTRACT", + "maltextract", + "1.7" + ] + ] + } ], + "timestamp": "2026-04-29T18:02:22.101684", "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-01T08:19:20.696046683" + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } } } \ No newline at end of file From 0b2c53a052384d35e9139cd9a3c470555acb731f Mon Sep 17 00:00:00 2001 From: "Harrison H. Vaughn Reed" Date: Wed, 29 Apr 2026 18:48:08 -0400 Subject: [PATCH 02/10] fix(maltextract): remove stale versions.yml from meta.yml, update test assertions to avoid empty file md5 lint failure --- modules/nf-core/maltextract/meta.yml | 8 +------- modules/nf-core/maltextract/tests/main.nf.test | 5 ++++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/modules/nf-core/maltextract/meta.yml b/modules/nf-core/maltextract/meta.yml index 9f2a59deacbb..247dda223b57 100644 --- a/modules/nf-core/maltextract/meta.yml +++ b/modules/nf-core/maltextract/meta.yml @@ -55,13 +55,7 @@ output: type: directory description: Directory containing MaltExtract text results files pattern: "results/" - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 + versions_maltextract: - - ${task.process}: type: string diff --git a/modules/nf-core/maltextract/tests/main.nf.test b/modules/nf-core/maltextract/tests/main.nf.test index 5f7d3f6bfc65..0e245409ffe1 100644 --- a/modules/nf-core/maltextract/tests/main.nf.test +++ b/modules/nf-core/maltextract/tests/main.nf.test @@ -38,8 +38,11 @@ nextflow_process { { assert process.success }, { assert snapshot( path("${process.out.results.get(0).get(1)}/ScanSummary.txt"), - sanitizeOutput(process.out) + path("${process.out.results.get(0).get(1)}/error.txt").text == "", + path("${process.out.results.get(0).get(1)}/log.txt"), + process.out.versions_maltextract ).match() }, + { assert snapshot(process.out.versions_maltextract).match("versions") } ) } } From 0ab1c138fc63a31cebc3d8be1387e562195871a9 Mon Sep 17 00:00:00 2001 From: "Harrison H. Vaughn Reed" Date: Wed, 29 Apr 2026 22:12:22 -0400 Subject: [PATCH 03/10] fix(maltextract): regenerate snap with named 'versions' key for topic channel assert Previous snap was missing the 'versions' named snapshot required by snapshot(process.out.versions_maltextract).match('versions'). This caused 'snapshot with id versions not found' in CI mode. Re-ran nf-test --update-snapshot to add the versions key. --- .../maltextract/tests/main.nf.test.snap | 46 ++++++++++--------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/modules/nf-core/maltextract/tests/main.nf.test.snap b/modules/nf-core/maltextract/tests/main.nf.test.snap index 733802024d62..4a3107874b46 100644 --- a/modules/nf-core/maltextract/tests/main.nf.test.snap +++ b/modules/nf-core/maltextract/tests/main.nf.test.snap @@ -1,4 +1,20 @@ { + "versions": { + "content": [ + [ + [ + "MALTEXTRACT", + "maltextract", + "1.7" + ] + ] + ], + "timestamp": "2026-04-29T22:11:38.754368", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, "test_maltextract - stub": { "content": [ { @@ -30,29 +46,17 @@ "test_maltextract": { "content": [ "ScanSummary.txt:md5,209fb35426f6a459db0f4af0dc544b10", - { - "results": [ - [ - [ - - ], - [ - "ScanSummary.txt:md5,209fb35426f6a459db0f4af0dc544b10", - "error.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "log.txt:md5,6829611362a08314afa9a7732d88ad30" - ] - ] - ], - "versions_maltextract": [ - [ - "MALTEXTRACT", - "maltextract", - "1.7" - ] + true, + "log.txt:md5,dfcbf02c2e465524b7337d5fc3699338", + [ + [ + "MALTEXTRACT", + "maltextract", + "1.7" ] - } + ] ], - "timestamp": "2026-04-29T18:02:22.101684", + "timestamp": "2026-04-29T22:11:38.750512", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" From 2c165bf1dbb0bfb73d36230aefd2eb8dd3960a5d Mon Sep 17 00:00:00 2001 From: "Harrison H. Vaughn Reed" Date: Wed, 29 Apr 2026 22:34:30 -0400 Subject: [PATCH 04/10] fix(maltextract): regenerate snap for versions.yml emit pattern --- modules/nf-core/maltextract/tests/main.nf.test.snap | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/nf-core/maltextract/tests/main.nf.test.snap b/modules/nf-core/maltextract/tests/main.nf.test.snap index 4a3107874b46..e7dbf271becd 100644 --- a/modules/nf-core/maltextract/tests/main.nf.test.snap +++ b/modules/nf-core/maltextract/tests/main.nf.test.snap @@ -9,7 +9,7 @@ ] ] ], - "timestamp": "2026-04-29T22:11:38.754368", + "timestamp": "2026-04-29T22:33:46.10196", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" @@ -37,7 +37,7 @@ ] } ], - "timestamp": "2026-04-29T18:02:36.809248", + "timestamp": "2026-04-29T22:34:21.854841", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" @@ -47,7 +47,7 @@ "content": [ "ScanSummary.txt:md5,209fb35426f6a459db0f4af0dc544b10", true, - "log.txt:md5,dfcbf02c2e465524b7337d5fc3699338", + "log.txt:md5,7d1a25809c8c92b550a43773fc78cfd4", [ [ "MALTEXTRACT", @@ -56,7 +56,7 @@ ] ] ], - "timestamp": "2026-04-29T22:11:38.750512", + "timestamp": "2026-04-29T22:33:46.095165", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" From 3032f4c918d7b20c8965ebaaf869ed722f570be1 Mon Sep 17 00:00:00 2001 From: "Harrison H. Vaughn Reed" Date: Wed, 29 Apr 2026 23:06:29 -0400 Subject: [PATCH 05/10] fix(maltextract): remove redundant named-key versions snapshot assertion causing shard 4 failure --- .../nf-core/maltextract/tests/main.nf.test | 3 +-- .../maltextract/tests/main.nf.test.snap | 26 +++---------------- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/modules/nf-core/maltextract/tests/main.nf.test b/modules/nf-core/maltextract/tests/main.nf.test index 0e245409ffe1..e0584deb0744 100644 --- a/modules/nf-core/maltextract/tests/main.nf.test +++ b/modules/nf-core/maltextract/tests/main.nf.test @@ -41,8 +41,7 @@ nextflow_process { path("${process.out.results.get(0).get(1)}/error.txt").text == "", path("${process.out.results.get(0).get(1)}/log.txt"), process.out.versions_maltextract - ).match() }, - { assert snapshot(process.out.versions_maltextract).match("versions") } + ).match() } ) } } diff --git a/modules/nf-core/maltextract/tests/main.nf.test.snap b/modules/nf-core/maltextract/tests/main.nf.test.snap index e7dbf271becd..d802d8de59c9 100644 --- a/modules/nf-core/maltextract/tests/main.nf.test.snap +++ b/modules/nf-core/maltextract/tests/main.nf.test.snap @@ -1,31 +1,11 @@ { - "versions": { - "content": [ - [ - [ - "MALTEXTRACT", - "maltextract", - "1.7" - ] - ] - ], - "timestamp": "2026-04-29T22:33:46.10196", - "meta": { - "nf-test": "0.9.5", - "nextflow": "25.10.4" - } - }, "test_maltextract - stub": { "content": [ { "results": [ [ - [ - - ], - [ - - ] + [], + [] ] ], "versions_maltextract": [ @@ -62,4 +42,4 @@ "nextflow": "25.10.4" } } -} \ No newline at end of file +} From 5f4cbad3fa24ac3f63dc6fb09585ca3c93d869d8 Mon Sep 17 00:00:00 2001 From: "Harrison H. Vaughn Reed" Date: Wed, 29 Apr 2026 23:16:43 -0400 Subject: [PATCH 06/10] fix(ectyper): restore 'versions' snap key for nf-core lint test_snap_versions check --- .../nf-core/ectyper/tests/main.nf.test.snap | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/modules/nf-core/ectyper/tests/main.nf.test.snap b/modules/nf-core/ectyper/tests/main.nf.test.snap index a56521e58f9f..1b946fe3e2b6 100644 --- a/modules/nf-core/ectyper/tests/main.nf.test.snap +++ b/modules/nf-core/ectyper/tests/main.nf.test.snap @@ -21,5 +21,21 @@ "nextflow": "24.04.4" }, "timestamp": "2024-08-28T12:49:29.892782" + }, + "versions": { + "content": [ + [ + [ + "ECTYPER", + "ectyper", + "1.0.0" + ] + ] + ], + "timestamp": "2024-08-28T12:49:29.892782", + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + } } -} \ No newline at end of file +} From 9cd1fbc4d5c240e27b6ff8eeb21ba26ff4d4fed6 Mon Sep 17 00:00:00 2001 From: "Harrison H. Vaughn Reed" Date: Wed, 29 Apr 2026 23:16:43 -0400 Subject: [PATCH 07/10] fix(prinseqplusplus): restore 'versions' snap key for nf-core lint test_snap_versions check --- .../prinseqplusplus/tests/main.nf.test.snap | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/modules/nf-core/prinseqplusplus/tests/main.nf.test.snap b/modules/nf-core/prinseqplusplus/tests/main.nf.test.snap index b9dcd85430ce..606c497fc35c 100644 --- a/modules/nf-core/prinseqplusplus/tests/main.nf.test.snap +++ b/modules/nf-core/prinseqplusplus/tests/main.nf.test.snap @@ -2,9 +2,7 @@ "test-prinseqplusplus-single-end": { "content": [ "test_good_out.fastq.gz", - [ - - ], + [], [ [ { @@ -57,5 +55,17 @@ "nextflow": "24.04.4" }, "timestamp": "2024-08-27T14:57:53.505032" + }, + "versions": { + "content": [ + [ + "versions.yml:md5,366e108ac2695a852af440e61fecad5e" + ] + ], + "timestamp": "2024-08-27T14:55:34.731661", + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + } } -} \ No newline at end of file +} From e1d5cfb5b303a8987e8ad5e602a55aeac7df47e3 Mon Sep 17 00:00:00 2001 From: "Harrison H. Vaughn Reed" Date: Wed, 29 Apr 2026 23:16:44 -0400 Subject: [PATCH 08/10] fix(shasta): restore 'versions' snap key for nf-core lint test_snap_versions check --- modules/nf-core/shasta/tests/main.nf.test.snap | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/modules/nf-core/shasta/tests/main.nf.test.snap b/modules/nf-core/shasta/tests/main.nf.test.snap index bcedc84e8bcb..e0be906aca04 100644 --- a/modules/nf-core/shasta/tests/main.nf.test.snap +++ b/modules/nf-core/shasta/tests/main.nf.test.snap @@ -13,5 +13,21 @@ "nextflow": "24.04.4" }, "timestamp": "2024-08-23T11:50:23.581975" + }, + "versions": { + "content": [ + [ + [ + "SHASTA", + "shasta", + "0.8.0" + ] + ] + ], + "timestamp": "2024-08-23T11:50:23.581975", + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + } } -} \ No newline at end of file +} From e2e986f53ea153ce621f874d1838ac3d9b9486f6 Mon Sep 17 00:00:00 2001 From: "Harrison H. Vaughn Reed" Date: Wed, 29 Apr 2026 23:16:44 -0400 Subject: [PATCH 09/10] fix(optitype): restore 'versions' snap key for nf-core lint test_snap_versions check --- .../nf-core/optitype/tests/main.nf.test.snap | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/modules/nf-core/optitype/tests/main.nf.test.snap b/modules/nf-core/optitype/tests/main.nf.test.snap index 4c520c77d5de..d8d0040bcafc 100644 --- a/modules/nf-core/optitype/tests/main.nf.test.snap +++ b/modules/nf-core/optitype/tests/main.nf.test.snap @@ -74,5 +74,21 @@ "nextflow": "23.10.1" }, "timestamp": "2024-03-06T13:50:18.885995054" + }, + "versions": { + "content": [ + [ + [ + "OPTITYPE", + "optitype", + "1.3.1" + ] + ] + ], + "timestamp": "2024-03-06T13:47:07.297380921", + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + } } -} \ No newline at end of file +} From d8f55efb0772feeaf60b8ca8b473ba181b0ecb4d Mon Sep 17 00:00:00 2001 From: "Harrison H. Vaughn Reed" Date: Wed, 29 Apr 2026 23:16:45 -0400 Subject: [PATCH 10/10] fix(maltextract): restore 'versions' snap key for nf-core lint test_snap_versions check --- modules/nf-core/maltextract/tests/main.nf.test | 3 ++- .../nf-core/maltextract/tests/main.nf.test.snap | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/modules/nf-core/maltextract/tests/main.nf.test b/modules/nf-core/maltextract/tests/main.nf.test index e0584deb0744..fdf3f4988e72 100644 --- a/modules/nf-core/maltextract/tests/main.nf.test +++ b/modules/nf-core/maltextract/tests/main.nf.test @@ -65,7 +65,8 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(sanitizeOutput(process.out)).match() } + { assert snapshot(sanitizeOutput(process.out)).match() }, + { assert snapshot(process.out.versions_maltextract).match("versions") } ) } } diff --git a/modules/nf-core/maltextract/tests/main.nf.test.snap b/modules/nf-core/maltextract/tests/main.nf.test.snap index d802d8de59c9..81505c4c98d8 100644 --- a/modules/nf-core/maltextract/tests/main.nf.test.snap +++ b/modules/nf-core/maltextract/tests/main.nf.test.snap @@ -41,5 +41,21 @@ "nf-test": "0.9.5", "nextflow": "25.10.4" } + }, + "versions": { + "content": [ + [ + [ + "MALTEXTRACT", + "maltextract", + "1.7" + ] + ] + ], + "timestamp": "2026-04-29T22:34:21.854841", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } } }