nf-core_modules/tests/modules/jupyternotebook/main.nf
Gregor Sturm 2ad98162f3
Notebook modules (#617)
* Draft rmarkdown module

* stub jupyter notebook module

* Create yaml file with params

* Update meta.yml for rmarkdown module

* Add comment on YAML

* Update notebooks module, clean up parametrize.nf

* Two separate channels for parameters and input files

* Fix Rmd render script

* Add tests for rmarkdown

* Fix tests for rmarkdown module

* Update checksums

* Fix tests for jupyter

* Test without Grab()

* Update software versions

* update rmarkdown dependencies

* Draft for multiple versions

* Fix indent of script

* Fix indent in rmarkdown script

* Emit version.syml

* Update modules/rmarkdown/main.nf

Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>

* Update modules/rmarkdown/meta.yml

Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>

* Update modules/rmarkdown/meta.yml

Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>

* Rename rmarkdown to rmarkdownnotebook

* Add rmarkdown mulled biocontainer

* Write sessionInfo to separate log file

* Update rmarkdownnotebook

* Sessioninfo does not have a stable md5sum

* Update jupyternotebook

* Update meta

* Add jupyternotebook biocontainers

* Handle Groovy Gstrings in parameterize

* Update to versions.yml

* Update functions.nf

* Fix versions yaml

* Fix EC lint

* Update modules/rmarkdownnotebook/main.nf

Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>

* Update modules/jupyternotebook/main.nf

Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>

* Use official test data

* Harshilify

* Make parameters channel clearer

* Apply suggestions from code review

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>

* Apply suggestions from code review

* Update main.nf

Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>
Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
2021-10-24 20:51:56 +02:00

49 lines
1.4 KiB
Text

#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { JUPYTERNOTEBOOK } from '../../../modules/jupyternotebook/main.nf' addParams(
parametrize: false, options: [:]
)
include { JUPYTERNOTEBOOK as JUPYTERNOTEBOOK_PARAMETRIZE } from '../../../modules/jupyternotebook/main.nf' addParams(
options: [:]
)
include { JUPYTERNOTEBOOK as JUPYTERNOTEBOOK_PARAMETRIZE_IPYNB } from '../../../modules/jupyternotebook/main.nf' addParams(
options: [:]
)
workflow test_jupyternotebook {
input = [ [ id:'test_jupyter' ], // meta map
file(params.test_data['generic']['notebooks']['ipython_md'], checkIfExists: true) ]
JUPYTERNOTEBOOK ( input, [:], [])
}
workflow test_jupyternotebook_parametrize {
input = [ [ id:'test_jupyter' ], // meta map
file(params.test_data['generic']['notebooks']['ipython_md'], checkIfExists: true) ]
JUPYTERNOTEBOOK_PARAMETRIZE(
input,
[input_filename: "hello.txt", n_iter: 12],
file(params.test_data['generic']['txt']['hello'], checkIfExists: true)
)
}
workflow test_jupyternotebook_parametrize_ipynb {
input = [ [ id:'test_jupyter' ], // meta map
file(params.test_data['generic']['notebooks']['ipython_ipynb'], checkIfExists: true) ]
JUPYTERNOTEBOOK_PARAMETRIZE_IPYNB(
input,
[input_filename: "hello.txt", n_iter: 12],
file(params.test_data['generic']['txt']['hello'], checkIfExists: true)
)
}