-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow nested inputs when corresponding meta setting is set to true
This implements part of the spec change that handles inputs openwdl/wdl#359
- Loading branch information
1 parent
f93da32
commit aded97f
Showing
8 changed files
with
76 additions
and
13 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
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
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
28 changes: 28 additions & 0 deletions
28
...s/validate/wdl_draft3/valid/supplied_optional_subwf_sub_inputs_meta_enabled/import_me.wdl
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 @@ | ||
version 1.0 | ||
|
||
workflow sub_wf { | ||
input { | ||
Int y | ||
} | ||
# Calls foo but doesn't provide an 'x'. That's fine because the input was optional, but now the outer WF cannot override it. | ||
call foo { input: y = y } | ||
|
||
# No outputs, but we don't want that to be the error: | ||
output { } | ||
meta {allowNestedInputs: true} | ||
} | ||
|
||
task foo { | ||
input { | ||
Int? x | ||
Int y | ||
} | ||
command { | ||
} | ||
output { | ||
Int z = y | ||
} | ||
runtime { | ||
docker: "ubuntu:latest" | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
...subwf_sub_inputs_meta_enabled/supplied_optional_subwf_sub_inputs_meta_enabled.inputs.json
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,4 @@ | ||
{ | ||
"supplied_optional_subwf_sub_inputs.y": 5, | ||
"supplied_optional_subwf_sub_inputs.sub_wf.foo.x": 5 | ||
} |
14 changes: 14 additions & 0 deletions
14
...ptional_subwf_sub_inputs_meta_enabled/supplied_optional_subwf_sub_inputs_meta_enabled.wdl
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,14 @@ | ||
version 1.0 | ||
|
||
import "import_me.wdl" | ||
|
||
workflow supplied_optional_subwf_sub_inputs { | ||
input { | ||
Int y | ||
} | ||
# Shouldn't (strictly) be able to call this sub-workflow because the inputs are not passed through | ||
call import_me.sub_wf {input: y=y} | ||
meta { | ||
allowNestedInputs: true | ||
} | ||
} |