Skip to content

Commit

Permalink
Merge branch 'master' of github.com:stevekm/nf-prov
Browse files Browse the repository at this point in the history
  • Loading branch information
stevekm committed May 21, 2024
2 parents 1d0458a + 444a567 commit 05c3569
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 30 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,17 @@ mv -f settings.gradle.bkp settings.gradle
./launch.sh run test.nf -plugins nf-prov
```

An alternative method to build and test the plugin for development purposes;

```bash
# builds the plugin .zip and copies it to the local ${HOME}/.nextflow/plugins,
# removing any pre-existing version
make install

# run with an externally installed nextflow using the included test workflow & config
nextflow run tests/test.nf
```

## Package, Upload, and Publish

The project should hosted in a GitHub repository whose name should match the name of the plugin,
Expand Down Expand Up @@ -122,6 +133,6 @@ Following these step to package, upload and publish the plugin:
./gradlew :plugins:nf-prov:upload
```

4. Create a pull request against the [nextflow-io/plugins](https://github.com/nextflow-io/plugins/blob/main/plugins.json)
project to make the plugin public accessible to Nextflow app.
4. Create a pull request against the [nextflow-io/plugins](https://github.com/nextflow-io/plugins/blob/main/plugins.json)
project to make the plugin public accessible to Nextflow app.

24 changes: 0 additions & 24 deletions nextflow.config

This file was deleted.

26 changes: 26 additions & 0 deletions tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
plugins {
id 'nf-prov'
}

params {
outdir = "results"
constant = "foo"
}

prov {
formats {
bco {
file = "${params.outdir}/bco.json"
overwrite = true
}
dag {
file = "${params.outdir}/dag.html"
overwrite = true
}
legacy {
file = "${params.outdir}/manifest.json"
overwrite = true
}
}
}

manifest {
name = "nf-prov-test"
author = "Bruno Grande"
Expand Down
23 changes: 19 additions & 4 deletions tests/test.nf
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
nextflow.enable.dsl=2

params.constant = "foo"

process RNG {

publishDir "results", mode: 'copy'
tag "${prefix}"
publishDir "${params.outdir}", mode: 'copy'

input:
tuple val(prefix), val(constant)
Expand All @@ -21,10 +19,27 @@ process RNG {

}

// shows nf-prov behavior with exec tasks
process EXEC_FOO {
tag "${prefix}"
publishDir "${params.outdir}", mode: 'copy'

input:
tuple val(prefix), val(constant)

output:
path(outputfile)

exec:
outputfile = new File("${task.workDir}/${prefix}.exec_foo.txt")
outputfile.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)
}

0 comments on commit 05c3569

Please sign in to comment.