Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.1 Spec #428

Merged
merged 111 commits into from
Jan 29, 2021
Merged
Show file tree
Hide file tree
Changes from 102 commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
b526c86
Regular expression evaluation should be fixed.
rhpvorderman Aug 10, 2018
a7ba3e8
change perl to posix
rhpvorderman Aug 20, 2018
1413daa
remove redundant escape character
rhpvorderman Sep 13, 2018
8e91963
add examples
rhpvorderman Sep 13, 2018
84b9a7a
Defined Struct literals
patmagee Dec 14, 2018
34e8306
Made struct literals more Pythonic
patmagee Jan 18, 2019
fc0d0c5
fixed example for struct literal
patmagee Jan 18, 2019
bef5343
Removed references to object literal
patmagee Feb 13, 2019
c400329
Fixed typos
patmagee Mar 27, 2019
507ba47
Fixed more spelling errors
patmagee Mar 27, 2019
663d592
- add min, max to list of standard library methods
pshapiro4broad Apr 3, 2019
ff4f8b7
min, max can accept both Float and/or Int
pshapiro4broad Apr 4, 2019
3292bff
english
pshapiro4broad Apr 4, 2019
6454db1
Changed Struct literal notation
patmagee Apr 16, 2019
ed70e06
Add section on file outputs including optional outputs
jtratner Apr 21, 2019
9acf43e
Added hints and clarified runtime section
patmagee May 31, 2019
80528ad
Merge branch 'master' of https://github.com/OpenWDL/wdl into hints-an…
patmagee May 31, 2019
9862318
Fixed spelling mistakes
patmagee May 31, 2019
c47ff8e
Minor fixes
patmagee May 31, 2019
0a382c4
Added default definitions for runtime values
patmagee Jun 5, 2019
86f7a87
Spelling fixes
patmagee Jun 5, 2019
8a69446
fixed copy paste error
patmagee Jun 6, 2019
7b8d532
Folded in changes from #313
patmagee Jul 19, 2019
1850a2f
Update SPEC.md
jtratner Aug 12, 2019
e11018a
Update versions/1.0/SPEC.md
jtratner Aug 12, 2019
e59f111
clarify subworkflow namespacing
DavyCats Nov 8, 2019
37d76ab
typo
DavyCats Nov 8, 2019
c69e712
further clarification on namespace, allow cromwell style namespacing
DavyCats Nov 19, 2019
2bfa0d5
@mlin's suggestion
DavyCats Nov 21, 2019
2664526
Rewrite the namespaces section
DavyCats Dec 4, 2019
d43592b
remove redundant line
DavyCats Dec 4, 2019
10b055e
lift requirement for all workflow inputs to be filled
rhpvorderman Dec 11, 2019
dcbfafa
address @davycats review comments
rhpvorderman Dec 11, 2019
61188fc
Remove backwards compatability with bug
DavyCats Jan 6, 2020
ecd270d
encourage filling in required inputs for tasks
rhpvorderman Jan 28, 2020
6ba8da5
Merge branch 'reworkinputs' of github.com:/rhpvorderman/wdl into rewo…
rhpvorderman Jan 28, 2020
60fcf59
Integrate cjllanwarne's proposal
rhpvorderman Feb 6, 2020
134f090
remove redundant new line
rhpvorderman Feb 6, 2020
549eed6
better wording
rhpvorderman Feb 6, 2020
2d19af2
require required inputs
rhpvorderman Mar 6, 2020
583e0a8
update example
rhpvorderman Mar 6, 2020
9bd28ac
Apply suggestions from code review
rhpvorderman Mar 11, 2020
1e28d58
add allowNestedInputs
rhpvorderman Mar 11, 2020
cd69299
Merge remote-tracking branch 'remotes/upstream/master' into optionali…
rhpvorderman May 4, 2020
53daafa
update changelog
rhpvorderman May 4, 2020
0e95a27
Merge branch 'optionalinputs' of github.com:rhpvorderman/wdl into opt…
rhpvorderman May 4, 2020
addd64f
Merge branch 'master' into optionalinputs
rhpvorderman May 22, 2020
cd672b7
Merge branch 'master' into optionalinputs
rhpvorderman Jun 25, 2020
653efbe
Typo
rhpvorderman Jul 9, 2020
561b809
Merge remote-tracking branch 'upstream/main' into subworkflow_namespace
DavyCats Nov 4, 2020
b329063
add links to relevant sections
DavyCats Nov 4, 2020
138b469
Better period placement.
rhpvorderman Nov 10, 2020
435469a
Merge remote-tracking branch 'rhpvorderman/patch-1' into v1.1
jdidion Nov 29, 2020
73b21fd
merge struct-literal
jdidion Nov 29, 2020
76c4234
merge min/max
jdidion Nov 29, 2020
9b5e664
Merge remote-tracking branch 'jtratner/optional-outputs' into v1.1
jdidion Nov 29, 2020
5a1edfb
Revert "Merge remote-tracking branch 'jtratner/optional-outputs' into…
jdidion Nov 29, 2020
c164ea0
merge min/max
jdidion Nov 29, 2020
9c0e344
merge
jdidion Nov 29, 2020
9eda914
merge file-outputs
jdidion Nov 30, 2020
ed3f513
merge hints-and-runtime
jdidion Nov 30, 2020
52501d1
merge subworkflow_namespace
jdidion Nov 30, 2020
000036c
merge optionalinputs
jdidion Nov 30, 2020
791ddb0
Initial commit of v1.1
jdidion Dec 10, 2020
b50b916
merge changelog
jdidion Dec 10, 2020
0f171ee
revert changes to development
jdidion Dec 10, 2020
377cb39
fix emojis
jdidion Dec 10, 2020
592d4db
fix formatting
jdidion Dec 10, 2020
ce72000
fix coercion table
jdidion Dec 10, 2020
dfaebff
add link, fix glob restriction
jdidion Dec 10, 2020
0d9659d
fix operator table
jdidion Dec 10, 2020
ef1e237
add template wf to top of wf section
jdidion Dec 10, 2020
a242896
fix term
jdidion Dec 10, 2020
46219b0
fix quoting
jdidion Dec 10, 2020
be0082e
fix example
jdidion Dec 10, 2020
6260152
fixes
jdidion Dec 10, 2020
55ebaa2
move most changes in changelog from 2.0.0 to 1.1.0
jdidion Dec 15, 2020
82f7864
make changes suggested by @rhpvorderman
jdidion Dec 16, 2020
97e8141
clarifications to Task Exectuion
jdidion Dec 16, 2020
682c356
prefer using ~{} in examples
jdidion Dec 16, 2020
bd44cc7
typos
jdidion Dec 16, 2020
ab3579a
dropping the line about 80 character limit until a consensus is reach…
jdidion Dec 16, 2020
0bcc93c
revise intro
jdidion Dec 16, 2020
b03ca8a
make all examples valid and consistent
jdidion Dec 17, 2020
ea2158e
make changes suggested by @vortexing
jdidion Dec 18, 2020
5a8c420
fix table
jdidion Dec 18, 2020
5d9a8ed
fix table
jdidion Dec 18, 2020
aaf8838
fix table
jdidion Dec 18, 2020
7be9bdd
fix table
jdidion Dec 18, 2020
9dc542d
clarify line endings in read_* and write_*; other cleanup
jdidion Dec 18, 2020
359fc85
add caution about deserilaizing Map from JSON
jdidion Dec 18, 2020
977408d
add clarification about read_string
jdidion Dec 18, 2020
130dc6b
Update ImplementationGuide.md
jdidion Dec 21, 2020
6b21e35
Update ImplementationGuide.md
jdidion Dec 21, 2020
9cf602e
Update ImplementationGuide.md
jdidion Dec 21, 2020
f933f49
Update ImplementationGuide.md
jdidion Dec 21, 2020
468a3aa
Update ImplementationGuide.md
jdidion Dec 21, 2020
7fd2b2a
Update ImplementationGuide.md
jdidion Dec 21, 2020
58b4238
Update ImplementationGuide.md
jdidion Dec 21, 2020
3c50cad
Update versions/1.1/SPEC.md
jdidion Jan 6, 2021
6044cf6
Update versions/1.1/SPEC.md
jdidion Jan 12, 2021
f8bff54
Update versions/1.1/SPEC.md
jdidion Jan 12, 2021
6383411
fix typo
jdidion Jan 14, 2021
0edbaef
clarify that regexp strings need to use double-escaping of escape seq…
jdidion Jan 14, 2021
01d1b68
add list of changes from 1.0 -> 1.1
jdidion Jan 14, 2021
3d678a4
typo
jdidion Jan 14, 2021
f0e9292
mark parser changes
jdidion Jan 14, 2021
e64c1e4
add references for 1.1 and development
jdidion Jan 14, 2021
7e19d1f
add back in and deprecate string concatenation and boolean comparison…
jdidion Jan 15, 2021
9f21c3f
remove regexp option for basename function
jdidion Jan 27, 2021
b4019e8
clarify that expression placeholders cannot be combined
jdidion Jan 27, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 43 additions & 16 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,60 @@ What should be mentioned (in order):
+ Credit where credit is due by mentioning the github account.

Keep the changelog pleasant to read in the text editor:
+ Max 80 characters per line
+ Empty line between changes.
+ Newline between summary and link+credit.
+ Properly indent blocks.
-->

version 2.0.0
version development
---------------------------

+ Runtime section no longer accepts arbitrary keys. Added new hints section for arbitrary runtime hints.
jdidion marked this conversation as resolved.
Show resolved Hide resolved
[PR 315](https://github.com/openwdl/wdl/pull/315) by @patmagee

+ Removes string interpolator options.
[PR 229](https://github.com/openwdl/wdl/pull/229) and [PR 368](https://github.com/openwdl/wdl/pull/366)
by @EvanTheB and @illusional.

+ `object` has been removed from WDL. `struct` can be used to achieve the same
type of functionality in a more explicit way.
[PR 283](https://github.com/openwdl/wdl/pull/283) by @patmagee.

+ Added a new directory type to make it easier when working with inputs that
consist of multiple files.
[PR 241](https://github.com/openwdl/wdl/pull/241) by @cjllanwarne.

version 1.1.0
---------------------------

+ Clarified that the `sub` function requires a POSIX Extended Regular Expression (ERE).
[PR 243](https://github.com/openwdl/wdl/pull/243) by @rhpvorderman

+ Added syntax for struct literals.
[PR 297](https://github.com/openwdl/wdl/pull/297) by @patmagee

+ Added engine functions for `min` and `max`.
[PR 304](https://github.com/openwdl/wdl/pull/304) by @pshapiro

+ Added section on file outputs including optional outputs.
[PR 310](https://github.com/openwdl/wdl/pull/310) by @jtratner

+ Added reserved keys, explicit formats, and default values for runtime attributes and hints.
[PR 315](https://github.com/openwdl/wdl/pull/315) by @patmagee

+ Namespacing has been clarified.
[PR 340](https://github.com/openwdl/wdl/pull/340) by @DavyCats

+ Abbreviated syntax for call inputs bound to workflow-scoped values by name:
`{input: x, y=b, z}` is shorthand for `{input: x=x, y=b, z=z}`
[PR 365](https://github.com/openwdl/wdl/pull/365) by @mlin

+ Removes string interpolator options and adds an engine function for joining arrays of strings.
+ Write a specification for unsatisfied task inputs and nested optional inputs.
[PR 359](https://github.com/openwdl/wdl/pull/359) by @rhpvorderman

+ Adds an engine function for joining arrays of strings.
[PR 229](https://github.com/openwdl/wdl/pull/229) and [PR 368](https://github.com/openwdl/wdl/pull/366)
by @EvanTheB and @illusional.
by @EvanTheB and @illusional.

+ Added an engine function for adding a suffix to an array of primitives as well
as well as `quote` and `squote` engine functions.
Expand All @@ -47,10 +86,6 @@ version 2.0.0
+ Optional and non-empty type constraints have been clarified.
[PR 290](https://github.com/openwdl/wdl/pull/290) by @mlin.

+ `object` has been removed from WDL. `struct` can be used to achieve the same
type of functionality in a more explicit way.
[PR 283](https://github.com/openwdl/wdl/pull/283) by @patmagee.

+ The way comments work has been clarified.
[PR 277](https://github.com/openwdl/wdl/pull/277) by @patmagee.

Expand All @@ -75,19 +110,12 @@ version 2.0.0
+ Added a `keys` function to get an array of keys from a map.
[PR 244](https://github.com/openwdl/wdl/pull/244) by @ffinfo.

+ Added a new directory type to make it easier when working with inputs that
consist of multiple files.
[PR 241](https://github.com/openwdl/wdl/pull/241) by @cjllanwarne.

+ Several bugs in the grammar have been fixed.
[PR 238](https://github.com/openwdl/wdl/pull/238) and
[PR 240](https://github.com/openwdl/wdl/pull/240) by @cjllanwarne.

<!---
This is not implemented yet.
+ Type conversions and meanings have been clarified.
[PR 235](https://github.com/openwdl/wdl/pull/235) by @EvanTheB.
-->

+ **Backported to 1.0**: Imports are now relative to their current location.
[PR 220](https://github.com/openwdl/wdl/pull/220) by @geoffjentry.
Expand All @@ -99,7 +127,6 @@ This is not implemented yet.
+ Add an `after` keyword to run a task after other tasks.
[PR 162](https://github.com/openwdl/wdl/pull/162) by @cjllanwarne.


version 1.0.0
---------------------------
+ Rename lexer to `WdlV1Lexer`
Expand Down
45 changes: 45 additions & 0 deletions versions/1.1/ImplementationGuide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

# WDL Implementation Guide

## Task Execution

The execution engine is responsible for implementing all the necessary logic to execute a task's command given a set of inputs. Task execution is performed in these logical stages, although an execution engine is free to implement these stages however it wishes, including combining or reording stages, so long as the contract of each stage is upheld:

1. WDL validation: The WDL document is validated as correct, meaning that:
* it can be parsed according to the WDL grammar rules, and
* all expressions will evaluate to the type expected by the declaration or call input parameter.
2. Input validation: Task inputs are validated to ensure that:
* there are no duplicates,
* each one matches a valid input parameter name,
* the value can be deserialized to the declared type, and
* there are no missing required inputs.
3. Declaration ordering: Any input and private declarations that are initialized with expressions and are not overridden by user-specified values have their expressions examined to determine their dependencies. Declarations are then ordered such that they can be evaluated unambiguously. For example, in the following task, the expressions need to be evaluated in the following order: `a`, `c`, `b`.
```wdl
task out_of_order {
input {
File a
}
String b = "The input file is size: ${c} GB"
Int c = size(a, "GB")
}
```
4. Declaration evaluation: Input and private declarations are evaluated in order, with the values of all previously evaluated declarations being available to evaluate the next declaration's initialization expression.
5. Runtime evaluation:
* The runtime attributes are evaluated in the context of all input and private declaration values.
* An appropriate runtime instance type is determined from the resource requirements. If no instance type can satisfy all the requirements, task execution is terminated with an error.
* The task may be executed in the current environment (where the evaluation is occurring) if that is acceptable, otherwise the runtime instance is provisioned and the task exection is "moved" to the runtime instance, where moving may involve a direct transfer of state or a relaunching of the task (starting over with stage 1).
6. Input localization: Each `File` typed value - including compound values with nested `File`s - that references a non-local resource is localized, which involves:
* Creating a local file (or file-like object, such as a `fifo`), according to the [input localization](#task-input-localization) rules.
* Making the contents of the remote resource readable from that file, either by downloading the remote resource or by streaming its contents.
* Replacing the value of the `File` typed declaration with the path to the local file.
7. Command instantiation:
* The command template is evaluated in the context of all the (localized) input and private declaration values, and all expression placeholders are replaced with their (stringified) values.
* The instantiated command is written to local disk and made executable.
8. Container resolution:
* If alternative container images are specified, the ["best"](SPEC.md#container) one is selected.
* The image is "pulled" to the local environment - this may involve a literal `docker pull`, downloading a tarball and calling `docker load` or `docker import`, or some other mechanism.
9. Command execution: The instantiated command is staged within the container (along with any other necessary volumes) and executed there. All outputs should be created relative to a staged output directory. If the command exits with any return code not specified in `runtime.returnCodes`, task execution exits with an error.
10. Output ordering: Any output declarations that are initialized with expressions have their expressions examined to determine their dependencies. Declarations are then ordered such that they can be evaluated unambiguously.
11. Output evaluation: Output declarations are evaluated in order, with the values of all previously evaluated declarations being available to evaluate the next declaration's initialization expression.
12. Output delocalization: The exection engine may choose to "delocalize" outputs - i.e. to move them from the execution environment to a permanent storage location. If so, the values of any `File` typed output parameters - including compound values with nested `File`s - are updated to replace the local path with the permanent storage location.
13. Cleanup: The execution engine performs any "cleanup" tasks, such as terminating the cloud worker instance.
Loading