Skip to content

Commit

Permalink
Deprecate module addParams() and params()
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Sherman <[email protected]>
  • Loading branch information
bentsherman committed Jul 26, 2024
1 parent 2fb5bc0 commit 7a6681b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ workflow {

## Module parameters

:::{deprecated} 24.07.0-edge
As a best practice, parameters should be used in the entry workflow and passed to functions / processes / workflows as explicit inputs.
:::

A module script can define parameters using the same syntax as a Nextflow workflow script:

```groovy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,13 @@ class IncludeDef {
}

IncludeDef params(Map args) {
log.warn "Include with `params()` is deprecated -- pass params as a workflow or process input instead"
this.params = args != null ? new HashMap(args) : null
return this
}

IncludeDef addParams(Map args) {
log.warn "Include with `addParams()` is deprecated -- pass params as a workflow or process input instead"
this.addedParams = args
return this
}
Expand Down

0 comments on commit 7a6681b

Please sign in to comment.