From f6f86be78cb0a7c13e1aa5764d9719be60bf3ff3 Mon Sep 17 00:00:00 2001 From: Tomoya Tanjo Date: Mon, 26 Feb 2018 15:39:34 +0900 Subject: [PATCH] Change an example in section 13 not to use side-effect --- _episodes/13-expressions.md | 32 +++++++++++++++++++-- _includes/cwl/13-expressions/expression.cwl | 5 +++- _includes/cwl/conformance-test.yml | 14 ++++++++- 3 files changed, 46 insertions(+), 5 deletions(-) diff --git a/_episodes/13-expressions.md b/_episodes/13-expressions.md index a000d826..ecdaa3ca 100644 --- a/_episodes/13-expressions.md +++ b/_episodes/13-expressions.md @@ -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} diff --git a/_includes/cwl/13-expressions/expression.cwl b/_includes/cwl/13-expressions/expression.cwl index 05a56e72..54d12260 100644 --- a/_includes/cwl/13-expressions/expression.cwl +++ b/_includes/cwl/13-expressions/expression.cwl @@ -8,7 +8,10 @@ requirements: - class: InlineJavascriptRequirement inputs: [] -outputs: [] +outputs: + example_out: + type: stdout +stdout: output.txt arguments: - prefix: -A valueFrom: $(1+1) diff --git a/_includes/cwl/conformance-test.yml b/_includes/cwl/conformance-test.yml index 16647184..5db5a62d 100644 --- a/_includes/cwl/conformance-test.yml +++ b/_includes/cwl/conformance-test.yml @@ -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