Skip to content

Commit d5f2322

Browse files
author
Peter Amstutz
committed
Restore Dirent for InitialWorkDir only.
1 parent b40896c commit d5f2322

File tree

2 files changed

+46
-28
lines changed

2 files changed

+46
-28
lines changed

draft-4/CommandLineTool.yml

+42-14
Original file line numberDiff line numberDiff line change
@@ -630,23 +630,48 @@ $graph:
630630
IRI such as an [RRID](http://www.identifiers.org/rrid/SCR_001156).
631631
Example: `http://identifiers.org/rrid/RRID:SCR_001156`
632632
633-
- name: FileExt
633+
- name: Dirent
634634
type: record
635-
extends: File
635+
doc: |
636+
Define a file or subdirectory that must be placed in the designated output
637+
directory prior to executing the command line tool. May be the result of
638+
executing an expression, such as building a configuration file from a
639+
template.
636640
fields:
637-
writable:
638-
type: boolean?
639-
doc: If true, the File must be writable.
640-
jsonldPredicate: "cwl:writable"
641+
- name: entryname
642+
type: [string, Expression]
643+
jsonldPredicate:
644+
_id: cwl:entryname
645+
doc: |
646+
The name of the file or subdirectory to create in the output directory.
647+
- name: entry
648+
type: [string, Expression]
649+
jsonldPredicate:
650+
_id: cwl:entry
651+
doc: |
652+
If the value is a string literal or an expression which evaluates to a
653+
string, a new file must be created with the string as the file contents.
641654
642-
- name: DirectoryExt
643-
type: record
644-
extends: Directory
645-
fields:
646-
writable:
655+
If the value is an expression that evaluates to a `File` object, this
656+
indicates the referenced file should be added to the designated output
657+
directory prior to executing the tool.
658+
659+
If the value is an expression that evaluates to a `Dirent` object, this
660+
indicates that the File or Directory in `entry` should be added to the
661+
designated output directory with the name in `entryname`.
662+
663+
If `writable` is false, the file may be made available using a bind
664+
mount or file system link to avoid unnecessary copying of the input
665+
file.
666+
- name: writable
647667
type: boolean?
648-
doc: If true, the Directory must be writable.
649-
jsonldPredicate: "cwl:writable"
668+
doc: |
669+
If true, the file or directory must be writable by the tool. Changes
670+
to the file or directory must be isolated and not visible by any other
671+
CommandLineTool process. This may be implemented by making a copy of
672+
the original file or directory. Default false (files and directories
673+
read-only by default).
674+
650675
651676
- name: InitialWorkDirRequirement
652677
type: record
@@ -659,18 +684,21 @@ $graph:
659684
- name: listing
660685
type:
661686
- type: array
662-
items: [FileExt, DirectoryExt, string, Expression]
687+
items: [File, Directory, Dirent, string, Expression]
663688
- string
664689
- Expression
665690
jsonldPredicate:
666691
_id: "cwl:listing"
692+
mapSubject: entryname
693+
mapPredicate: entry
667694
doc: |
668695
The list of files or subdirectories that must be placed in the
669696
designated output directory prior to executing the command line tool.
670697
671698
May be an expression. If so, the expression return value must validate
672699
as `{type: array, items: [File, Directory]}`.
673700
701+
674702
- name: EnvVarRequirement
675703
type: record
676704
extends: "#ProcessRequirement"

draft-4/Process.yml

+4-14
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ $graph:
6565
_type: "@vocab"
6666
doc: Must be `File` to indicate this object describes a file.
6767
- name: location
68-
type: ["null", string, Expression]
68+
type: string?
6969
doc: |
7070
A URI that identifies the file resource. This may be a relative
7171
reference, in which case it must be resolved using the base URI of the
@@ -82,8 +82,6 @@ $graph:
8282
If the `path` field is provided but the `location` field is not, an
8383
implementation may assign the value of the `path` field to `location`,
8484
then follow the rules above.
85-
86-
Must be evaluated as an expression only when appearing in InitialWorkDirRequirement.
8785
jsonldPredicate:
8886
_id: "@id"
8987
_type: "@id"
@@ -104,7 +102,7 @@ $graph:
104102
"_id": "cwl:path"
105103
"_type": "@id"
106104
- name: basename
107-
type: [string, Expression]
105+
type: string
108106
doc: |
109107
The base name of the file, that is, the name of the file without any
110108
leading directory path. The base name must not contain a slash `/`.
@@ -117,8 +115,6 @@ $graph:
117115
When this file is made available to a CommandLineTool, it must be named
118116
with `basename`, i.e. the final component of the `path` field must match
119117
`basename`.
120-
121-
Must be evaluated as an expression only when appearing in InitialWorkDirRequirement.
122118
jsonldPredicate: "cwl:basename"
123119
- name: dirname
124120
type: string?
@@ -194,7 +190,7 @@ $graph:
194190
root of the document. If no ontologies are specified in `$schema`, the
195191
runtime may perform exact file format matches.
196192
- name: contents
197-
type: ["null", string, Expression]
193+
type: string?
198194
doc: |
199195
File contents literal. Maximum of 64 KiB.
200196
@@ -258,7 +254,7 @@ $graph:
258254
_id: "cwl:path"
259255
_type: "@id"
260256
- name: basename
261-
type: [string, Expression]
257+
type: string
262258
doc: |
263259
The base name of the directory, that is, the name of the file without any
264260
leading directory path. The base name must not contain a slash `/`.
@@ -271,16 +267,12 @@ $graph:
271267
When this file is made available to a CommandLineTool, it must be named
272268
with `basename`, i.e. the final component of the `path` field must match
273269
`basename`.
274-
275-
Must be evaluated as an expression only when appearing in InitialWorkDirRequirement.
276270
jsonldPredicate: "cwl:basename"
277271
- name: listing
278272
type:
279273
- "null"
280274
- type: array
281275
items: [File, Directory]
282-
- string
283-
- Expression
284276
doc: |
285277
List of files or subdirectories contained in this directory. The name
286278
of each file or subdirectory is determined by the `basename` field of
@@ -289,8 +281,6 @@ $graph:
289281
`Directory` object share the same `basename`, this must be treated as
290282
equivalent to a single subdirectory with the listings recursively
291283
merged.
292-
293-
Must be evaluated as an expression only when appearing in InitialWorkDirRequirement.
294284
jsonldPredicate:
295285
_id: "cwl:listing"
296286

0 commit comments

Comments
 (0)