[ARVADOS] updated: 8ffcfd1523d2a023c0286976a1aed50fb70dea3a

Git user git at public.curoverse.com
Thu May 25 21:50:08 EDT 2017


Summary of changes:
 sdk/cwl/arvados_cwl/pathmapper.py |  3 ++-
 sdk/cwl/setup.py                  |  2 +-
 sdk/cwl/tests/test_pathmapper.py  | 13 +++++++++++++
 3 files changed, 16 insertions(+), 2 deletions(-)

       via  8ffcfd1523d2a023c0286976a1aed50fb70dea3a (commit)
       via  9a7ea56065ed47ef114d569f137ff50d1efffc48 (commit)
      from  932a318673b17b63a2f2d99a6ba170c908ef3b20 (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 8ffcfd1523d2a023c0286976a1aed50fb70dea3a
Merge: 932a318 9a7ea56
Author: Jiayong Li <jiayong at math.mit.edu>
Date:   Thu May 25 21:49:26 2017 -0400

    closes #11362 Merge branch '11362-missing-input-sdk/cwl'


commit 9a7ea56065ed47ef114d569f137ff50d1efffc48
Author: Jiayong Li <jiayong at math.mit.edu>
Date:   Thu May 25 21:47:59 2017 -0400

    Change visit in pathmapper.py to raise OSError if input file is not found, change test_pathmapper.py to test it, and update python client version in setup.py

diff --git a/sdk/cwl/arvados_cwl/pathmapper.py b/sdk/cwl/arvados_cwl/pathmapper.py
index 52a65ff..1ab8e83 100644
--- a/sdk/cwl/arvados_cwl/pathmapper.py
+++ b/sdk/cwl/arvados_cwl/pathmapper.py
@@ -61,7 +61,8 @@ class ArvPathMapper(PathMapper):
                 ab = abspath(src, self.input_basedir)
                 st = arvados.commands.run.statfile("", ab,
                                                    fnPattern="keep:%s/%s",
-                                                   dirPattern="keep:%s/%s")
+                                                   dirPattern="keep:%s/%s",
+                                                   raiseOSError=True)
                 with SourceLine(srcobj, "location", WorkflowException):
                     if isinstance(st, arvados.commands.run.UploadFile):
                         uploadfiles.add((src, ab, st))
diff --git a/sdk/cwl/setup.py b/sdk/cwl/setup.py
index 38f1505..02c612f 100644
--- a/sdk/cwl/setup.py
+++ b/sdk/cwl/setup.py
@@ -52,7 +52,7 @@ setup(name='arvados-cwl-runner',
           'schema-salad==2.5.20170428142041',
           'typing==3.5.3.0',
           'ruamel.yaml==0.13.7',
-          'arvados-python-client>=0.1.20170523195205',
+          'arvados-python-client>=0.1.20170526013812',
           'setuptools'
       ],
       data_files=[
diff --git a/sdk/cwl/tests/test_pathmapper.py b/sdk/cwl/tests/test_pathmapper.py
index 7ba9649..86c48f2 100644
--- a/sdk/cwl/tests/test_pathmapper.py
+++ b/sdk/cwl/tests/test_pathmapper.py
@@ -101,3 +101,16 @@ class TestPathmap(unittest.TestCase):
 
         self.assertEqual({'file:tests/hw.py': MapperEnt(resolved='keep:99999999999999999999999999999991+99/hw.py', target='/test/99999999999999999999999999999991+99/hw.py', type='File', staged=True)},
                          p._pathmap)
+
+    @mock.patch("os.stat")
+    def test_missing_file(self, stat):
+        """Test pathmapper handling missing references."""
+        arvrunner = arvados_cwl.ArvCwlRunner(self.api)
+
+        stat.side_effect = OSError(2, "No such file or directory")
+
+        with self.assertRaises(OSError):
+            p = ArvPathMapper(arvrunner, [{
+                "class": "File",
+                "location": "file:tests/hw.py"
+            }], "", "/test/%s", "/test/%s/%s")

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list