[ARVADOS] updated: 87143451d4c6535576fe7232729ae9ce93a26d30
Git user
git at public.curoverse.com
Thu Dec 1 13:11:30 EST 2016
Summary of changes:
sdk/cwl/arvados_cwl/__init__.py | 11 +++++------
sdk/cwl/arvados_cwl/runner.py | 7 ++++---
2 files changed, 9 insertions(+), 9 deletions(-)
via 87143451d4c6535576fe7232729ae9ce93a26d30 (commit)
via 5f38e62616773fcc97d795d1dd707c7fce801f2a (commit)
from 1a8d456e6e8b7026dfe1c1b1176e8d46f9f374e7 (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 87143451d4c6535576fe7232729ae9ce93a26d30
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Thu Dec 1 13:11:24 2016 -0500
10293: Fix error message when wrong --api provided.
diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py
index bd65252..4fb240f 100644
--- a/sdk/cwl/arvados_cwl/__init__.py
+++ b/sdk/cwl/arvados_cwl/__init__.py
@@ -73,7 +73,9 @@ class ArvCwlRunner(object):
else:
self.keep_client = arvados.keep.KeepClient(api_client=self.api, num_retries=self.num_retries)
- for api in ["jobs", "containers"]:
+ self.work_api = None
+ expected_api = ["jobs", "containers"]
+ for api in expected_api:
try:
methods = self.api._rootDesc.get('resources')[api]['methods']
if ('httpMethod' in methods['create'] and
@@ -82,11 +84,12 @@ class ArvCwlRunner(object):
break
except KeyError:
pass
+
if not self.work_api:
if work_api is None:
raise Exception("No supported APIs")
else:
- raise Exception("Unsupported API '%s'" % work_api)
+ raise Exception("Unsupported API '%s', expected one of %s" % (work_api, expected_api))
def arv_make_tool(self, toolpath_object, **kwargs):
kwargs["work_api"] = self.work_api
@@ -567,10 +570,6 @@ def main(args, stdout, stderr, api_client=None, keep_client=None):
return 1
arvargs.work_api = want_api
- if arvargs.work_api not in ("jobs", "containers"):
- logger.error("Unknown --api '%s' expected one of 'jobs' or 'containers'", arvargs.work_api)
- return 1
-
if (arvargs.create_workflow or arvargs.update_workflow) and not arvargs.job_order:
job_order_object = ({}, "")
commit 5f38e62616773fcc97d795d1dd707c7fce801f2a
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Wed Nov 30 17:12:42 2016 -0500
10293: Avoid noisy and unhelpful error when cwl.output.json is missing.
diff --git a/sdk/cwl/arvados_cwl/runner.py b/sdk/cwl/arvados_cwl/runner.py
index 178285d..4854a06 100644
--- a/sdk/cwl/arvados_cwl/runner.py
+++ b/sdk/cwl/arvados_cwl/runner.py
@@ -203,9 +203,10 @@ class Runner(object):
api_client=self.arvrunner.api,
keep_client=self.arvrunner.keep_client,
num_retries=self.arvrunner.num_retries)
- with outc.open("cwl.output.json") as f:
- if f.size() > 0:
- outputs = json.load(f)
+ if "cwl.output.json" in outc:
+ with outc.open("cwl.output.json") as f:
+ if f.size() > 0:
+ outputs = json.load(f)
def keepify(fileobj):
path = fileobj["location"]
if not path.startswith("keep:"):
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list