Skip to content

Commit d5b2627

Browse files
author
Peter Amstutz
committed
Fix ttl and context generation
1 parent 01cf6db commit d5b2627

File tree

4 files changed

+17
-25
lines changed

4 files changed

+17
-25
lines changed

site/cwlsite.cwl

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ outputs:
3636
report:
3737
type: File
3838
outputSource: report/out
39-
context:
40-
type: File[]
41-
outputSource: context/out
42-
rdfs:
43-
type: File[]
44-
outputSource: rdfs/out
4539

4640
requirements:
4741
- class: ScatterFeatureRequirement
@@ -61,16 +55,16 @@ steps:
6155
schemas: schemas
6256
schema: { valueFrom: $(inputs.schemas.schema_in) }
6357
target: { valueFrom: $(inputs.schemas.rdfs_target) }
64-
out: [out]
58+
out: [out, targetdir]
6559
run: makerdfs.cwl
6660

6761
context:
6862
scatter: schemas
6963
in:
7064
schemas: schemas
7165
schema: { valueFrom: $(inputs.schemas.schema_in) }
72-
target: { valueFrom: $(inputs.schemas.rdfs_target) }
73-
out: [out]
66+
target: { valueFrom: $(inputs.schemas.context_target) }
67+
out: [out, targetdir]
7468
run: makecontext.cwl
7569

7670
docs:
@@ -93,11 +87,11 @@ steps:
9387
source: docs/out
9488
valueFrom: $(self[0])
9589
secondary:
96-
source: [docs/out, brandimg]
90+
source: [docs/out, rdfs/out, context/out, brandimg]
9791
linkMerge: merge_flattened
9892
valueFrom: $(self.slice(1))
9993
dirs:
100-
source: [docs/targetdir, empty]
94+
source: [docs/targetdir, rdfs/targetdir, context/targetdir, empty]
10195
linkMerge: merge_flattened
10296
valueFrom: $(self.slice(1))
10397
out: [dir]

site/makecontext.cwl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
cwlVersion: "cwl:draft-3"
1+
cwlVersion: draft-4.dev3
22
class: CommandLineTool
33
inputs:
4-
- id: schema
4+
schema:
55
type: File
66
inputBinding: {position: 1}
7-
- id: target
8-
type: string
7+
target: string
98
outputs:
10-
- id: out
11-
type: File
9+
out: stdout
10+
targetdir:
11+
type: string
1212
outputBinding:
13-
glob: $(inputs.target)
13+
outputEval: $(inputs.target.match(/^([^/]+)\/[^/]/)[1])
1414
baseCommand: [python, "-mschema_salad", "--print-jsonld-context"]
1515
stdout: $(inputs.target)

site/makedoc.cwl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@ inputs:
3434
type: ["null", string]
3535
inputBinding: {prefix: "--primtype"}
3636
outputs:
37-
out:
38-
type: File
39-
outputBinding:
40-
glob: $(inputs.target)
37+
out: stdout
4138
targetdir:
4239
type: string
4340
outputBinding:

site/makerdfs.cwl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ inputs:
66
inputBinding: {position: 1}
77
target: string
88
outputs:
9-
out:
10-
type: File
9+
out: stdout
10+
targetdir:
11+
type: string
1112
outputBinding:
12-
glob: $(inputs.target)
13+
outputEval: $(inputs.target.match(/^([^/]+)\/[^/]/)[1])
1314
baseCommand: [python, "-mschema_salad", "--print-rdfs"]
1415
stdout: $(inputs.target)

0 commit comments

Comments
 (0)