From cd35e04efaa759d9af9e0f12681b0fc6c554cf24 Mon Sep 17 00:00:00 2001 From: GlassOfWhiskey Date: Tue, 18 Apr 2023 12:04:59 +0200 Subject: [PATCH] Removed DocType from Map and Union --- .github/config/wordlist.txt | 5 ++ .gitignore | 2 +- Base.yml | 101 ++++++++++++++++++++++++++++++++++++ Process.yml | 32 ++++++------ Workflow.yml | 11 ---- render.bash | 3 +- 6 files changed, 124 insertions(+), 30 deletions(-) diff --git a/.github/config/wordlist.txt b/.github/config/wordlist.txt index 039d4ab0..c8b96f43 100644 --- a/.github/config/wordlist.txt +++ b/.github/config/wordlist.txt @@ -54,6 +54,11 @@ cryptographic ctbrown curii cwl +cwlarrayschema +cwlinputfile +cwlobjecttype +cwlrecordfield +cwlrecordschema cwltest cwltool cwltype diff --git a/.gitignore b/.gitignore index 2a25de39..21f3238d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,4 @@ *.egg-info *egg[s] __pycache__ -.python_history +.python_history \ No newline at end of file diff --git a/Base.yml b/Base.yml index 0c4731ec..36a562d2 100644 --- a/Base.yml +++ b/Base.yml @@ -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" @@ -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, CWLObjectType>>`. \ No newline at end of file diff --git a/Process.yml b/Process.yml index 79f850a9..5e2c7a5c 100644 --- a/Process.yml +++ b/Process.yml @@ -283,13 +283,13 @@ $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 @@ -297,9 +297,9 @@ $graph: - name: InputRecordSchema type: record - extends: ["sld:RecordSchema", InputSchema] + extends: [CWLRecordSchema, InputSchema] specialize: - - specializeFrom: "sld:RecordField" + - specializeFrom: CWLRecordField specializeTo: InputRecordField @@ -310,13 +310,13 @@ $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 @@ -324,13 +324,13 @@ $graph: - 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 @@ -338,10 +338,10 @@ $graph: - name: OutputRecordSchema type: record - extends: ["sld:RecordSchema", "#OutputSchema"] + extends: [CWLRecordSchema, "#OutputSchema"] docParent: "#OutputParameter" specialize: - - specializeFrom: "sld:RecordField" + - specializeFrom: CWLRecordField specializeTo: OutputRecordField @@ -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 diff --git a/Workflow.yml b/Workflow.yml index d53c6bcd..d52c65c6 100644 --- a/Workflow.yml +++ b/Workflow.yml @@ -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, CWLObjectType>>`. \ No newline at end of file diff --git a/render.bash b/render.bash index ee774192..68541363 100644 --- a/render.bash +++ b/render.bash @@ -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 \ @@ -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/