Skip to content

Commit 09bd8ef

Browse files
author
Peter Amstutz
committed
Updating site generation for draft-4.
1 parent def6e52 commit 09bd8ef

12 files changed

+398
-561
lines changed

site/cwlsite-draft3-job.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,7 @@
5050
"primtype": "#CWLType"
5151
},
5252
{
53-
"source": {
54-
"class": "File",
55-
"path": "../draft-3/salad/schema_salad/metaschema/metaschema.yml",
56-
"secondaryFiles": {"$import": "draft3-deps.json"}
57-
},
53+
"source": {$import: draft3-metaschema.json},
5854
"target": "draft-3/SchemaSalad.html",
5955
"renderlist": [
6056
"https://w3id.org/cwl/salad#Semantic_Annotations_for_Linked_Avro_Data",

site/cwlsite-draft3-schemas.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@
77
"context_target": "draft-3/cwl-context.json",
88
"rdfs_target": "draft-3/cwl.ttl"
99
}, {
10-
"schema_in": {
11-
"class": "File",
12-
"path": "../draft-3/salad/schema_salad/metaschema/metaschema.yml",
13-
"secondaryFiles": {"$import": "draft3-deps.json"}
14-
},
10+
"schema_in": {$import: draft3-metaschema.json},
1511
"context_target": "draft-3/salad-context.json",
1612
"rdfs_target": "draft-3/salad.ttl"
1713
}]

