Skip to content

Commit c332dde

Browse files
author
Peter Amstutz
committed
Squashed 'cwltool/schemas/' changes from 5239b16..a5976f3
a5976f3 Unify Directory listing, InitialWorkDir and secondaryFiles to accept equivalent type. eb9449f Adding directory feature tests. 9dfbb8e Update tests to use InitialWorkDirRequirement git-subtree-dir: cwltool/schemas git-subtree-split: a5976f3
1 parent d47df44 commit c332dde

File tree

11 files changed

+78
-5
lines changed

11 files changed

+78
-5
lines changed

draft-4/CommandLineTool.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ $graph:
646646
- name: listing
647647
type:
648648
- type: array
649-
items: DirentExt
649+
items: [File, DirentExt]
650650
- string
651651
- Expression
652652
jsonldPredicate:

draft-4/Process.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,10 @@ $graph:
225225
_id: "cwl:path"
226226
_type: "@id"
227227
- name: listing
228-
type: Dirent[]?
228+
type:
229+
- "null"
230+
- type: array
231+
items: [File, Dirent]
229232
doc: List of files or subdirectories contained in this directory
230233
jsonldPredicate:
231234
_id: "cwl:listing"

draft-4/conformance_test_draft-4.yaml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,4 +735,28 @@
735735
],
736736
}
737737
tool: draft-4/dir3.cwl
738-
doc: Test directory input in Docker
738+
doc: Test directory input in Docker
739+
740+
- job: draft-4/dir4-job.yml
741+
output:
742+
"outlist": {
743+
"size": 20,
744+
"location": "output.txt",
745+
"checksum": "sha1$13cda8661796ae241da3a18668fb552161a72592",
746+
"class": "File"
747+
}
748+
tool: draft-4/dir4.cwl
749+
doc: Test directories in secondaryFiles
750+
751+
- job: draft-4/dir-job.yml
752+
output: {
753+
"outlist": {
754+
"checksum": "sha1$907a866a3e0b7f1fc5a2222531c5fb9063704438",
755+
"path": "/home/peter/work/common-workflow-language/draft-4/draft-4/output.txt",
756+
"size": 33,
757+
"location": "file:///home/peter/work/common-workflow-language/draft-4/draft-4/output.txt",
758+
"class": "File"
759+
}
760+
}
761+
tool: draft-4/dir5.cwl
762+
doc: Test dynamic initial work dir

draft-4/draft-4/dir4-job.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
inf:
2+
class: File
3+
location: hello.tar
4+
secondaryFiles:
5+
- class: File
6+
location: index.py
7+
- entryname: testdir
8+
entry:
9+
class: Directory
10+
location: testdir

draft-4/draft-4/dir4.cwl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
class: CommandLineTool
2+
cwlVersion: draft-4.dev3
3+
requirements:
4+
- class: ShellCommandRequirement
5+
inputs:
6+
inf: File
7+
outputs:
8+
outlist:
9+
type: File
10+
outputBinding:
11+
glob: output.txt
12+
baseCommand: []
13+
arguments: ["cd", "$(inputs.inf.dirname)",
14+
{shellQuote: false, valueFrom: "&&"},
15+
"find", ".",
16+
{shellQuote: false, valueFrom: "|"},
17+
"sort"]
18+
stdout: output.txt

draft-4/draft-4/dir5.cwl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
class: CommandLineTool
2+
cwlVersion: draft-4.dev3
3+
requirements:
4+
- class: ShellCommandRequirement
5+
- class: InitialWorkDirRequirement
6+
listing: $(inputs.indir.listing)
7+
inputs:
8+
indir: Directory
9+
outputs:
10+
outlist:
11+
type: File
12+
outputBinding:
13+
glob: output.txt
14+
baseCommand: []
15+
arguments: ["find", ".",
16+
{shellQuote: false, valueFrom: "|"},
17+
"sort"]
18+
stdout: output.txt

draft-4/draft-4/rename.cwl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ class: CommandLineTool
22
cwlVersion: cwl:draft-4.dev3
33
baseCommand: "true"
44
requirements:
5-
CreateFileRequirement:
5+
InitialWorkDirRequirement:
66
listing:
77
- entryname: $(inputs.newname)
88
entry: $(inputs.srcfile)

draft-4/draft-4/template-tool.cwl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ requirements:
88
expressionLib:
99
- { $include: underscore.js }
1010
- "var t = function(s) { return _.template(s)({'inputs': inputs}); };"
11-
- class: CreateFileRequirement
11+
- class: InitialWorkDirRequirement
1212
listing:
1313
foo.txt: >
1414
$(t("The file is <%= inputs.file1.path.split('/').slice(-1)[0] %>\n"))

draft-4/draft-4/testdir/a

Whitespace-only changes.

draft-4/draft-4/testdir/b

Whitespace-only changes.

0 commit comments

Comments
 (0)