Skip to content

Change an example in section 13 not to use side-effect #100

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

Merged
merged 2 commits into from
Feb 26, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
32 changes: 29 additions & 3 deletions _episodes/13-expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,36 @@ We can then run `expression.cwl`:

~~~
$ cwl-runner expression.cwl empty.yml
[job 140000594593168] /home/example$ echo -A 2 -B baz -C 10 9 8 7 6 5 4 3 2 1
-A 2 -B baz -C 10 9 8 7 6 5 4 3 2 1
[job expression.cwl] /home/example$ echo \
-A \
2 \
-B \
baz \
-C \
10 \
9 \
8 \
7 \
6 \
5 \
4 \
3 \
2 \
1 > /home/example/output.txt
[job expression.cwl] completed success
{
"example_out": {
"location": "file:///home/example/output.txt",
"basename": "output.txt",
"class": "File",
"checksum": "sha1$a739a6ff72d660d32111265e508ed2fc91f01a7c",
"size": 36,
"path": "/home/example/output.txt"
}
}
Final process status is success
{}
$ cat output.txt
-A 2 -B baz -C 10 9 8 7 6 5 4 3 2 1
~~~
{: .output}

Expand Down
5 changes: 4 additions & 1 deletion _includes/cwl/13-expressions/expression.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ requirements:
- class: InlineJavascriptRequirement

inputs: []
outputs: []
outputs:
example_out:
type: stdout
stdout: output.txt
arguments:
- prefix: -A
valueFrom: $(1+1)
Expand Down
14 changes: 13 additions & 1 deletion _includes/cwl/conformance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,19 @@
should_fail: true

# Section 12 depends on side-effects
# Section 13 depends on side-effects

# Section 13
- doc: Test for section 13
job: 13-expressions/empty.yml
tool: 13-expressions/expression.cwl
output:
example_out:
class: File
checksum: sha1$a739a6ff72d660d32111265e508ed2fc91f01a7c
basename: output.txt
location: Any
size: 36

# Section 14 depends on side-effects

# Section 15
Expand Down