site/cwlsite-draft4-job.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,7 @@
5050
"primtype": "#CWLType"
5151
},
5252
{
53-
"source": {
54-
"class": "File",
55-
"path": "../draft-4/salad/schema_salad/metaschema/metaschema.yml",
56-
"secondaryFiles": {"$import": "draft4-deps.json"}
57-
},
53+
"source": {$import: draft4-metaschema.json},
5854
"target": "draft-4/SchemaSalad.html",
5955
"renderlist": [
6056
"https://w3id.org/cwl/salad#Semantic_Annotations_for_Linked_Avro_Data",

site/cwlsite-draft4-schemas.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@
77
"context_target": "draft-4/cwl-context.json",
88
"rdfs_target": "draft-4/cwl.ttl"
99
}, {
10-
"schema_in": {
11-
"class": "File",
12-
"path": "../draft-4/salad/schema_salad/metaschema/metaschema.yml",
13-
"secondaryFiles": {"$import": "draft4-deps.json"}
14-
},
10+
"schema_in": {$import: draft4-metaschema.json},
1511
"context_target": "draft-4/salad-context.json",
1612
"rdfs_target": "draft-4/salad.ttl"
1713
}

site/cwlsite.cwl

Lines changed: 57 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,48 @@
11
#!/usr/bin/env cwl-runner
2-
cwlVersion: cwl:draft-3
2+
cwlVersion: cwl:draft-4.dev3
33

44
class: Workflow
55
inputs:
6-
- id: render
6+
render:
77
type:
88
type: array
99
items:
10-
name: render
1110
type: record
1211
fields:
13-
- name: source
14-
type: File
15-
- name: renderlist
16-
type:
17-
type: array
18-
items: string
19-
- name: redirect
20-
type:
21-
type: array
22-
items: string
23-
- name: target
24-
type: string
25-
- name: brandlink
26-
type: string
27-
- name: brandimg
28-
type: string
29-
30-
- id: schemas
12+
source: File
13+
renderlist: string[]
14+
redirect: string[]
15+
target: string
16+
brandlink: string
17+
brandimg: string
18+
schemas:
3119
type:
3220
type: array
3321
items:
34-
name: rdfs
3522
type: record
3623
fields:
37-
- name: schema_in
38-
type: File
39-
- name: context_target
40-
type: string
41-
- name: rdfs_target
42-
type: string
43-
- id: brandimg
44-
type: File
45-
- id: empty
24+
schema_in: File
25+
context_target: string
26+
rdfs_target: string
27+
brandimg: File
28+
empty:
4629
type: string
4730
default: ""
4831

4932
outputs:
50-
- id: doc_out
51-
type:
52-
type: array
53-
items: File
54-
source: ["#docs/out", "#brandimg"]
33+
doc_out:
34+
type: File[]
35+
outputSource: [docs/out, brandimg]
5536
linkMerge: merge_flattened
56-
- id: report
37+
report:
5738
type: File
58-
source: "#report/out"
59-
- id: context
60-
type:
61-
type: array
62-
items: File
63-
source: "#context/out"
64-
- id: rdfs
65-
type:
66-
type: array
67-
items: File
68-
source: "#rdfs/out"
39+
outputSource: report/out
40+
context:
41+
type: File[]
42+
outputSource: context/out
43+
rdfs:
44+
type: File[]
45+
outputSource: rdfs/out
6946

7047
requirements:
7148
- class: ScatterFeatureRequirement
@@ -81,54 +58,42 @@ hints:
8158
dockerPull: commonworkflowlanguage/cwltool_module
8259

8360
steps:
84-
- id: rdfs
85-
inputs:
86-
- {id: schema, source: "#schemas", valueFrom: $(self.schema_in) }
87-
- {id: target, source: "#schemas", valueFrom: $(self.rdfs_target) }
88-
outputs:
89-
- { id: out }
90-
scatter: ["#rdfs/schema", "#rdfs/target"]
91-
scatterMethod: dotproduct
61+
rdfs:
62+
scatter: schemas
63+
in:
64+
schemas: schemas
65+
schema: { valueFrom: $(inputs.schemas.schema_in) }
66+
target: { valueFrom: $(inputs.schemas.rdfs_target) }
67+
out: [out]
9268
run: makerdfs.cwl
9369

94-
- id: context
95-
inputs:
96-
- {id: schema, source: "#schemas", valueFrom: $(self.schema_in) }
97-
- {id: target, source: "#schemas", valueFrom: $(self.context_target) }
98-
outputs:
99-
- { id: out }
100-
scatter: ["#context/schema", "#context/target"]
101-
scatterMethod: dotproduct
70+
context:
71+
scatter: schemas
72+
in:
73+
schemas: schemas
74+
schema: { valueFrom: $(inputs.schemas.schema_in) }
75+
target: { valueFrom: $(inputs.schemas.rdfs_target) }
76+
out: [out]
10277
run: makecontext.cwl
10378

104-
- id: docs
105-
inputs:
106-
- { id: source, source: "#render", valueFrom: $(self.source) }
107-
- { id: target, source: "#render", valueFrom: $(self.target) }
108-
- { id: renderlist, source: "#render", valueFrom: $(self.renderlist) }
109-
- { id: redirect, source: "#render", valueFrom: $(self.redirect) }
110-
- { id: brandlink, source: "#render", valueFrom: $(self.brandlink) }
111-
- { id: brand, source: "#render", valueFrom: $(self.brandimg) }
112-
- { id: primtype, source: "#render", valueFrom: $(self.primtype) }
113-
outputs:
114-
- { id: out }
115-
- { id: targetdir }
116-
scatter:
117-
- "#docs/source"
118-
- "#docs/target"
119-
- "#docs/renderlist"
120-
- "#docs/redirect"
121-
- "#docs/brandlink"
122-
- "#docs/primtype"
123-
- "#docs/brand"
124-
scatterMethod: dotproduct
79+
docs:
80+
scatter: render
81+
in:
82+
render: render
83+
source: { valueFrom: $(inputs.render.source) }
84+
target: { valueFrom: $(inputs.render.target) }
85+
renderlist: { valueFrom: $(inputs.render.renderlist) }
86+
redirect: { valueFrom: $(inputs.render.redirect) }
87+
brandlink: { valueFrom: $(inputs.render.brandlink) }
88+
brand: { valueFrom: $(inputs.render.brandimg) }
89+
primtype: { valueFrom: $(inputs.render.primtype) }
90+
out: [out, targetdir]
12591
run: makedoc.cwl
12692

127-
- id: report
128-
inputs:
129-
- {id: inp, source: ["#docs/out", "#brandimg"], linkMerge: merge_flattened }
130-
- {id: dirs, source: ["#docs/targetdir", "#empty"], linkMerge: merge_flattened }
131-
- {id: target, default: "linkchecker-report.txt"}
132-
outputs:
133-
- id: out
93+
report:
94+
in:
95+
inp: { source: [docs/out, brandimg], linkMerge: merge_flattened }
96+
dirs: { source: [docs/targetdir, empty], linkMerge: merge_flattened }
97+
target: { default: "linkchecker-report.txt"}
98+
out: [out]
13499
run: linkchecker.cwl

0 commit comments

Comments
 (0)