@@ -17,6 +17,9 @@ https://tools.ietf.org/html/rfc3987
17
17
18
18
** Resource Description Framework (RDF)** : http://www.w3.org/RDF/
19
19
20
+ ** XDG Base Directory Specification** : https://specifications.freedesktop.org/basedir-spec/basedir-spec-0.6.html
21
+
22
+
20
23
## Scope
21
24
22
25
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
88
91
preprocessing steps described in the
89
92
[ Semantic Annotations for Linked Avro Data (SALAD) Specification] ( SchemaSalad.html ) .
90
93
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/
93
95
94
96
### map
95
97
@@ -242,9 +244,6 @@ inputs:
242
244
workflow_input02: # we use the longer way
243
245
type: File # because we want to specify the "format" too
244
246
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
248
247
```
249
248
250
249
Mixed option 2 and 3 specific example using [ SoftwareRequirement] ( #SoftwareRequirement ) .[ packages] ( #SoftwarePackage ) :
@@ -263,9 +262,9 @@ hints:
263
262
python: {}
264
263
```
265
264
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
267
266
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.
269
268
270
269
The normative explanation for these variations, aimed at implementors, is in the
271
270
[ Schema Salad specification] ( SchemaSalad.html#Identifier_maps ) .
@@ -293,7 +292,7 @@ Type `<T>` ending with `[]` should be transformed to `{"type": "array", "items":
293
292
294
293
## Extensions and metadata
295
294
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
297
296
a tool or workflow using input parameters which are explicitly propagated to
298
297
output. Future versions of this specification may define additional facilities
299
298
for working with input/output metadata.
@@ -305,6 +304,9 @@ additional fields on any object. Such extensions fields must use a namespace
305
304
prefix listed in the ` $namespaces ` section of the document as described in the
306
305
[ Schema Salad specification] ( SchemaSalad.html#Explicit_context ) .
307
306
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
+
308
310
Implementation extensions which modify execution semantics must be [ listed in
309
311
the ` requirements ` field] ( #Requirements_and_hints ) .
310
312
@@ -353,8 +355,6 @@ platform include:
353
355
(except as described in [ DockerRequirement] ( CommandLineTool.html#DockerRequirement ) ).
354
356
* Using remote or distributed file systems to manage input and output files.
355
357
* Transforming file paths.
356
- * Determining if a process has previously been executed, and if so skipping it
357
- and reusing previous results.
358
358
* Pausing, resuming or checkpointing processes or workflows.
359
359
360
360
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
499
499
parameter reference, interpolation must be recursively applied to the
500
500
trailing characters to yield the final string value.
501
501
502
- ## Expressions
502
+ ## Expressions (Optional)
503
503
504
504
An expression is a fragment of [ Javascript/ECMAScript
505
505
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
510
510
processes in that they are intended to modify the behavior of the workflow
511
511
itself rather than perform the primary work of the workflow.
512
512
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
+
513
519
To declare the use of expressions, the document must include the process
514
520
requirement ` InlineJavascriptRequirement ` . Expressions may be used in any
515
521
field permitting the pseudo-type ` Expression ` , as specified by this
@@ -554,8 +560,8 @@ Implementations may apply other limits, such as process isolation, timeouts,
554
560
and operating system containers/jails to minimize the security risks associated
555
561
with running untrusted code embedded in a CWL document.
556
562
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.
559
565
560
566
## Executing CWL documents as scripts
561
567
@@ -578,11 +584,16 @@ documented in [cwl-runner.cwl](cwl-runner.cwl).
578
584
579
585
To discover CWL documents look in the following locations:
580
586
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/ ` )
582
592
583
- ` /usr/local/share/ commonwl/`
593
+ Then check ` $XDG_DATA_HOME/ commonwl/` .
584
594
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 ` )
586
597
587
- ` $XDG_DATA_HOME ` is from the [ XDG Base Directory
598
+ ` $XDG_DATA_HOME ` and ` $XDG_DATA_DIRS ` are from the [ XDG Base Directory
588
599
Specification] ( http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html )
0 commit comments