[ARVADOS] updated: 04f69b58925d220a78a59f93bcfc3bd1a5c938fe

Git user git at public.curoverse.com
Wed Mar 2 20:11:10 EST 2016


Summary of changes:
 sdk/cwl/arvados_cwl/__init__.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

       via  04f69b58925d220a78a59f93bcfc3bd1a5c938fe (commit)
      from  933502f76e8ee71744097970597f9744c02dd09b (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 04f69b58925d220a78a59f93bcfc3bd1a5c938fe
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Mar 2 20:11:04 2016 -0500

    8488: Fix reverse mapping for references to input files from keep.

diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py
index 0b90c78..8854971 100644
--- a/sdk/cwl/arvados_cwl/__init__.py
+++ b/sdk/cwl/arvados_cwl/__init__.py
@@ -218,6 +218,7 @@ class ArvadosJob(object):
                             break
 
                     self.builder.outdir = outdir
+                    self.builder.pathmapper.keepdir = keepdir
                     outputs = self.collect_outputs("keep:" + record["output"])
             except Exception as e:
                 logger.exception("Got exception while collecting job outputs:")
@@ -261,6 +262,15 @@ class ArvPathMapper(cwltool.pathmapper.PathMapper):
             arvrunner.add_uploaded(src, (ab, st.fn))
             self._pathmap[src] = (ab, st.fn)
 
+        self.keepdir = None
+
+    def reversemap(self, target):
+        if target.startswith("keep:"):
+            return target
+        elif self.keepdir and target.startswith(self.keepdir):
+            return "keep:" + target[len(self.keepdir)+1:]
+        else:
+            return super(ArvPathMapper, self).reversemap(target)
 
 
 class ArvadosCommandTool(cwltool.draft2tool.CommandLineTool):

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list