diff --git a/.github/config/wordlist.txt b/.github/config/wordlist.txt index c8b96f43..1f9f8642 100644 --- a/.github/config/wordlist.txt +++ b/.github/config/wordlist.txt @@ -25,6 +25,7 @@ chilton cisphobia classname cmd +colonnelli commandinputarrayschema commandinputenumschema commandinputparameter @@ -113,6 +114,7 @@ gmail gunzip hervé https +iacopo iana ietf implementer @@ -127,6 +129,7 @@ inplaceupdaterequirement inputarrayschema inputenumschema inputbinding +inputfile inputformat inputrecordfield inputrecordschema @@ -275,6 +278,7 @@ tijanić timelimit toc tooltimelimit +torino transcode txt typedef diff --git a/Base.yml b/Base.yml index a3c82fc5..c2ca0d5b 100644 --- a/Base.yml +++ b/Base.yml @@ -285,6 +285,7 @@ $graph: _id: cwl:format _type: "@id" identity: true + noLinkCheck: true doc: | The format of the file: this must be an IRI of a concept node that represents the file format, preferably defined within an ontology. @@ -473,7 +474,6 @@ $graph: items: - "null" - CWLObjectType - flatten: false - type: map values: - "null" @@ -491,4 +491,8 @@ $graph: items: ProcessRequirement - CWLObjectType doc: | - Type representing a valid CWL input file as a `map, CWLObjectType>>`. \ No newline at end of file + Type representing a valid CWL input file as a `map, CWLObjectType>>`. + jsonldPredicate: + _id: "cwl:inputfile" + _container: "@list" + noLinkCheck: true diff --git a/Process.yml b/Process.yml index 5e2c7a5c..acc77c07 100644 --- a/Process.yml +++ b/Process.yml @@ -199,6 +199,7 @@ $graph: _id: cwl:format _type: "@id" identity: true + noLinkCheck: true doc: | Only valid when `type: File` or is an array of `items: File`. @@ -221,6 +222,7 @@ $graph: _id: cwl:format _type: "@id" identity: true + noLinkCheck: true doc: | Only valid when `type: File` or is an array of `items: File`. @@ -374,7 +376,8 @@ $graph: - name: default type: CWLObjectType? jsonldPredicate: - _id: sld:default + _id: "sld:default" + _container: "@list" noLinkCheck: true doc: | The default value to use for this parameter if the parameter is missing diff --git a/Workflow.yml b/Workflow.yml index af19b345..bafe5b46 100644 --- a/Workflow.yml +++ b/Workflow.yml @@ -593,6 +593,7 @@ $graph: default must be applied prior to scattering or evaluating `valueFrom`. jsonldPredicate: _id: "sld:default" + _container: "@list" noLinkCheck: true - name: valueFrom type: diff --git a/concepts.md b/concepts.md index 378c4a42..77a1aa2d 100644 --- a/concepts.md +++ b/concepts.md @@ -331,7 +331,7 @@ prefix listed in the `$namespaces` section of the document as described in the [Schema Salad specification](SchemaSalad.html#Explicit_context). It is recommended that concepts from schema.org are used whenever possible. -For the `$schemas` field we recommend their RDF encoding: http://schema.org/version/latest/schema.rdf +For the `$schemas` field we recommend their RDF encoding: https://schema.org/version/latest/schemaorg-current-https.rdf Implementation extensions which modify execution semantics must be [listed in the `requirements` field](#Requirements_and_hints). diff --git a/render.bash b/render.bash index 68541363..eda4758c 100644 --- a/render.bash +++ b/render.bash @@ -1,14 +1,14 @@ #!/usr/bin/env bash if [[ -z "$WORKSPACE" ]] ; then - WORKSPACE=$PWD + WORKSPACE=$PWD/temp/ fi mkdir -p $WORKSPACE repo=https://github.com/common-workflow-language/cwl-website \ -bn=$(basename $repo) +bn=$WORKSPACE/$(basename $repo) if [[ -d $bn ]] ; then (cd $bn && git fetch origin && git reset --hard origin/main) else - git clone $repo && pushd $bn; git checkout main ; git show --no-patch ; popd + git clone $repo $bn && pushd $bn; git checkout main ; git show --no-patch ; popd fi echo "- basename: Base.yml" >> $WORKSPACE/cwl-website/site/v1.2-deps.yaml echo " class: File" >> $WORKSPACE/cwl-website/site/v1.2-deps.yaml diff --git a/salad/schema_salad/metaschema/metaschema.yml b/salad/schema_salad/metaschema/metaschema.yml index 15952c62..f696e0ae 100644 --- a/salad/schema_salad/metaschema/metaschema.yml +++ b/salad/schema_salad/metaschema/metaschema.yml @@ -274,6 +274,7 @@ $graph: doc: | If true, indicates that the type is a valid at the document root. At least one type in a schema must be tagged with `documentRoot: true`. + jsonldPredicate: sld:documentRoot - name: SaladRecordField @@ -368,10 +369,17 @@ $graph: - name: SaladUnionSchema docParent: "#Schema" type: record - extends: [NamedType, UnionSchema, SchemaDefinedType] + extends: [NamedType, UnionSchema, DocType] documentRoot: true doc: | Define a union type. + fields: + - name: documentRoot + type: boolean? + doc: | + If true, indicates that the type is a valid at the document root. At + least one type in a schema must be tagged with `documentRoot: true`. + jsonldPredicate: sld:documentRoot - name: Documentation diff --git a/salad/schema_salad/metaschema/metaschema_base.yml b/salad/schema_salad/metaschema/metaschema_base.yml index c29b6f99..3bdf6390 100644 --- a/salad/schema_salad/metaschema/metaschema_base.yml +++ b/salad/schema_salad/metaschema/metaschema_base.yml @@ -191,13 +191,6 @@ $graph: _type: "@vocab" refScope: 2 doc: "Defines the type of the array elements." - flatten: - type: boolean? - jsonldPredicate: - _id: "sld:flatten" - _type: "@vocab" - refScope: 2 - doc: "Flatten inner array objects into a single sequence (default: true)." - name: MapSchema diff --git a/salad/schema_salad/metaschema/salad.md b/salad/schema_salad/metaschema/salad.md index dca21120..26d4a6b8 100644 --- a/salad/schema_salad/metaschema/salad.md +++ b/salad/schema_salad/metaschema/salad.md @@ -10,6 +10,7 @@ Contributors: * The developers of JSON-LD * Nebojša Tijanić , Seven Bridges Genomics * Michael R. Crusoe, ELIXIR-DE +* Iacopo Colonnelli, University of Torino # Abstract @@ -120,6 +121,16 @@ clarifications. resolved with [identifier resolution](#Identifier_resolution). Otherwise the field is resolved with [link resolution](#Link_resolution). +## Introduction to v1.3 + +This is the fifth version of the Schema Salad specification. It was created to +enhance code generation by representing CWL data types as specific Python objects +(instead of relying on the generic `Any` type). The following changes have been made: + +* Support for the Avro `map` schema +* Add named versions of the `map` and `union` Avro types +* Support for nested named `union` type definitions + ## References to Other Specifications **Javascript Object Notation (JSON)**: http://json.org @@ -173,7 +184,7 @@ enable or disable the behavior described. ## Data concepts An **object** is a data structure equivalent to the "object" type in JSON, -consisting of an unordered set of name/value pairs (referred to here as +consisting of a unordered set of name/value pairs (referred to here as **fields**) and where the name is a string and the value is a string, number, boolean, array, or object. diff --git a/tests/cat3-tool-docker.cwl b/tests/cat3-tool-docker.cwl deleted file mode 100755 index b486e8ce..00000000 --- a/tests/cat3-tool-docker.cwl +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env cwl-runner -class: CommandLineTool -cwlVersion: v1.2 -doc: "Print the contents of a file to stdout using 'cat' running in a docker container." -requirements: - DockerRequirement: - dockerPull: docker.io/debian:stable-slim -inputs: - file1: - type: File - label: Input File - doc: "The file that will be copied using 'cat'" - inputBinding: {position: 1} -outputs: - output_file: - type: File - outputBinding: {glob: output.txt} -baseCommand: cat -stdout: output.txt diff --git a/tests/wc-tool-shortcut.cwl b/tests/wc-tool-shortcut.cwl deleted file mode 100755 index f157cca3..00000000 --- a/tests/wc-tool-shortcut.cwl +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env cwl-runner - -class: CommandLineTool -cwlVersion: v1.2 - -requirements: - - class: DockerRequirement - dockerPull: docker.io/debian:stable-slim - -inputs: - file1: stdin - -outputs: - output: - type: File - outputBinding: { glob: output } - -baseCommand: [wc] - -stdout: output