[ARVADOS] updated: 01b5da8f2cd7f88dba7be836673c22579b465422
Git user
git at public.curoverse.com
Wed Dec 21 10:34:59 EST 2016
Summary of changes:
sdk/cwl/arvados_cwl/__init__.py | 2 +-
sdk/cwl/arvados_cwl/arvcontainer.py | 2 --
sdk/cwl/arvados_cwl/pathmapper.py | 25 +++++++++++++------------
3 files changed, 14 insertions(+), 15 deletions(-)
via 01b5da8f2cd7f88dba7be836673c22579b465422 (commit)
from 328f506a294619694b84cf123332f7c2694552e1 (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 01b5da8f2cd7f88dba7be836673c22579b465422
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Wed Dec 21 10:34:53 2016 -0500
10497: Use SourceLine in context manager in PathMapper. Remove unnecessary import.
diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py
index 85156db..d4af0f9 100644
--- a/sdk/cwl/arvados_cwl/__init__.py
+++ b/sdk/cwl/arvados_cwl/__init__.py
@@ -208,7 +208,7 @@ class ArvCwlRunner(object):
raise SourceLine(obj, "stderr", UnsupportedRequirement).makeError("Stderr redirection currently not suppported with --api=containers")
for v in obj.itervalues():
self.check_features(v)
- if isinstance(obj, list):
+ elif isinstance(obj, list):
for i,v in enumerate(obj):
with SourceLine(obj, i, UnsupportedRequirement):
self.check_features(v)
diff --git a/sdk/cwl/arvados_cwl/arvcontainer.py b/sdk/cwl/arvados_cwl/arvcontainer.py
index 25a8ffa..dbbd83d 100644
--- a/sdk/cwl/arvados_cwl/arvcontainer.py
+++ b/sdk/cwl/arvados_cwl/arvcontainer.py
@@ -4,8 +4,6 @@ import os
import ruamel.yaml as yaml
-from schema_salad.sourceline import SourceLine
-
from cwltool.errors import WorkflowException
from cwltool.process import get_feature, UnsupportedRequirement, shortname
from cwltool.pathmapper import adjustFiles
diff --git a/sdk/cwl/arvados_cwl/pathmapper.py b/sdk/cwl/arvados_cwl/pathmapper.py
index e63161d..a6b3d15 100644
--- a/sdk/cwl/arvados_cwl/pathmapper.py
+++ b/sdk/cwl/arvados_cwl/pathmapper.py
@@ -40,19 +40,20 @@ class ArvPathMapper(PathMapper):
# mount.
ab = abspath(src, self.input_basedir)
st = arvados.commands.run.statfile("", ab, fnPattern="keep:%s/%s")
- if isinstance(st, arvados.commands.run.UploadFile):
- uploadfiles.add((src, ab, st))
- elif isinstance(st, arvados.commands.run.ArvFile):
- self._pathmap[src] = MapperEnt(st.fn, self.collection_pattern % st.fn[5:], "File")
- elif src.startswith("_:"):
- if "contents" in srcobj:
- pass
+ with SourceLine(srcobj, "location", WorkflowException):
+ if isinstance(st, arvados.commands.run.UploadFile):
+ uploadfiles.add((src, ab, st))
+ elif isinstance(st, arvados.commands.run.ArvFile):
+ self._pathmap[src] = MapperEnt(st.fn, self.collection_pattern % st.fn[5:], "File")
+ elif src.startswith("_:"):
+ if "contents" in srcobj:
+ pass
+ else:
+ raise WorkflowException("File literal '%s' is missing contents" % src)
+ elif src.startswith("arvwf:"):
+ self._pathmap[src] = MapperEnt(src, src, "File")
else:
- raise SourceLine(srcobj, "location", WorkflowException).makeError("File literal '%s' is missing contents" % src)
- elif src.startswith("arvwf:"):
- self._pathmap[src] = MapperEnt(src, src, "File")
- else:
- raise SourceLine(srcobj, "location", WorkflowException).makeError("Input file path '%s' is invalid" % st)
+ raise WorkflowException("Input file path '%s' is invalid" % st)
if "secondaryFiles" in srcobj:
for l in srcobj["secondaryFiles"]:
self.visit(l, uploadfiles)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list