[ARVADOS] updated: 0c817f2f98fc9f15bf36ec226da2e72afb34edd5

Git user git at public.curoverse.com
Thu Jul 27 08:56:45 EDT 2017


Summary of changes:
 sdk/cwl/arvados_cwl/__init__.py    |  1 +
 sdk/cwl/arvados_cwl/fsaccess.py    |  3 +++
 sdk/cwl/setup.py                   |  2 +-
 sdk/cwl/tests/test_submit.py       | 14 +++++++++++---
 sdk/cwl/tests/wf/expect_packed.cwl |  2 +-
 5 files changed, 17 insertions(+), 5 deletions(-)

       via  0c817f2f98fc9f15bf36ec226da2e72afb34edd5 (commit)
      from  6164f448f5828e1f4649fae4fe7866b8f082614c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 0c817f2f98fc9f15bf36ec226da2e72afb34edd5
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Jul 26 17:07:24 2017 -0400

    12037: Fix tests.
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curoverse.com>

diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py
index 695597f..7f4b5c7 100644
--- a/sdk/cwl/arvados_cwl/__init__.py
+++ b/sdk/cwl/arvados_cwl/__init__.py
@@ -113,6 +113,7 @@ class ArvCwlRunner(object):
                                                 fs_access=CollectionFsAccess("", collection_cache=self.collection_cache),
                                                 num_retries=self.num_retries,
                                                 overrides=kwargs.get("override_tools"))
+        kwargs["resolver"] = partial(collectionResolver, self.api, num_retries=self.num_retries)
         if "class" in toolpath_object and toolpath_object["class"] == "CommandLineTool":
             return ArvadosCommandTool(self, toolpath_object, **kwargs)
         elif "class" in toolpath_object and toolpath_object["class"] == "Workflow":
diff --git a/sdk/cwl/arvados_cwl/fsaccess.py b/sdk/cwl/arvados_cwl/fsaccess.py
index 93e2819..08e203b 100644
--- a/sdk/cwl/arvados_cwl/fsaccess.py
+++ b/sdk/cwl/arvados_cwl/fsaccess.py
@@ -227,6 +227,9 @@ workflow_uuid_pattern = re.compile(r'[a-z0-9]{5}-7fd4e-[a-z0-9]{15}')
 pipeline_template_uuid_pattern = re.compile(r'[a-z0-9]{5}-p5p6p-[a-z0-9]{15}')
 
 def collectionResolver(api_client, document_loader, uri, num_retries=4):
+    if uri.startswith("keep:") or uri.startswith("arvwf:"):
+        return uri
+
     if workflow_uuid_pattern.match(uri):
         return "arvwf:%s#main" % (uri)
 
diff --git a/sdk/cwl/setup.py b/sdk/cwl/setup.py
index 0823f89..572519f 100644
--- a/sdk/cwl/setup.py
+++ b/sdk/cwl/setup.py
@@ -51,7 +51,7 @@ setup(name='arvados-cwl-runner',
       # Note that arvados/build/run-build-packages.sh looks at this
       # file to determine what version of cwltool and schema-salad to build.
       install_requires=[
-          'cwltool==1.0.20170723124118',
+          'cwltool==1.0.20170727112954',
           'schema-salad==2.6.20170712194300',
           'typing==3.5.3.0',
           'ruamel.yaml==0.13.7',
diff --git a/sdk/cwl/tests/test_submit.py b/sdk/cwl/tests/test_submit.py
index 3d6b915..8ab0a8d 100644
--- a/sdk/cwl/tests/test_submit.py
+++ b/sdk/cwl/tests/test_submit.py
@@ -84,7 +84,13 @@ def stubs(func):
                 "uuid": "",
                 "portable_data_hash": "99999999999999999999999999999998+99",
                 "manifest_text": ". 99999999999999999999999999999998+99 0:0:file1.txt"
-            }}
+            },
+            "99999999999999999999999999999994+99": {
+                "uuid": "",
+                "portable_data_hash": "99999999999999999999999999999994+99",
+                "manifest_text": ". 99999999999999999999999999999994+99 0:0:expect_arvworkflow.cwl"
+            }
+        }
         stubs.api.collections().create.side_effect = functools.partial(collection_createstub, created_collections)
         stubs.api.collections().get.side_effect = functools.partial(collection_getstub, created_collections)
 
@@ -152,7 +158,8 @@ def stubs(func):
                             'class': 'File',
                             'location': 'keep:169f39d466a5438ac4a90e779bf750c7+53/blorp.txt',
                             "nameext": ".txt",
-                            "nameroot": "blorp"
+                            "nameroot": "blorp",
+                            "size": 16
                         }},
                         'z': {"value": {'basename': 'anonymous', 'class': 'Directory',
                               'listing': [
@@ -217,7 +224,8 @@ def stubs(func):
                             'class': 'File',
                             'location': u'keep:169f39d466a5438ac4a90e779bf750c7+53/blorp.txt',
                             "nameext": ".txt",
-                            "nameroot": "blorp"
+                            "nameroot": "blorp",
+                            "size": 16
                         },
                         'z': {'basename': 'anonymous', 'class': 'Directory', 'listing': [
                             {'basename': 'renamed.txt',
diff --git a/sdk/cwl/tests/wf/expect_packed.cwl b/sdk/cwl/tests/wf/expect_packed.cwl
index 32a9255..f450771 100644
--- a/sdk/cwl/tests/wf/expect_packed.cwl
+++ b/sdk/cwl/tests/wf/expect_packed.cwl
@@ -24,7 +24,7 @@ $graph:
   - id: '#main/x'
     type: File
     default: {class: File, location: 'keep:169f39d466a5438ac4a90e779bf750c7+53/blorp.txt',
-      basename: blorp.txt, nameroot: blorp, nameext: .txt}
+      size: 16, basename: blorp.txt, nameroot: blorp, nameext: .txt}
   - id: '#main/y'
     type: Directory
     default: {class: Directory, location: 'keep:99999999999999999999999999999998+99',

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list