Skip to content

Commit 1574f85

Browse files
authored
Merge pull request #100 from common-workflow-language/no-side-effect-13
Change an example in section 13 not to use side-effect
2 parents 66c4227 + 7c52c04 commit 1574f85

File tree

3 files changed

+45
-5
lines changed

3 files changed

+45
-5
lines changed

_episodes/13-expressions.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,36 @@ We can then run `expression.cwl`:
4949

5050
~~~
5151
$ cwl-runner expression.cwl empty.yml
52-
[job 140000594593168] /home/example$ echo -A 2 -B baz -C 10 9 8 7 6 5 4 3 2 1
53-
-A 2 -B baz -C 10 9 8 7 6 5 4 3 2 1
52+
[job expression.cwl] /home/example$ echo \
53+
-A \
54+
2 \
55+
-B \
56+
baz \
57+
-C \
58+
10 \
59+
9 \
60+
8 \
61+
7 \
62+
6 \
63+
5 \
64+
4 \
65+
3 \
66+
2 \
67+
1 > /home/example/output.txt
68+
[job expression.cwl] completed success
69+
{
70+
"example_out": {
71+
"location": "file:///home/example/output.txt",
72+
"basename": "output.txt",
73+
"class": "File",
74+
"checksum": "sha1$a739a6ff72d660d32111265e508ed2fc91f01a7c",
75+
"size": 36,
76+
"path": "/home/example/output.txt"
77+
}
78+
}
5479
Final process status is success
55-
{}
80+
$ cat output.txt
81+
-A 2 -B baz -C 10 9 8 7 6 5 4 3 2 1
5682
~~~
5783
{: .output}
5884

_includes/cwl/13-expressions/expression.cwl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ requirements:
88
- class: InlineJavascriptRequirement
99

1010
inputs: []
11-
outputs: []
11+
outputs:
12+
example_out:
13+
type: stdout
14+
stdout: output.txt
1215
arguments:
1316
- prefix: -A
1417
valueFrom: $(1+1)

_includes/cwl/conformance-test.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,18 @@
139139
basename: output.txt
140140
location: Any
141141

142-
# Section 13 depends on side-effects
142+
# Section 13
143+
- doc: Test for section 13
144+
job: 13-expressions/empty.yml
145+
tool: 13-expressions/expression.cwl
146+
output:
147+
example_out:
148+
class: File
149+
checksum: sha1$a739a6ff72d660d32111265e508ed2fc91f01a7c
150+
basename: output.txt
151+
location: Any
152+
size: 36
153+
143154
# Section 14 depends on side-effects
144155

145156
# Section 15

0 commit comments

Comments
 (0)