diff --git a/modules/nf-core/ssuissero/main.nf b/modules/nf-core/ssuissero/main.nf index 7abc7a8a8841..12b4a8703471 100644 --- a/modules/nf-core/ssuissero/main.nf +++ b/modules/nf-core/ssuissero/main.nf @@ -13,7 +13,8 @@ process SSUISSERO { output: tuple val(meta), path("*.tsv"), emit: tsv - path "versions.yml" , emit: versions + // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. + tuple val("${task.process}"), val('ssuissero'), val('1.0.1'), emit: versions_ssuissero, topic: versions when: task.ext.when == null || task.ext.when @@ -22,7 +23,6 @@ process SSUISSERO { def prefix = task.ext.prefix ?: "${meta.id}" def is_compressed = fasta.getName().endsWith(".gz") ? true : false def fasta_name = fasta.getName().replace(".gz", "") - def VERSION = '1.0.1' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. """ if [ "$is_compressed" == "true" ]; then gzip -c -d $fasta > $fasta_name @@ -34,10 +34,11 @@ process SSUISSERO { -s $prefix \\ -x fasta \\ -t $task.cpus + """ - cat <<-END_VERSIONS > versions.yml - "${task.process}": - ssuissero: $VERSION - END_VERSIONS + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.tsv """ } diff --git a/modules/nf-core/ssuissero/meta.yml b/modules/nf-core/ssuissero/meta.yml index 16779249504f..ee92930f8259 100644 --- a/modules/nf-core/ssuissero/meta.yml +++ b/modules/nf-core/ssuissero/meta.yml @@ -10,7 +10,8 @@ tools: homepage: https://github.com/jimmyliu1326/SsuisSero documentation: https://github.com/jimmyliu1326/SsuisSero tool_dev_url: https://github.com/jimmyliu1326/SsuisSero - licence: ["MIT"] + licence: + - "MIT" identifier: "" input: - - meta: @@ -35,14 +36,28 @@ output: description: Tab-delimited serotype prediction pattern: "*.{tsv}" ontologies: - - edam: http://edamontology.org/format_3475 # TSV + - edam: http://edamontology.org/format_3475 + versions_ssuissero: + - - ${task.process}: + type: string + description: The name of the process + - ssuissero: + type: string + description: The name of the tool + - 1.0.1: + type: string + description: The version of the tool +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The name of the process + - ssuissero: + type: string + description: The name of the tool + - 1.0.1: + type: string + description: The version of the tool authors: - "@rpetit3" maintainers: diff --git a/modules/nf-core/ssuissero/tests/main.nf.test b/modules/nf-core/ssuissero/tests/main.nf.test index e8e68a20573a..957d42b376d4 100644 --- a/modules/nf-core/ssuissero/tests/main.nf.test +++ b/modules/nf-core/ssuissero/tests/main.nf.test @@ -15,9 +15,9 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/prokaryotes/haemophilus_influenzae/genome/genome.fna.gz', checkIfExists: true) - ] + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/prokaryotes/haemophilus_influenzae/genome/genome.fna.gz', checkIfExists: true) + ] """ } @@ -26,7 +26,31 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + } + + test("test-ssuissero - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/prokaryotes/haemophilus_influenzae/genome/genome.fna.gz', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(sanitizeOutput(process.out)).match() } ) } } diff --git a/modules/nf-core/ssuissero/tests/main.nf.test.snap b/modules/nf-core/ssuissero/tests/main.nf.test.snap index f121e1237a72..e5aa2f5ee082 100644 --- a/modules/nf-core/ssuissero/tests/main.nf.test.snap +++ b/modules/nf-core/ssuissero/tests/main.nf.test.snap @@ -1,19 +1,34 @@ { - "test-ssuissero": { + "test-ssuissero - stub": { "content": [ { - "0": [ + "tsv": [ [ { "id": "test", "single_end": false }, - "test_serotyping_res.tsv:md5,559dd2ca386eeb58f3975e3204ce9d43" + "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "1": [ - "versions.yml:md5,1343a6174c619ccf3c2469b19ab0a757" - ], + "versions_ssuissero": [ + [ + "SSUISSERO", + "ssuissero", + "1.0.1" + ] + ] + } + ], + "timestamp": "2026-04-29T16:20:03.264528", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, + "test-ssuissero": { + "content": [ + { "tsv": [ [ { @@ -23,15 +38,19 @@ "test_serotyping_res.tsv:md5,559dd2ca386eeb58f3975e3204ce9d43" ] ], - "versions": [ - "versions.yml:md5,1343a6174c619ccf3c2469b19ab0a757" + "versions_ssuissero": [ + [ + "SSUISSERO", + "ssuissero", + "1.0.1" + ] ] } ], + "timestamp": "2026-04-29T16:19:56.700719", "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" - }, - "timestamp": "2024-08-27T12:14:54.198227" + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } } } \ No newline at end of file