Skip to content

Commit

Permalink
Removed DocType from Map and Union
Browse files Browse the repository at this point in the history
  • Loading branch information
GlassOfWhiskey committed Oct 7, 2023
1 parent e72903f commit cd35e04
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 30 deletions.
5 changes: 5 additions & 0 deletions .github/config/wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ cryptographic
ctbrown
curii
cwl
cwlarrayschema
cwlinputfile
cwlobjecttype
cwlrecordfield
cwlrecordschema
cwltest
cwltool
cwltype
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
*.egg-info
*egg[s]
__pycache__
.python_history
.python_history
101 changes: 101 additions & 0 deletions Base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,97 @@ $graph:
- "File: A File object"
- "Directory: A Directory object"

- name: CWLArraySchema
type: record
fields:
type:
doc: "Must be `array`"
type:
type: enum
name: cwl_array_name
symbols:
- "sld:array"
jsonldPredicate:
_id: "sld:type"
_type: "@vocab"
typeDSL: true
refScope: 2
items:
type:
- PrimitiveType
- CWLRecordSchema
- EnumSchema
- CWLArraySchema
- string
- type: array
items:
- PrimitiveType
- CWLRecordSchema
- EnumSchema
- CWLArraySchema
- string
jsonldPredicate:
_id: "sld:items"
_type: "@vocab"
refScope: 2
doc: "Defines the type of the array elements."

- name: CWLRecordField
type: record
extends: "sld:Documented"
doc: A field of a record.
fields:
- name: name
type: string
jsonldPredicate: "@id"
doc: |
The name of the field
- name: type
type:
- PrimitiveType
- CWLRecordSchema
- EnumSchema
- CWLArraySchema
- string
- type: array
items:
- PrimitiveType
- CWLRecordSchema
- EnumSchema
- CWLArraySchema
- string
jsonldPredicate:
_id: sld:type
_type: "@vocab"
typeDSL: true
refScope: 2
doc: |
The field type
- name: CWLRecordSchema
type: record
fields:
type:
doc: "Must be `record`"
type:
type: enum
name: cwl_record_name
symbols:
- "sld:record"
jsonldPredicate:
_id: "sld:type"
_type: "@vocab"
typeDSL: true
refScope: 2
fields:
type: CWLRecordField[]?
jsonldPredicate:
_id: sld:fields
mapSubject: name
mapPredicate: type
doc: "Defines the fields of the record."

- name: File
type: record
docParent: "#CWLType"
Expand Down Expand Up @@ -420,3 +511,13 @@ $graph:
Generic type representing a valid CWL object. It is used to represent
`default` values passed to CWL `InputParameter` and `WorkflowStepInput`
record fields.
- name: CWLInputFile
type: map
values:
- "null"
- type: array
items: ProcessRequirement
- CWLObjectType
doc: |
Type representing a valid CWL input file as a `map<string, union<array<ProcessRequirement>, CWLObjectType>>`.
32 changes: 16 additions & 16 deletions Process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,23 +283,23 @@ $graph:

- name: InputRecordField
type: record
extends: [sld:RecordField, FieldBase, InputFormat, LoadContents]
extends: [CWLRecordField, FieldBase, InputFormat, LoadContents]
specialize:
- specializeFrom: "sld:RecordSchema"
- specializeFrom: CWLRecordSchema
specializeTo: InputRecordSchema
- specializeFrom: "sld:EnumSchema"
specializeTo: InputEnumSchema
- specializeFrom: "sld:ArraySchema"
- specializeFrom: CWLArraySchema
specializeTo: InputArraySchema
- specializeFrom: "sld:PrimitiveType"
specializeTo: CWLType


- name: InputRecordSchema
type: record
extends: ["sld:RecordSchema", InputSchema]
extends: [CWLRecordSchema, InputSchema]
specialize:
- specializeFrom: "sld:RecordField"
- specializeFrom: CWLRecordField
specializeTo: InputRecordField


Expand All @@ -310,38 +310,38 @@ $graph:

- name: InputArraySchema
type: record
extends: ["sld:ArraySchema", InputSchema]
extends: [CWLArraySchema, InputSchema]
specialize:
- specializeFrom: "sld:RecordSchema"
- specializeFrom: CWLRecordSchema
specializeTo: InputRecordSchema
- specializeFrom: "sld:EnumSchema"
specializeTo: InputEnumSchema
- specializeFrom: "sld:ArraySchema"
- specializeFrom: CWLArraySchema
specializeTo: InputArraySchema
- specializeFrom: "sld:PrimitiveType"
specializeTo: CWLType


- name: OutputRecordField
type: record
extends: [sld:RecordField, FieldBase, OutputFormat]
extends: [CWLRecordField, FieldBase, OutputFormat]
specialize:
- specializeFrom: "sld:RecordSchema"
- specializeFrom: CWLRecordSchema
specializeTo: OutputRecordSchema
- specializeFrom: "sld:EnumSchema"
specializeTo: OutputEnumSchema
- specializeFrom: "sld:ArraySchema"
- specializeFrom: CWLArraySchema
specializeTo: OutputArraySchema
- specializeFrom: "sld:PrimitiveType"
specializeTo: CWLType


- name: OutputRecordSchema
type: record
extends: ["sld:RecordSchema", "#OutputSchema"]
extends: [CWLRecordSchema, "#OutputSchema"]
docParent: "#OutputParameter"
specialize:
- specializeFrom: "sld:RecordField"
- specializeFrom: CWLRecordField
specializeTo: OutputRecordField


Expand All @@ -353,14 +353,14 @@ $graph:

- name: OutputArraySchema
type: record
extends: ["sld:ArraySchema", OutputSchema]
extends: [CWLArraySchema, OutputSchema]
docParent: "#OutputParameter"
specialize:
- specializeFrom: "sld:RecordSchema"
- specializeFrom: CWLRecordSchema
specializeTo: OutputRecordSchema
- specializeFrom: "sld:EnumSchema"
specializeTo: OutputEnumSchema
- specializeFrom: "sld:ArraySchema"
- specializeFrom: CWLArraySchema
specializeTo: OutputArraySchema
- specializeFrom: "sld:PrimitiveType"
specializeTo: CWLType
Expand Down
11 changes: 0 additions & 11 deletions Workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -978,14 +978,3 @@ $graph:
"_type": "@vocab"

- {$import: Operation.yml}


- name: CWLInputFile
type: map
values:
- "null"
- type: array
items: ProcessRequirement
- CWLObjectType
doc: |
Type representing a valid CWL input file as a `map<string, union<array<ProcessRequirement>, CWLObjectType>>`.
3 changes: 1 addition & 2 deletions render.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
if [[ -z "$WORKSPACE" ]] ; then
WORKSPACE=$PWD/temp/
WORKSPACE=$PWD
fi
mkdir -p $WORKSPACE
repo=https://github.com/common-workflow-language/cwl-website \
Expand All @@ -13,7 +13,6 @@ fi
echo "- basename: Base.yml" >> $WORKSPACE/cwl-website/site/v1.2-deps.yaml
echo " class: File" >> $WORKSPACE/cwl-website/site/v1.2-deps.yaml
echo " location: ../v1.2/Base.yml" >> $WORKSPACE/cwl-website/site/v1.2-deps.yaml
cat $WORKSPACE/cwl-website/site/v1.2-deps.yaml
CURDIR=$PWD
pushd $WORKSPACE/cwl-website ; ln -s $CURDIR v1.2 ; popd
cp cwlsite-v1.2-only-job.yaml $WORKSPACE/cwl-website/site/
Expand Down

0 comments on commit cd35e04

Please sign in to comment.