From: Peter Amstutz Date: Tue, 7 Sep 2021 18:45:40 +0000 (-0400) Subject: 14018: Add arv:ProcessProperties to all the extension schemas. X-Git-Tag: 2.3.0~70^2~2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/670ba06e9ca3b1a84c88b6d69a36a575df95cb44?hp=97e0090ec440c3322053d7635d883cf8af6633ca 14018: Add arv:ProcessProperties to all the extension schemas. Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py index 7bbb3b29e8..ee636be371 100644 --- a/sdk/cwl/arvados_cwl/__init__.py +++ b/sdk/cwl/arvados_cwl/__init__.py @@ -249,7 +249,8 @@ def add_arv_hints(): "http://arvados.org/cwl#IntermediateOutput", "http://arvados.org/cwl#ReuseRequirement", "http://arvados.org/cwl#ClusterTarget", - "http://arvados.org/cwl#OutputStorageClass" + "http://arvados.org/cwl#OutputStorageClass", + "http://arvados.org/cwl#ProcessProperties" ]) def exit_signal_handler(sigcode, frame): diff --git a/sdk/cwl/arvados_cwl/arv-cwl-schema-v1.0.yml b/sdk/cwl/arvados_cwl/arv-cwl-schema-v1.0.yml index 2a2e857e07..bc5aeaf797 100644 --- a/sdk/cwl/arvados_cwl/arv-cwl-schema-v1.0.yml +++ b/sdk/cwl/arvados_cwl/arv-cwl-schema-v1.0.yml @@ -295,3 +295,37 @@ $graph: - type: array items: string doc: One or more storages classes + +- type: record + name: PropertyDef + doc: | + Define a property that will be set on the submitted container + request associated with this workflow or step. + fields: + - name: propertyName + type: string + doc: The property key + - name: propertyValue + type: [Any] + doc: The property value + + +- name: ProcessProperties + type: record + extends: cwl:ProcessRequirement + inVocab: false + doc: | + Specify metadata properties that will be set on the submitted + container request associated with this workflow or step. + fields: + class: + type: string + doc: "Always 'arv:ProcessProperties" + jsonldPredicate: + _id: "@type" + _type: "@vocab" + processProperties: + type: PropertyDef[] + jsonldPredicate: + mapSubject: propertyName + mapPredicate: propertyValue diff --git a/sdk/cwl/arvados_cwl/arv-cwl-schema-v1.1.yml b/sdk/cwl/arvados_cwl/arv-cwl-schema-v1.1.yml index fb14a63e31..a60ead113c 100644 --- a/sdk/cwl/arvados_cwl/arv-cwl-schema-v1.1.yml +++ b/sdk/cwl/arvados_cwl/arv-cwl-schema-v1.1.yml @@ -238,3 +238,37 @@ $graph: - type: array items: string doc: One or more storages classes + +- type: record + name: PropertyDef + doc: | + Define a property that will be set on the submitted container + request associated with this workflow or step. + fields: + - name: propertyName + type: string + doc: The property key + - name: propertyValue + type: [Any] + doc: The property value + + +- name: ProcessProperties + type: record + extends: cwl:ProcessRequirement + inVocab: false + doc: | + Specify metadata properties that will be set on the submitted + container request associated with this workflow or step. + fields: + class: + type: string + doc: "Always 'arv:ProcessProperties" + jsonldPredicate: + _id: "@type" + _type: "@vocab" + processProperties: + type: PropertyDef[] + jsonldPredicate: + mapSubject: propertyName + mapPredicate: propertyValue diff --git a/sdk/cwl/arvados_cwl/arv-cwl-schema-v1.2.yml b/sdk/cwl/arvados_cwl/arv-cwl-schema-v1.2.yml index 09951a9848..a34ef3342a 100644 --- a/sdk/cwl/arvados_cwl/arv-cwl-schema-v1.2.yml +++ b/sdk/cwl/arvados_cwl/arv-cwl-schema-v1.2.yml @@ -271,6 +271,6 @@ $graph: _type: "@vocab" processProperties: type: PropertyDef[] - #jsonldPredicate: - # mapSubject: propertyName - # mapPredicate: propertyValue + jsonldPredicate: + mapSubject: propertyName + mapPredicate: propertyValue diff --git a/sdk/cwl/tests/test_submit.py b/sdk/cwl/tests/test_submit.py index 2889ce331e..8c0fcaf741 100644 --- a/sdk/cwl/tests/test_submit.py +++ b/sdk/cwl/tests/test_submit.py @@ -1432,10 +1432,10 @@ class TestSubmit(unittest.TestCase): { "class": "http://arvados.org/cwl#ProcessProperties", "processProperties": [ - {"propertyName": "foo", - "propertyValue": "bar"}, {"propertyName": "baz", "propertyValue": "$(inputs.x.basename)"}, + {"propertyName": "foo", + "propertyValue": "bar"}, {"propertyName": "quux", "propertyValue": { "q1": 1,