-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nextflow runner: throw error when using a non-existent argument in a …
…map passed to fromState (#793)
- Loading branch information
1 parent
7ebb587
commit 557abe6
Showing
7 changed files
with
124 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/test/resources/testnextflowvdsl3/src/test_wfs/invalid_fromstate_argument/config.vsh.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: invalid_fromstate_argument | ||
namespace: test_wfs | ||
resources: | ||
- type: nextflow_script | ||
path: main.nf | ||
entrypoint: base | ||
# TODO: make absolute when the ns build uses the right CWD | ||
- path: ../../../resources | ||
dependencies: | ||
- name: sub_workflow | ||
platforms: | ||
- type: nextflow |
33 changes: 33 additions & 0 deletions
33
src/test/resources/testnextflowvdsl3/src/test_wfs/invalid_fromstate_argument/main.nf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
workflow base { | ||
take: input_ch | ||
main: | ||
|
||
// generate list from 0 to 1000 | ||
ch = Channel.fromList(0..1000) | ||
| map { num -> | ||
// create temporary file | ||
def file = tempFile() | ||
file.write("num: $num") | ||
|
||
["num$num", [ file: file ], ["num": num]] | ||
} | ||
| sub_workflow.run( | ||
fromState: [ | ||
"file": "file", | ||
"thisargumentdoesnotexist": "file", // this should raise | ||
], | ||
toState: {id, output, state -> | ||
def newState = [ | ||
"step1_output": output.output, | ||
"num": state.num, | ||
"file": state.file, | ||
"thisargumentdoesnotexist": "foo" | ||
] | ||
return newState | ||
} | ||
) | ||
|
||
|
||
emit: | ||
input_ch | ||
} |
12 changes: 12 additions & 0 deletions
12
src/test/resources/testnextflowvdsl3/src/test_wfs/invalid_tostate_argument/config.vsh.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: invalid_tostate_argument | ||
namespace: test_wfs | ||
resources: | ||
- type: nextflow_script | ||
path: main.nf | ||
entrypoint: base | ||
# TODO: make absolute when the ns build uses the right CWD | ||
- path: ../../../resources | ||
dependencies: | ||
- name: sub_workflow | ||
platforms: | ||
- type: nextflow |
28 changes: 28 additions & 0 deletions
28
src/test/resources/testnextflowvdsl3/src/test_wfs/invalid_tostate_argument/main.nf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
workflow base { | ||
take: input_ch | ||
main: | ||
|
||
// generate list from 0 to 1000 | ||
ch = Channel.fromList(0..1000) | ||
| map { num -> | ||
// create temporary file | ||
def file = tempFile() | ||
file.write("num: $num") | ||
|
||
["num$num", [ file: file ], ["num": num]] | ||
} | ||
| sub_workflow.run( | ||
fromState: [ | ||
"file": "file", | ||
], | ||
toState: [ | ||
"step1_output": "output", | ||
"file": "file", | ||
"newkey": "thisargumentdoesnotexist" // This should raise | ||
] | ||
) | ||
|
||
|
||
emit: | ||
input_ch | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters