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

Fix may issues with examples #669

Open
wants to merge 11 commits into
base: wdl-1.1
Choose a base branch
from
Open
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ version development
consist of multiple files.
[PR 241](https://github.com/openwdl/wdl/pull/241) by @cjllanwarne.

version 1.1.3
---------------------------

* Fix issues with examples (#653, #654, #661, #662, #663, #664, #665, #666, #668). Thanks to @stxue1!
* Clarify that a file is not required to exist or be accessible until and unless it is accessed.

version 1.1.2
---------------------------

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The WDL *language* has a two-number version (e.g., `1.1`).
An increase in the minor (second) version number (e.g., `1.0` to `1.1`) indicates the addition of, or non-breaking changes to, the language or standard library functions.
An increase in the major (first) version number (e.g., `1.0` to `2.0`) indicates that breaking changes have been made.

The WDL *specification* has a three-number version (e.g., `1.1.2`).
The WDL *specification* has a three-number version (e.g., `1.1.3`).
The specification version tracks the language version, but there may also be patch releases (indicated by a change to the patch, or third, version number) that include fixes for typos, additional examples, or non-breaking clarifications of ambiguous language.

## Language Specifications
Expand Down
65 changes: 37 additions & 28 deletions SPEC.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Workflow Description Language (WDL)

This is version 1.1.2 of the Workflow Description Language (WDL) specification. It describes WDL `version 1.1`. It introduces a number of new features (denoted by the ✨ symbol) and clarifications to the [1.0](https://github.com/openwdl/wdl/blob/main/versions/1.0/SPEC.md) version of the specification. It also deprecates several aspects of the 1.0 specification that will be removed in the [next major WDL version](https://github.com/openwdl/wdl/blob/wdl-2.0/SPEC.md) (denoted by the 🗑 symbol).
This is version 1.1.3 of the Workflow Description Language (WDL) specification. It describes WDL `version 1.1`. It introduces a number of new features (denoted by the ✨ symbol) and clarifications to the [1.0](https://github.com/openwdl/wdl/blob/main/versions/1.0/SPEC.md) version of the specification. It also deprecates several aspects of the 1.0 specification that will be removed in the [next major WDL version](https://github.com/openwdl/wdl/blob/wdl-2.0/SPEC.md) (denoted by the 🗑 symbol).

## Revisions

Revisions to this specification are made periodically in order to correct errors, clarify language, or add additional examples. Revisions are released as "patches" to the specification, i.e., the third number in the specification version is incremented. No functionality is added or removed after the initial revision of the specification is ratified.

* [1.1.3]():
* [1.1.2](https://github.com/openwdl/wdl/tree/release-1.1.2/SPEC.md): 2024-04-12
* [1.1.1](https://github.com/openwdl/wdl/tree/release-1.1.1/SPEC.md): 2023-10-04
* [1.1.0](https://github.com/openwdl/wdl/tree/release-1.1.0/SPEC.md): 2021-01-29
Expand Down Expand Up @@ -419,7 +420,7 @@ There is no special syntax for multi-line comments - simply use a `#` at the sta
# This comment will not be included within the command
command <<<
# This comment WILL be included within the command after it has been parsed
cat ~{number * 2}
echo ~{number * 2}
>>>

output {
Expand Down Expand Up @@ -534,7 +535,12 @@ The following primitive types exist in WDL:
* A `File` represents a file (or file-like object).
* A `File` declaration can have a string value indicating a relative or absolute path on the local file system.
* Within a WDL file, literal values for files may only be local (relative or absolute) paths.
* The path assigned to a `File` is not required to be valid unless and until it is accessed.
* To read from a file, it must exist and be assigned appropriate permissions.
* To write to a file, the parent directory must be assigned appropriate permissions.
* An execution engine may support other ways to specify [`File` inputs (e.g. as URIs)](#input-and-output-formats), but prior to task execution it must [localize inputs](#task-input-localization) so that the runtime value of a `File` variable is a local path.
* Remote files must be treated as read-only.
* A remote file is only required to be vaild at the time that the execution engine needs to localize it.

<details>
<summary>
Expand Down Expand Up @@ -1148,7 +1154,7 @@ Example output:

```json
{
"test_struct.person": {
"test_struct.john": {
"name": "John",
"account": {
"account_number": "123456",
Expand Down Expand Up @@ -1424,18 +1430,20 @@ workflow map_to_struct {
String b = "key"
String c = "lookup"

# What are the keys to this Struct?
Words literal_syntax = Words {
a: 10,
b: 11,
c: 12
}
output {
# What are the keys to this Struct?
Words literal_syntax = Words {
a: 10,
b: 11,
c: 12
}

# What are the keys to this Struct?
Words map_coercion = {
a: 10,
b: 11,
c: 12
# What are the keys to this Struct?
Words map_coercion = {
a: 10,
b: 11,
c: 12
}
}
}
```
Expand Down Expand Up @@ -3606,12 +3614,12 @@ task python_strip {
}

command<<<
python <<CODE
python <<CODE
with open("~{infile}") as fp:
for line in fp:
if not line.startswith('#'):
print(line.strip())
CODE
CODE
>>>

output {
Expand All @@ -3637,7 +3645,7 @@ Example output:

```json
{
"python_strip": ["A", "B", "C"]
"python_strip.lines": ["A", "B", "C"]
}
```
</p>
Expand All @@ -3647,10 +3655,10 @@ Given an `infile` value of `/path/to/file`, the execution engine will produce th

```sh
python <<CODE
with open("/path/to/file") as fp:
for line in fp:
if not line.startswith('#'):
print(line.strip())
with open("/path/to/file") as fp:
for line in fp:
if not line.startswith('#'):
print(line.strip())
CODE
```

Expand Down Expand Up @@ -4238,6 +4246,7 @@ task test_gpu {
}

runtime {
container: "archlinux:latest"
gpu: true
}
}
Expand Down Expand Up @@ -5680,7 +5689,8 @@ Example input:
"allow_nested.msg1": "hello",
"allow_nested.msg2": "goodbye",
"allow_nested.my_ints": [1, 2, 3],
"allow_nested.ref_file": "hello.txt"
"allow_nested.ref_file": "hello.txt",
"allow_nested.repeat2.i": 2
}
```

Expand All @@ -5690,7 +5700,6 @@ Example output:
{
"allow_nested.lines1": ["hello", "hello", "hello"],
"allow_nested.lines2": ["goodbye", "goodbye"],
"allow_nested.repeat2.i": 2,
"allow_nested.incrs": [2, 3, 4]
}
```
Expand Down Expand Up @@ -6054,12 +6063,12 @@ workflow if_else {

# the body *is not* evaluated since 'b' is false
if (is_morning) {
call greet as morning { time = "morning" }
call greet as morning { input: time = "morning" }
}

# the body *is* evaluated since !b is true
if (!is_morning) {
call greet as afternoon { time = "afternoon" }
call greet as afternoon { input: time = "afternoon" }
}

output {
Expand Down Expand Up @@ -6104,7 +6113,7 @@ workflow nested_if {

if (morning) {
if (friendly) {
call if_else.greet { time = "morning" }
call if_else.greet { input: time = "morning" }
}
}

Expand Down Expand Up @@ -8090,7 +8099,7 @@ workflow test_prefix {
Array[Int] env2 = [1, 2, 3]

output {
Array[String] env_prefixed = prefix("-e ", env1)
Array[String] env1_prefixed = prefix("-e ", env1)
Array[String] env2_prefixed = prefix("-f ", env2)
}
}
Expand Down Expand Up @@ -9864,7 +9873,7 @@ Example output:

```json
{
"serialize_array_delim.strings": [
"serialize_array_delim.heads": [
"hello world",
"hello world",
"hi_world"
Expand Down