Skip to content

Commit 180a21e

Browse files
committed
Corrections and test data
* fix a bunch of examples where the filenames do not match between provided samples and command-line calls * provide data for workflows * fix a reference to JSON when YML is provided * a typo or two
1 parent 5316da0 commit 180a21e

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

draft-4/UserGuide.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
- |
1818
```
1919
20-
Use a JSON object in a separate file to describe the input of a run:
20+
Use a YAML object in a separate file to describe the input of a run:
2121
2222
*echo-job.yml*
2323
```
@@ -103,10 +103,11 @@
103103
Notice that "example_file", as a `File` type, must be provided as an
104104
object with the fields `class: File` and `path`.
105105
106-
Invoke `cwl-runner` with the tool wrapper and the input object on the
106+
Next, create a whale.txt and invoke `cwl-runner` with the tool wrapper and the input object on the
107107
command line:
108108
109109
```
110+
$ touch whale.txt
110111
$ cwl-runner inp.cwl inp-job.yml
111112
[job 140020149614160] /home/example$ echo -f -i42 --example-string hello --file=/home/example/whale.txt
112113
-f -i42 --example-string hello --file=/home/example/whale.txt
@@ -215,9 +216,10 @@
215216
- |
216217
```
217218
218-
Invoke `cwl-runner` with the tool wrapper and the input object on the
219+
Next, create a tar file for the example and invoke `cwl-runner` with the tool wrapper and the input object on the
219220
command line:
220221
```
222+
$ touch hello.txt && tar -cvf hello.tar hello.txt
221223
$ cwl-runner tar.cwl tar-job.yml
222224
[job 139868145165200] $ tar xf /home/example/hello.tar
223225
Final process status is success
@@ -305,9 +307,10 @@
305307
- |
306308
```
307309
308-
Invoke `cwl-runner` with the tool wrapper and the input object on the
310+
Create your input files and invoke `cwl-runner` with the tool wrapper and the input object on the
309311
command line:
310312
```
313+
$ rm hello.tar || true && touch goodbye.txt && tar -cvf hello.tar
311314
$ cwl-runner example-tar-param.cwl example-tar-param-job.yml
312315
[job 139868145165200] $ tar xf /home/example/hello.tar goodbye.txt
313316
Final process status is success
@@ -371,11 +374,12 @@
371374
- |
372375
```
373376
374-
Now invoke `cwl-runner` providing the tool wrapper and the input object
377+
Provide a hello.js and invoke `cwl-runner` providing the tool wrapper and the input object
375378
on the command line:
376379
377380
```
378-
$ cwl-runner example-docker.cwl example-docker-job.yml
381+
$ echo "console.log(\"Hello World\");" > hello.js
382+
$ cwl-runner docker.cwl docker-job.yml
379383
[job 140259721854416] /home/example$ docker run -i --volume=/home/example/hello.js:/var/lib/cwl/job369354770_examples/hello.js:ro --volume=/home/example:/var/spool/cwl:rw --volume=/tmp/tmpDLs5hm:/tmp:rw --workdir=/var/spool/cwl --read-only=true --net=none --user=1001 --rm --env=TMPDIR=/tmp node:slim node /var/lib/cwl/job369354770_examples/hello.js
380384
Hello world!
381385
Final process status is success
@@ -414,11 +418,12 @@
414418
- |
415419
```
416420
417-
Now invoke `cwl-runner` providing the tool wrapper and the input object
421+
Now create a sample Java file and invoke `cwl-runner` providing the tool wrapper and the input object
418422
on the command line:
419423
420424
```
421-
$ cwl-runner example-arguments.cwl example-arguments-job.yml
425+
$ echo "public class Hello {}" > Hello.java
426+
$ cwl-runner arguments.cwl arguments-job.yml
422427
[job 140051188854928] /home/example$ docker run -i --volume=/home/example/Hello.java:/var/lib/cwl/job710906416_example/Hello.java:ro --volume=/home/example:/var/spool/cwl:rw --volume=/tmp/tmpdlQDWi:/tmp:rw --workdir=/var/spool/cwl --read-only=true --net=none --user=1001 --rm --env=TMPDIR=/tmp java:7 javac -d /var/spool/cwl /var/lib/cwl/job710906416_examples/Hello.java
423428
Final process status is success
424429
{

0 commit comments

Comments
 (0)