wdl
wdl copied to clipboard
Various fixes for WDL examples
Contains various fixes that should allow most of the unit tests to work. There are a handful examples that I am unable to verify though. There may be some overlap with #669, so ideally that PR should be merged first.
Summary of changes (since #669):
Behavioral changes:
placeholder_coercion.wdl
and import_structs.wdl
were changed to have a file input rather than coercing from a string. This is mainly done as the workflows likely want the files to exist, and handling file inputs from the json side is easier when extracting the data directory to different locations (ex). This change isn't too important though.
Other:
task_outputs.wdl
:
wc -l filename
will print filename: 3 filename
, so only output the word count.
nested_access.wdl
:
Map of data variable has conflicting types between declaration and access. Input json expects [String, Int]
and definition expects [String, Float]
. For simplicity, I changed this to [String, String]
, but the example may make less sense as weight access is no longer used. If needed, maybe the example should be altered a bit to support holding weights in the data variable or elsewhere.
placeholders.wdl
:
Typo in placeholders.input for input json, should be instr
instead of input
. Also missing an output variable for var s
flags_task.wdl
:
Output is int instead of string, so change json output to a string.
person_struct_task.wdl
:
Wrong namespace for person
in input json and output json, should be greet_person.person
. The if comparison also needs an int, not a string or float (line 4 of command section), so added a round call.
import_structs.wdl
:
Output type is int instead of float (might be more pedantic?), so change to float.
test_placeholders_task.wdl
:
For printf
in the command section, the value needs to be quoted else only first argument is printed.
glob_task.wdl
:
Needs braces around int loop to loop properly.
relative_and_absolute_task.wdl
:
Wrong output type of file instead of string, so change to string.
This test also needs to be ran with sudo (if the user does not have access to /root
), maybe this should be a dependency?
optional_output_task.wdl
:
Has if do
instead of if then
. Also added the rest of task outputs
runtime_container_task.wdl
:
Example json output is_true
should be a string instead of bool. (Alternatively, the WDL code could output a bool)
test_hints_task.wdl
and input_hint_task.wdl
:
Says they are optional but not marked as optional priority, so add the priority.
ex_parameter_meta_task.wdl
:
Output is a string not an int. Typo in name (paramter
). Bash script also needs to strip away filename. Output is also incorrect; should be 2 instead of 3 as greetings.txt
has only 2 newlines. (Alternatively, maybe greetings.txt should end with a newline)
other.wdl
:
Drop the filename when outputting the number of lines with wc
; wc file
to wc < file
to drop the filename.
Changed output to 2
main.wdl
:
Add a newline so wc
can count 1 line.
call_example.wdl
:
Int loop in repeat task is broken.
nested_scatter.wdl
:
Array was reversed
test_conditional.wdl
:
Was missing a variable in the output json.
test_max.wdl
:
Wrong output for min1
and min2
. The names are also technically incorrect as these are maximum values not minimum. Maybe these should change too?
test_sub.wdl
:
Regex does not match output. Newline is not equal space so when\n
won't be matched. Also [:alpha:]
doesn't seem to work, and there are no modifiers by default. So only expect one substitute in the output json.
gen_files_task.wdl
:
Fix int loop in bash by surrounding int with braces.
echo_stdout.wdl
:
Wrong output type in WDL
echo_stderr.wdl
:
Wrong output type in WDL
read_map_task.wdl
:
Output bash to stdout.
test_suffix.wdl
:
Remove excess space.
test_range.wdl
:
Wrong name for input json. Fix double task to double instead of square.
serialize_map.wdl
:
Fix int loop to start from 0
serde_map_tsv_task.wdl
:
Read from stdout as that is where the tsv output is
serde_map_json_task.wdl
:
Switch output to int as that is the expected output json type.
Checklist
- [ ] Pull request details were added to CHANGELOG.md
- [ ] Valid examples WDL's were added or updated to the SPEC.md (see the guide on writing markdown tests)