Skip to content

Commit e0257cf

Browse files
authored
Merge pull request #59 from common-workflow-language/rc1_feedback
Rc1 feedback
2 parents 81b95b8 + 2329710 commit e0257cf

File tree

5 files changed

+52
-38
lines changed

5 files changed

+52
-38
lines changed

CommandLineTool.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,8 @@ $graph:
312312
path pattern (it does begin with a slash '/') then it must
313313
refer to a path within the output directory. It is an error
314314
if any glob resolves to a path outside the output directory.
315-
Specifically this means globs with relative paths containing
316-
'..' or absolute paths that refer outside the output directory
317-
are illegal.
315+
Specifically this means globs that resolve to paths outside the output
316+
directory are illegal.
318317
319318
A glob may match a path within the output directory which is
320319
actually a symlink to another file. In this case, the
@@ -814,7 +813,10 @@ $graph:
814813
"_type": "@vocab"
815814
- name: dockerPull
816815
type: string?
817-
doc: "Specify a Docker image to retrieve using `docker pull`."
816+
doc: |
817+
Specify a Docker image to retrieve using `docker pull`. Can contain the
818+
immutable digest to ensure an exact container is used:
819+
`dockerPull: ubuntu@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2`
818820
- name: dockerLoad
819821
type: string?
820822
doc: "Specify a HTTP URL from which to download a Docker image using `docker load`."

concepts.md

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ https://tools.ietf.org/html/rfc3987
1717

1818
**Resource Description Framework (RDF)**: http://www.w3.org/RDF/
1919

20+
**XDG Base Directory Specification**: https://specifications.freedesktop.org/basedir-spec/basedir-spec-0.6.html
21+
22+
2023
## Scope
2124

2225
This document describes CWL syntax, execution, and object model. It
@@ -88,8 +91,7 @@ JSON or YAML syntax. Upon loading, a CWL implementation must apply the
8891
preprocessing steps described in the
8992
[Semantic Annotations for Linked Avro Data (SALAD) Specification](SchemaSalad.html).
9093
An implementation may formally validate the structure of a CWL document using
91-
SALAD schemas located at
92-
https://github.com/common-workflow-language/common-workflow-language/tree/master/v1.1
94+
SALAD schemas located at https://github.com/common-workflow-language/cwl-v1.1/
9395

9496
### map
9597

@@ -242,9 +244,6 @@ inputs:
242244
workflow_input02: # we use the longer way
243245
type: File # because we want to specify the "format" too
244246
format: http://edamontology.org/format_2572
245-
workflow_input03: {} # back to the short form as this entry
246-
# uses the default of no "type" just like the prior
247-
# examples
248247
```
249248

250249
Mixed option 2 and 3 specific example using [SoftwareRequirement](#SoftwareRequirement).[packages](#SoftwarePackage):
@@ -263,9 +262,9 @@ hints:
263262
python: {}
264263
```
265264

266-
Note: The `map<…>` (compact) versions are optional, the verbose option #1 is
265+
Note: The `map<…>` (compact) versions are optional for users, the verbose option #1 is
267266
always allowed, but for presentation reasons option 3 and 2 may be preferred
268-
by human readers.
267+
by human readers. Consumers of CWL must support all three options.
269268

