From 550377edf95f513caa9ba7f8fea36d69d7b50be3 Mon Sep 17 00:00:00 2001 From: Ben Sherman Date: Thu, 6 Feb 2025 09:17:52 -0600 Subject: [PATCH] cleanup Signed-off-by: Ben Sherman --- README.md | 2 +- tests/nextflow.config | 12 ++++++++++++ tests/test.nf | 27 ++++++++++++--------------- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 85a463a..d6f05e8 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ An alternative method to build and test the plugin for development purposes: make install # run with regular nextflow install -nextflow run tests/test.nf +nextflow run tests/test.nf -plugins nf-prov@ ``` ## Package, Upload, and Publish diff --git a/tests/nextflow.config b/tests/nextflow.config index 82b9e4d..213540d 100644 --- a/tests/nextflow.config +++ b/tests/nextflow.config @@ -23,10 +23,22 @@ prov { wrroc { file = "${params.outdir}/ro-crate-metadata.json" overwrite = true + license = "https://spdx.org/licenses/Apache-2.0" } } } manifest { + name = "nf-prov-test" + contributors = [ + [name: "Bruno Grande", contribution: ["AUTHOR"]], + [name: "Ben Sherman", contribution: ["MAINTAINER"]], + [name: "Stephen Kelly", contribution: ["CONTRIBUTOR"]] + ] + homePage = "https://github.com/nextflow-io/nf-prov" + description = "Test pipeline for nf-prov" + mainScript = "test.nf" + nextflowVersion = "!>=24.10.0" + version = "0.3.0" license = "https://spdx.org/licenses/Apache-2.0" } diff --git a/tests/test.nf b/tests/test.nf index dc3d37a..c86738c 100644 --- a/tests/test.nf +++ b/tests/test.nf @@ -1,45 +1,42 @@ -nextflow.enable.dsl=2 -process RNG { +params.constant = "foo" + +process ECHO_SCRIPT { tag "${prefix}" - publishDir "${params.outdir}", mode: 'copy' + publishDir params.outdir, mode: 'copy' input: tuple val(prefix), val(constant) output: - tuple val(prefix), val(constant), emit: 'values' - path "*.txt", emit: 'file' + tuple val(prefix), val(constant), path("*.txt") script: """ echo \$RANDOM > ${prefix}.${constant}.1.txt echo \$RANDOM > ${prefix}.${constant}.2.txt """ - } -// shows nf-prov behavior with exec tasks -process EXEC_FOO { +process ECHO_EXEC { tag "${prefix}" - publishDir "${params.outdir}", mode: 'copy' + publishDir params.outdir, mode: 'copy' input: tuple val(prefix), val(constant) output: - path(outputfile), emit: "txt" + path(outfile), emit: txt exec: - outputfile = task.workDir.resolve("${prefix}.exec_foo.txt") - outputfile.write(prefix) + outfile = "${prefix}.exec.txt" + task.workDir.resolve(outfile).write(prefix) } workflow { prefixes_ch = channel.from('r1', 'r2', 'r3') constant_ch = channel.of(params.constant) inputs_ch = prefixes_ch.combine(constant_ch) - RNG(inputs_ch) - RNG.output.values.view() - EXEC_FOO(inputs_ch) + ECHO_SCRIPT(inputs_ch) + ECHO_EXEC(inputs_ch) }