-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: respect
allow_nested_inputs
in workflows.
This commit respects `allow_nested_inputs`: * With `allow_nested_inputs` or `allowNestedInputs` in a workflow `hints` section in 1.2. * With `allowNestedInputs` in a workflow `meta` section in 1.1 and 1.2. * By default in 1.0. When set, the check for required inputs will be suppressed.
- Loading branch information
1 parent
48ad131
commit 549375c
Showing
8 changed files
with
160 additions
and
5 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
Empty file.
28 changes: 28 additions & 0 deletions
28
wdl-analysis/tests/analysis/allow-nested-inputs-1.0/source.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 @@ | ||
## This is a test of allowed nested inputs in 1.0. | ||
## This should be accepted without diagnostics. | ||
version 1.0 | ||
|
||
task my_task { | ||
input { | ||
# Required | ||
String required | ||
# Optional | ||
String? optional | ||
# Defaulted | ||
String defaulted = "default" | ||
} | ||
|
||
command <<<>>> | ||
} | ||
|
||
workflow my_workflow { | ||
# Missing required input | ||
call my_task | ||
|
||
# OK | ||
call my_task as my_task2 { input: required = "required" } | ||
|
||
# OK | ||
call my_task as my_task3 { input: required = "required", optional = "optional", defaulted = "defaulted" } | ||
} |
Empty file.
32 changes: 32 additions & 0 deletions
32
wdl-analysis/tests/analysis/allow-nested-inputs-1.1/source.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,32 @@ | ||
## This is a test of allowed nested inputs in 1.1. | ||
## This should be accepted without diagnostics. | ||
version 1.1 | ||
|
||
task my_task { | ||
input { | ||
# Required | ||
String required | ||
# Optional | ||
String? optional | ||
# Defaulted | ||
String defaulted = "default" | ||
} | ||
|
||
command <<<>>> | ||
} | ||
|
||
workflow my_workflow { | ||
meta { | ||
allowNestedInputs: true | ||
} | ||
|
||
# Missing required input | ||
call my_task | ||
|
||
# OK | ||
call my_task as my_task2 { input: required = "required" } | ||
|
||
# OK | ||
call my_task as my_task3 { input: required = "required", optional = "optional", defaulted = "defaulted" } | ||
} |
Empty file.
32 changes: 32 additions & 0 deletions
32
wdl-analysis/tests/analysis/allow-nested-inputs-1.2/source.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,32 @@ | ||
## This is a test of allowed nested inputs in 1.2. | ||
## This should be accepted without diagnostics. | ||
version 1.2 | ||
|
||
task my_task { | ||
input { | ||
# Required | ||
String required | ||
# Optional | ||
String? optional | ||
# Defaulted | ||
String defaulted = "default" | ||
} | ||
|
||
command <<<>>> | ||
} | ||
|
||
workflow my_workflow { | ||
hints { | ||
allow_nested_inputs: true | ||
} | ||
|
||
# Missing required input | ||
call my_task | ||
|
||
# OK | ||
call my_task as my_task2 { input: required = "required" } | ||
|
||
# OK | ||
call my_task as my_task3 { input: required = "required", optional = "optional", defaulted = "defaulted" } | ||
} |
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