270269
The normative explanation for these variations, aimed at implementors, is in the
271270
[Schema Salad specification](SchemaSalad.html#Identifier_maps).
@@ -293,7 +292,7 @@ Type `<T>` ending with `[]` should be transformed to `{"type": "array", "items":
293292

294293
## Extensions and metadata
295294

296-
Input metadata (for example, a lab sample identifier) may be represented within
295+
Input metadata (for example, a sample identifier) may be represented within
297296
a tool or workflow using input parameters which are explicitly propagated to
298297
output. Future versions of this specification may define additional facilities
299298
for working with input/output metadata.
@@ -305,6 +304,9 @@ additional fields on any object. Such extensions fields must use a namespace
305304
prefix listed in the `$namespaces` section of the document as described in the
306305
[Schema Salad specification](SchemaSalad.html#Explicit_context).
307306

307+
It is recommended that concepts from schema.org are used whenever possible.
308+
For the `$schema` field we recommend their RDF encoding: http://schema.org/version/latest/schema.rdf
309+
308310
Implementation extensions which modify execution semantics must be [listed in
309311
the `requirements` field](#Requirements_and_hints).
310312

@@ -353,8 +355,6 @@ platform include:
353355
(except as described in [DockerRequirement](CommandLineTool.html#DockerRequirement)).
354356
* Using remote or distributed file systems to manage input and output files.
355357
* Transforming file paths.
356-
* Determining if a process has previously been executed, and if so skipping it
357-
and reusing previous results.
358358
* Pausing, resuming or checkpointing processes or workflows.
359359

360360
Conforming CWL processes must not assume anything about the runtime
@@ -499,7 +499,7 @@ must be treated as a string interpolation. After interpolating the first
499499
parameter reference, interpolation must be recursively applied to the
500500
trailing characters to yield the final string value.
501501

502-
## Expressions
502+
## Expressions (Optional)
503503

504504
An expression is a fragment of [Javascript/ECMAScript
505505
5.1](http://www.ecma-international.org/ecma-262/5.1/) code evaluated by the
@@ -510,6 +510,12 @@ and/or step 7 (capture output). Expressions are distinct from regular
510510
processes in that they are intended to modify the behavior of the workflow
511511
itself rather than perform the primary work of the workflow.
512512

513+
Expressions in CWL are an optional feature and are not required to be
514+
implemented by all consumers of CWL documents. They should be used sparingly,
515+
when there is no other way to achieve the desired outcome. Excessive use of
516+
expressions may be a signal that other refactoring of the tools or workflows
517+
would benefit the author, runtime, and users of the CWL document in question.
518+
513519
To declare the use of expressions, the document must include the process
514520
requirement `InlineJavascriptRequirement`. Expressions may be used in any
515521
field permitting the pseudo-type `Expression`, as specified by this
@@ -554,8 +560,8 @@ Implementations may apply other limits, such as process isolation, timeouts,
554560
and operating system containers/jails to minimize the security risks associated
555561
with running untrusted code embedded in a CWL document.
556562

557-
Exceptions thrown from an exception must result in a `permanentFailure` of the
558-
process.
563+
Javascript exceptions thrown from a CWL expression must result in a
564+
`permanentFailure` of the CWL process.
559565

560566
## Executing CWL documents as scripts
561567

@@ -578,11 +584,16 @@ documented in [cwl-runner.cwl](cwl-runner.cwl).
578584

579585
To discover CWL documents look in the following locations:
580586

581-
`/usr/share/commonwl/`
587+
For each value in the `XDG_DATA_DIRS` environment variable (which is a `:` colon
588+
separated list), check the `./commonwl` subdirectory. If `XDG_DATA_DIRS` is
589+
unset or empty, then check using the default value for `XDG_DATA_DIRS`:
590+
`/usr/local/share/:/usr/share/` (That is to say, check `/usr/share/commonwl/`
591+
and `/usr/local/share/commonwl/`)
582592

583-
`/usr/local/share/commonwl/`
593+
Then check `$XDG_DATA_HOME/commonwl/`.
584594

585-
`$XDG_DATA_HOME/commonwl/` (usually `$HOME/.local/share/commonwl`)
595+
If the `XDG_DATA_HOME` environment variable is unset, its default value is
596+
`$HOME/.local/share` (That is to say, check `$HOME/.local/share/commonwl`)
586597

587-
`$XDG_DATA_HOME` is from the [XDG Base Directory
598+
`$XDG_DATA_HOME` and `$XDG_DATA_DIRS` are from the [XDG Base Directory
588599
Specification](http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html)

index.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Common Workflow Language Specifications, v1.1
1+
# Common Workflow Language Specifications, v1.1 "release candidate 1"
22

33
The CWL specifications are divided up into several documents.
44

55
The [User Guide](http://www.commonwl.org/user_guide/) provides a gentle
6-
introduction to writing CWL command line tools and workflows.
6+
introduction to writing CWL command line tools and workflows. Currently it is for CWL v1.0 only.
77

88
The [Command Line Tool Description Specification](CommandLineTool.html)
99
specifies the document schema and execution semantics for wrapping and
@@ -66,15 +66,13 @@ You can run a particular test
6666
```
6767

6868

69-
If you are running tests for an unreleased CWL version use the `--enable-dev` flag:
69+
If you are running tests using the CWL reference runner "cwltool" for an unreleased version of the CWL standards use the `--enable-dev` flag:
7070
```
71-
./run_test.sh EXTRA=--enable-dev
71+
./run_test.sh RUNNER=cwltool EXTRA=--enable-dev
7272
```
7373

7474

7575
For details of options you can pass to the test script, do:
7676
```
7777
./run_test.sh --help
7878
```
79-
80-
The full test suite takes about 10 minutes to run

intro.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# Status of this document
22

33
This document is the product of the [Common Workflow Language working
4-
group](https://groups.google.com/forum/#!forum/common-workflow-language). The
5-
latest stable version of this document is available in the "v1.0" directory at
4+
group](https://www.commonwl.org/). The
5+
source for the latest stable version of this document is available in the "v1.0" directory at
66

77
https://github.com/common-workflow-language/common-workflow-language
88

9+
The current development version is at https://github.com/common-workflow-language/cwl-v1.1/
10+
911
The products of the CWL working group (including this document) are made available
1012
under the terms of the Apache License, version 2.0.
1113

invocation.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,10 @@ output directory may each reside on different mount points on different file
9696
systems.
9797

9898
An implementation may forbid the tool from directly accessing network
99-
resources. Correct tools must not assume any network access. Future versions
100-
of the specification may incorporate optional process requirements that
101-
describe the networking needs of a tool.
99+
resources. Correct tools must not assume any network access unless they have
100+
the 'networkAccess' field of a ['NetworkAccess'](#NetworkAccess) requirement set
101+
to `true` but even then this does not imply a publically routable IP address or
102+
the ability to accept inbound connections.
102103

103104
The `runtime` section available in [parameter references](#Parameter_references)
104105
and [expressions](#Expressions) contains the following fields. As noted
@@ -115,23 +116,23 @@ not perform computation on the contents.
115116
* `runtime.tmpdirSize`: reserved storage space available in the designated temporary directory
116117

117118
For `cores`, `ram`, `outdirSize` and `tmpdirSize`, if an implementation can't
118-
provide the actual number of reserved cores during the expression evaluation time,
119+
provide the actual number of reserved resources during the expression evaluation time,
119120
it should report back the minimal requested amount.
120121

121122
See [ResourceRequirement](#ResourceRequirement) for details on how to
122123
describe the hardware resources required by a tool.
123124

124-
The standard input stream and standard output stream may be redirected as
125-
described in the `stdin` and `stdout` fields.
125+
The standard input stream, the standard output stream, and/or the standard error
126+
stream may be redirected as described in the [`stdin`](#stdin),
127+
[`stdout`](#stdout), and [`stderr`](#stderr) fields.
126128

127129
## Execution
128130

129131
Once the command line is built and the runtime environment is created, the
130132
actual tool is executed.
131133

132-
The standard error stream and standard output stream (unless redirected by
133-
setting `stdout` or `stderr`) may be captured by platform logging facilities
134-
for storage and reporting.
134+
The standard error stream and standard output stream may be captured by
135+
platform logging facilities for storage and reporting.
135136

136137
Tools may be multithreaded or spawn child processes; however, when the
137138
parent process exits, the tool is considered finished regardless of whether

0 commit comments

Comments
 (0)