From ae9e068dd808bb5d08285ac251039e4537948f82 Mon Sep 17 00:00:00 2001 From: Max Cummins Date: Thu, 22 Jan 2026 14:17:43 +0000 Subject: [PATCH] migrate untar to versions topic --- modules/nf-core/untar/main.nf | 12 +-- modules/nf-core/untar/meta.yml | 28 +++++-- modules/nf-core/untar/tests/main.nf.test.snap | 80 +++++++++++++------ 3 files changed, 79 insertions(+), 41 deletions(-) diff --git a/modules/nf-core/untar/main.nf b/modules/nf-core/untar/main.nf index e712ebe63ab5..fa4642583a63 100644 --- a/modules/nf-core/untar/main.nf +++ b/modules/nf-core/untar/main.nf @@ -12,7 +12,7 @@ process UNTAR { output: tuple val(meta), path("${prefix}"), emit: untar - path "versions.yml", emit: versions + tuple val("${task.process}"), val('tar'), eval("tar --version | head -n 1 | cut -f4 -d ' '"), topic: versions, emit: versions_tar when: task.ext.when == null || task.ext.when @@ -42,11 +42,6 @@ process UNTAR { ${archive} \\ ${args2} fi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - untar: \$(echo \$(tar --version 2>&1) | sed 's/^.*(GNU tar) //; s/ Copyright.*\$//') - END_VERSIONS """ stub: @@ -75,10 +70,5 @@ process UNTAR { fi done fi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - untar: \$(echo \$(tar --version 2>&1) | sed 's/^.*(GNU tar) //; s/ Copyright.*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/untar/meta.yml b/modules/nf-core/untar/meta.yml index 1603e3829658..db20b1ec0d05 100644 --- a/modules/nf-core/untar/meta.yml +++ b/modules/nf-core/untar/meta.yml @@ -38,18 +38,34 @@ output: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] pattern: "*/" + versions_tar: + - - ${task.process}: + type: string + description: The name of the process + - tar: + type: string + description: The name of the tool + - "tar --version | head -n 1 | cut -f4 -d ' '": + type: eval + description: The expression to obtain 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 + - tar: + type: string + description: The name of the tool + - "tar --version | head -n 1 | cut -f4 -d ' '": + type: eval + description: The expression to obtain the version of the tool authors: - "@joseespinosa" - "@drpatelh" - "@matthdsm" - "@jfy133" + - "@eit-maxlcummins" maintainers: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/untar/tests/main.nf.test.snap b/modules/nf-core/untar/tests/main.nf.test.snap index ceb91b7925ca..52b0e728eab8 100644 --- a/modules/nf-core/untar/tests/main.nf.test.snap +++ b/modules/nf-core/untar/tests/main.nf.test.snap @@ -13,7 +13,11 @@ ] ], "1": [ - "versions.yml:md5,6063247258c56fd271d076bb04dd7536" + [ + "UNTAR", + "tar", + "1.34" + ] ], "untar": [ [ @@ -25,16 +29,20 @@ ] ] ], - "versions": [ - "versions.yml:md5,6063247258c56fd271d076bb04dd7536" + "versions_tar": [ + [ + "UNTAR", + "tar", + "1.34" + ] ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-07-10T12:04:28.231047" + "timestamp": "2026-01-22T14:15:23.063536907" }, "test_untar_onlyfiles - stub": { "content": [ @@ -50,7 +58,11 @@ ] ], "1": [ - "versions.yml:md5,6063247258c56fd271d076bb04dd7536" + [ + "UNTAR", + "tar", + "1.34" + ] ], "untar": [ [ @@ -62,16 +74,20 @@ ] ] ], - "versions": [ - "versions.yml:md5,6063247258c56fd271d076bb04dd7536" + "versions_tar": [ + [ + "UNTAR", + "tar", + "1.34" + ] ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-07-10T12:04:45.773103" + "timestamp": "2026-01-22T14:15:34.84221815" }, "test_untar - stub": { "content": [ @@ -89,7 +105,11 @@ ] ], "1": [ - "versions.yml:md5,6063247258c56fd271d076bb04dd7536" + [ + "UNTAR", + "tar", + "1.34" + ] ], "untar": [ [ @@ -103,16 +123,20 @@ ] ] ], - "versions": [ - "versions.yml:md5,6063247258c56fd271d076bb04dd7536" + "versions_tar": [ + [ + "UNTAR", + "tar", + "1.34" + ] ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-07-10T12:04:36.777441" + "timestamp": "2026-01-22T14:15:28.946517024" }, "test_untar": { "content": [ @@ -130,7 +154,11 @@ ] ], "1": [ - "versions.yml:md5,6063247258c56fd271d076bb04dd7536" + [ + "UNTAR", + "tar", + "1.34" + ] ], "untar": [ [ @@ -144,15 +172,19 @@ ] ] ], - "versions": [ - "versions.yml:md5,6063247258c56fd271d076bb04dd7536" + "versions_tar": [ + [ + "UNTAR", + "tar", + "1.34" + ] ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-07-10T12:04:19.377674" + "timestamp": "2026-01-22T14:15:17.05337819" } } \ No newline at end of file