Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update dev docs and test workflow #31

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
stevekm marked this conversation as resolved.
Show resolved Hide resolved

```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")
stevekm marked this conversation as resolved.
Show resolved Hide resolved
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)
}
Loading