Skip to content

Commit

Permalink
Added noLinkCheck to format field
Browse files Browse the repository at this point in the history
CWL parsers should not follow `format` links.
  • Loading branch information
GlassOfWhiskey committed Nov 22, 2023
1 parent 61f5c0f commit 9a5e721
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 80 deletions.
1 change: 1 addition & 0 deletions .github/config/wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ inplaceupdaterequirement
inputarrayschema
inputenumschema
inputbinding
inputfile
inputformat
inputrecordfield
inputrecordschema
Expand Down
8 changes: 6 additions & 2 deletions Base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -473,7 +474,6 @@ $graph:
items:
- "null"
- CWLObjectType
flatten: false
- type: map
values:
- "null"
Expand All @@ -491,4 +491,8 @@ $graph:
items: ProcessRequirement
- CWLObjectType
doc: |
Type representing a valid CWL input file as a `map<string, union<array<ProcessRequirement>, CWLObjectType>>`.
Type representing a valid CWL input file as a `map<string, union<array<ProcessRequirement>, CWLObjectType>>`.
jsonldPredicate:
_id: "cwl:inputfile"
_container: "@list"
noLinkCheck: true
5 changes: 4 additions & 1 deletion Process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand All @@ -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`.
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions Workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
6 changes: 3 additions & 3 deletions render.bash
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 9 additions & 1 deletion salad/schema_salad/metaschema/metaschema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions salad/schema_salad/metaschema/metaschema_base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
37 changes: 11 additions & 26 deletions salad/schema_salad/metaschema/salad.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Contributors:
* The developers of JSON-LD
* Nebojša Tijanić <[email protected]>, Seven Bridges Genomics
* Michael R. Crusoe, ELIXIR-DE
* Iacopo Colonnelli, University of Torino

# Abstract

Expand Down Expand Up @@ -94,31 +95,15 @@ ease the development of extensions to CWL v1.2. The only change is that
inherited records can narrow the types of fields if those fields are re-specified
with a matching jsonldPredicate.

### Changelog for v1.2.1

There are no new features nor behavior changes in Schema Salad v1.2.1
as compared to Schema-Salad v1.2. Schema Salad v1.2.1 only fixes typos and adds
clarifications.

* The `salad` directory's contents have been trimmed to the bare necessities.
The `salad/README.rst` has been refreshed from the [upstream repository](https://github.com/common-workflow-language/schema_salad/).
* The [existing behaviour of `$import`](#Import) has been clarified.
If the `$import` node is in an array and the import operation yields an
array, it is flattened to the parent array. Otherwise the `$import`
node is replaced in the document structure by the object or array yielded
from the import operation. An [additional example](#import_example2)
has been added to illustrate this better.
* A pair of missing brackets was added to the [Type DSL Example](#Type_DSL_example)'s
example input.
* Missing newlines have been added to the [identifier map example](#Identifier_map_example)'s
example source and example result.
* [Inherited fields in Salad types](#SaladRecordSchema) may be re-specified
to narrow their type and/or to override the `doc` field.
* Clarify that fields with `jsonldPredicate: { _type: "@id" }` indicate that the
field is a [link fields](#SaladRecordSchema) and that if the `jsonldPredicate`
also has the field `identity` with the value `true`, then field is
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

Expand Down Expand Up @@ -173,7 +158,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.

Expand Down
19 changes: 0 additions & 19 deletions tests/cat3-tool-docker.cwl

This file was deleted.

20 changes: 0 additions & 20 deletions tests/wc-tool-shortcut.cwl

This file was deleted.

0 comments on commit 9a5e721

Please sign in to comment.