Skip to content

Commit 4a26b6a

Browse files
authored
Merge pull request #101 from common-workflow-language/no-side-effect-14
Change an example in Section 14 not to use side-effect
2 parents 1574f85 + 2faaa15 commit 4a26b6a

File tree

3 files changed

+31
-6
lines changed

3 files changed

+31
-6
lines changed

_episodes/14-runtime.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,22 @@ Now invoke `cwl-runner` with the tool wrapper and the input object on the
3333
command line:
3434

3535
~~~
36-
$ cwltool createfile.cwl echo-job.yml
37-
[job 140528604979344] /home/example$ cat example.conf
38-
CONFIGVAR=Hello world!
36+
$ cwl-runner createfile.cwl echo-job.yml
37+
[job createfile.cwl] /home/example$ cat \
38+
example.conf > /home/example/output.txt
39+
[job createfile.cwl] completed success
40+
{
41+
"example_out": {
42+
"location": "file:///home/example/output.txt",
43+
"basename": "output.txt",
44+
"class": "File",
45+
"checksum": "sha1$5d3f955d1bb862ec618bc2f7ca4c5fa29fa39e89",
46+
"size": 22,
47+
"path": "/home/example/output.txt"
48+
}
49+
}
3950
Final process status is success
40-
{}
51+
$ cat output.txt
52+
CONFIGVAR=Hello world!
4153
~~~
4254
{: .output}

_includes/cwl/14-runtime/createfile.cwl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ requirements:
1313

1414
inputs:
1515
message: string
16-
outputs: []
16+
outputs:
17+
example_out:
18+
type: stdout
19+
stdout: output.txt

_includes/cwl/conformance-test.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,17 @@
151151
location: Any
152152
size: 36
153153

154-
# Section 14 depends on side-effects
154+
# Section 14
155+
- doc: Test for section 14
156+
job: 14-runtime/echo-job.yml
157+
tool: 14-runtime/createfile.cwl
158+
output:
159+
example_out:
160+
class: File
161+
checksum: sha1$5d3f955d1bb862ec618bc2f7ca4c5fa29fa39e89
162+
basename: output.txt
163+
location: Any
164+
size: 22
155165

156166
# Section 15
157167
- doc: Test for section 15

0 commit comments

Comments
 (0)