Skip to content

Commit b9b65c0

Browse files
author
Peter Amstutz
committed
Squashed 'cwltool/schemas/' changes from f027dbb..d03b190
d03b190 Introducing refScope and typeDSL into CWL schema 5e1e438 Merge commit '851b3c1302aa5b5d8a80f74c5732a617f62acefe' into scoped-ref-and-typedsl 851b3c1 Split minimal base types used in CWL into metaschema_base.yml 510a01f Merge commit '8823aaa11432aa042b3e307891e71ee13e11bfd7' into scoped-ref-and-typedsl 8823aaa Adjust ref scopes 3431e18 Use scopedRef and typeDSL in metaschema 1e6dab6 Using typeDSL in metaschema. 3055f70 Update bootstrap context. 31db28e Merge branch 'master' into type_dsl. Add test for typeDSL. 116d9e4 Merge branch 'resolve_all_refactor' 8072bf5 "type" DSL wip 33ef215 Refactor resolve_all into smaller methods. ad8a111 Merge pull request #28 from common-workflow-language/scoped_ref 5aadf27 fix types 4ef52be Improve documentation. Add feature of skipping some inner scopes. c6d4a7b Reworking refScope to be fixed instead of search based. ae0ef4e Remove explicit calls to validate_links since it is folded into resolve_all(). 2fa6bfb update types e5d4730 New test for scoped ref that better reflects actual desired behavior. efbc9c4 Add scopedRef to metaschema. Tweak test. 9fcd67d Fold link validation into resolve_all() and resolve scoped identifiers. f36f52f Merge pull request #219 from denis-yuen/patch-1 da10eec always be updating (mypy-lang) e1e17ea upgrade Jenkins setuptools 563e5ef fix jenkins build 11b45b5 Merge pull request #224 from common-workflow-language/jenkins-link b4d790d Backport fixes to draft-3 1ea9a5c add jenkins link 180a21e Corrections and test data f0ac285 Merge branch 'master' of github.com:common-workflow-language/schema_salad 84738f1 better RDF schema error handling (#26) 3b8dc09 mypy 0.4 is out (#25) 5316da0 Add missing files for site generation. 31fbb76 Fix site generation workflows to specify draft-3 cff09a0 Add link to latest User Guide on front page 53b2ad7 Merge pull request #200 from common-workflow-language/draft-4 089fbd7 start documenting the draft-4 changes 8c5bda0 Fix mapSubject fields when $import or $include is provided. 5b969ca fix diff-cover d798a7e split out mypy f43fa45 Fix tests 2d0398e Bump version. aeab7c3 Merge branch 'master' of github.com:common-workflow-language/schema_salad e381f64 Return metaschema loader from load_schema. Don't crash expanding identifier fields when value is not a string. 15dae9f enhance CI fd2fcb3 more type checking (#21) c51c723 enable rdfa schema format (#22) ff192e8 turn off py3 support for now (#19) 0c5dba5 measure code coverage (#12) 2514a23 switch to ruamel.yaml, use C loader if available, only load safely (#20) git-subtree-dir: cwltool/schemas git-subtree-split: d03b190
1 parent 4cadc61 commit b9b65c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+4206
-751
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ CWL builds on technologies such as [JSON-LD](http://json-ld.org) and
1414
CWL is designed to express workflows for data-intensive science, such as
1515
Bioinformatics, Medical Imaging, Chemistry, Physics, and Astronomy.
1616

17+
## CWL User Guide
18+
19+
[User guide for the current stable specification (draft-3)](http://www.commonwl.org/draft-3/UserGuide.html),
20+
provides a gentle introduction to writing CWL command line tool and workflow descriptions.
21+
1722
## CWL Specification
1823

1924
The current stable specification is [draft 3](http://www.commonwl.org/draft-3/):
@@ -55,6 +60,10 @@ Some of the software supporting running Common Workflow Language tools or workfl
5560
* [Apache Taverna](http://taverna.incubator.apache.org/),
5661
[Apache Taverna wiki page](https://github.com/common-workflow-language/common-workflow-language/wiki/Taverna)
5762

63+
We continuously run the CWL conformance tests on several implementations:
64+
65+
https://ci.commonwl.org
66+
5867
## Examples
5968

6069
[Github repository of example tools and workflows.](https://github.com/common-workflow-language/workflows)

draft-3/UserGuide.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
- |
2121
```
2222
23-
Use a JSON object in a separate file to describe the input of a run:
23+
Use a YAML object in a separate file to describe the input of a run:
2424
2525
*echo-job.yml*
2626
```
@@ -106,10 +106,11 @@
106106
Notice that "example_file", as a `File` type, must be provided as an
107107
object with the fields `class: File` and `path`.
108108
109-
Invoke `cwl-runner` with the tool wrapper and the input object on the
109+
Next, create a whale.txt and invoke `cwl-runner` with the tool wrapper and the input object on the
110110
command line:
111111
112112
```
113+
$ touch whale.txt
113114
$ cwl-runner inp.cwl inp-job.yml
114115
[job 140020149614160] /home/example$ echo -f -i42 --example-string hello --file=/home/example/whale.txt
115116
-f -i42 --example-string hello --file=/home/example/whale.txt
@@ -218,9 +219,10 @@
218219
- |
219220
```
220221
221-
Invoke `cwl-runner` with the tool wrapper and the input object on the
222+
Next, create a tar file for the example and invoke `cwl-runner` with the tool wrapper and the input object on the
222223
command line:
223224
```
225+
$ touch hello.txt && tar -cvf hello.tar hello.txt
224226
$ cwl-runner tar.cwl tar-job.yml
225227
[job 139868145165200] $ tar xf /home/example/hello.tar
226228
Final process status is success
@@ -308,9 +310,10 @@
308310
- |
309311
```
310312
311-
Invoke `cwl-runner` with the tool wrapper and the input object on the
313+
Create your input files and invoke `cwl-runner` with the tool wrapper and the input object on the
312314
command line:
313315
```
316+
$ rm hello.tar || true && touch goodbye.txt && tar -cvf hello.tar
314317
$ cwl-runner tar-param.cwl tar-param-job.yml
315318
[job 139868145165200] $ tar xf /home/example/hello.tar goodbye.txt
316319
Final process status is success
@@ -374,11 +377,12 @@
374377
- |
375378
```
376379
377-
Now invoke `cwl-runner` providing the tool wrapper and the input object
380+
Provide a hello.js and invoke `cwl-runner` providing the tool wrapper and the input object
378381
on the command line:
379382
380383
```
381-
$ cwl-runner example-docker.cwl example-docker-job.yml
384+
$ echo "console.log(\"Hello World\");" > hello.js
385+
$ cwl-runner docker.cwl docker-job.yml
382386
[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
383387
Hello world!
384388
Final process status is success
@@ -417,11 +421,12 @@
417421
- |
418422
```
419423
420-
Now invoke `cwl-runner` providing the tool wrapper and the input object
424+
Now create a sample Java file and invoke `cwl-runner` providing the tool wrapper and the input object
421425
on the command line:
422426
423427
```
424-
$ cwl-runner example-arguments.cwl example-arguments-job.yml
428+
$ echo "public class Hello {}" > Hello.java
429+
$ cwl-runner arguments.cwl arguments-job.yml
425430
[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
426431
Final process status is success
427432
{
@@ -855,4 +860,4 @@
855860
The second step `compile` depends on the results from the first step by
856861
connecting the input parameter `src` to the output parameter of `untar`
857862
using `#untar/example_out`. The output of this step `classfile` is
858-
connected to the `outputs` section for the Workflow, described above.
863+
connected to the `outputs` section for the Workflow, described above.

draft-4/CommandLineTool.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,12 @@ $graph:
3838
- |
3939
## Introduction to draft 4
4040
41-
This specification represents the third milestone of the CWL group.
42-
Since draft-3, this draft introduces the following major changes and additions:
41+
This specification represents the fourth milestone of the CWL group.
42+
Since draft-3, this draft introduces the following changes and additions:
43+
44+
* Preliminary support for initialWorkDir & the Directory type
45+
* "id: name" is now just "name"; "class: Classname" is now just
46+
"Classtname".
4347
4448
## Purpose
4549

draft-4/Process.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ $graph:
1010
type: documentation
1111
doc: {$include: concepts.md}
1212

13-
- $import: "salad/schema_salad/metaschema/metaschema.yml"
13+
- $import: "salad/schema_salad/metaschema/metaschema_base.yml"
1414

1515
- name: BaseTypesDoc
1616
type: documentation
@@ -226,6 +226,8 @@ $graph:
226226
jsonldPredicate:
227227
"_id": "sld:type"
228228
"_type": "@vocab"
229+
refScope: 2
230+
typeDSL: True
229231
doc: |
230232
Specify valid types of data that may be assigned to this parameter.
231233

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)