X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/da32ae2a73012ce55cb89b2de9a4716b2800eee1..b9b4502bcddeccd794614bf6979d643f9f350877:/sdk/cwl/arvados_cwl/__init__.py diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py index 1d2fa291ec..46436b54dc 100644 --- a/sdk/cwl/arvados_cwl/__init__.py +++ b/sdk/cwl/arvados_cwl/__init__.py @@ -247,10 +247,13 @@ class ArvCwlRunner(object): raise Exception("Output source is not in keep or a literal") sp = k.split("/") srccollection = sp[0][5:] - reader = self.collection_cache.get(srccollection) try: + reader = self.collection_cache.get(srccollection) srcpath = "/".join(sp[1:]) if len(sp) > 1 else "." final.copy(srcpath, v.target, source_collection=reader, overwrite=False) + except arvados.errors.ArgumentError as e: + logger.error("Creating CollectionReader for '%s' '%s': %s", k, v, e) + raise except IOError as e: logger.warn("While preparing output collection: %s", e) @@ -536,7 +539,12 @@ def arg_parser(): # type: () -> argparse.ArgumentParser help="Time to wait for a Javascript expression to evaluate before giving an error, default 20s.", type=float, default=20) - parser.add_argument("--version", action="store_true", help="Print version and exit") + + exgroup = parser.add_mutually_exclusive_group() + exgroup.add_argument("--print-dot", action="store_true", + help="Print workflow visualization in graphviz format and exit") + exgroup.add_argument("--version", action="store_true", help="Print version and exit") + exgroup.add_argument("--validate", action="store_true", help="Validate CWL document only.") exgroup = parser.add_mutually_exclusive_group() exgroup.add_argument("--verbose", action="store_true", help="Default logging") @@ -608,6 +616,10 @@ def arg_parser(): # type: () -> argparse.ArgumentParser help="Desired workflow behavior when a step fails. One of 'stop' or 'continue'. " "Default is 'continue'.", default="continue", choices=("stop", "continue")) + parser.add_argument("--enable-dev", action="store_true", + help="Enable loading and running development versions " + "of CWL spec.", default=False) + parser.add_argument("workflow", type=str, nargs="?", default=None, help="The workflow to execute") parser.add_argument("job_order", nargs=argparse.REMAINDER, help="The input object to the workflow.") @@ -615,6 +627,7 @@ def arg_parser(): # type: () -> argparse.ArgumentParser def add_arv_hints(): cwltool.draft2tool.ACCEPTLIST_EN_RELAXED_RE = re.compile(r".*") + cwltool.draft2tool.ACCEPTLIST_RE = cwltool.draft2tool.ACCEPTLIST_EN_RELAXED_RE res = pkg_resources.resource_stream(__name__, 'arv-cwl-schema.yml') use_custom_schema("v1.0", "http://arvados.org/cwl", res.read()) res.close()