14018: Add arv:ProcessProperties to all the extension schemas.
authorPeter Amstutz <peter.amstutz@curii.com>
Tue, 7 Sep 2021 18:45:40 +0000 (14:45 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Tue, 7 Sep 2021 18:45:40 +0000 (14:45 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

sdk/cwl/arvados_cwl/__init__.py
sdk/cwl/arvados_cwl/arv-cwl-schema-v1.0.yml
sdk/cwl/arvados_cwl/arv-cwl-schema-v1.1.yml
sdk/cwl/arvados_cwl/arv-cwl-schema-v1.2.yml
sdk/cwl/tests/test_submit.py

index 7bbb3b29e8b6a27181df115f29b719304f51cb56..ee636be371a4f385c13c6352d077527e362145db 100644 (file)
@@ -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):
index 2a2e857e073e1c14aa8e294a035182f03ab40549..bc5aeaf7970be0f2396f46d9d6aff8f4ea4be372 100644 (file)
@@ -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
index fb14a63e315fc3dd7e56d8f6b832df87aae243a7..a60ead113c179f1285cab2360550e78840f28aac 100644 (file)
@@ -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
index 09951a9848de5a765128a32714bc79ed52ed3638..a34ef3342acca9c0310d513b1f4e782942666350 100644 (file)
@@ -271,6 +271,6 @@ $graph:
         _type: "@vocab"
     processProperties:
       type: PropertyDef[]
-      #jsonldPredicate:
-      #  mapSubject: propertyName
-      #  mapPredicate: propertyValue
+      jsonldPredicate:
+        mapSubject: propertyName
+        mapPredicate: propertyValue
index 2889ce331e4936d95f3b2de34c52bd0acd93e07b..8c0fcaf7419f40a9a679a2e3d569e7f4af1648db 100644 (file)
@@ -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,