[ARVADOS] updated: 6f2ac70b70d4b64b728b815d5be429d5a165e2f0

Git user git at public.curoverse.com
Thu Nov 17 16:49:17 EST 2016


Summary of changes:
 sdk/cwl/arvados_cwl/__init__.py | 10 +++++-----
 sdk/cwl/tests/test_submit.py    |  9 +++++++--
 2 files changed, 12 insertions(+), 7 deletions(-)

       via  6f2ac70b70d4b64b728b815d5be429d5a165e2f0 (commit)
       via  c654baedb04251a741c840860041768ec661d3e7 (commit)
      from  a4e81f561cce966074a72ff6219826a89152451a (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 6f2ac70b70d4b64b728b815d5be429d5a165e2f0
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Nov 17 16:49:12 2016 -0500

    10498: Check error message in "incompatible APIs" test.

diff --git a/sdk/cwl/tests/test_submit.py b/sdk/cwl/tests/test_submit.py
index 95ccd9e..c4b0cea 100644
--- a/sdk/cwl/tests/test_submit.py
+++ b/sdk/cwl/tests/test_submit.py
@@ -567,15 +567,20 @@ class TestCreateWorkflow(unittest.TestCase):
 
     @stubs
     def test_incompatible_api(self, stubs):
-        capture_stdout = cStringIO.StringIO()
+        capture_stderr = cStringIO.StringIO()
+        logging.getLogger('arvados.cwl-runner').addHandler(
+            logging.StreamHandler(capture_stderr))
 
         exited = arvados_cwl.main(
             ["--update-workflow", self.existing_workflow_uuid,
              "--api=jobs",
              "--debug",
              "tests/wf/submit_wf.cwl", "tests/submit_test_job.json"],
-            capture_stdout, sys.stderr, api_client=stubs.api)
+            sys.stderr, sys.stderr, api_client=stubs.api)
         self.assertEqual(exited, 1)
+        self.assertRegexpMatches(
+            capture_stderr.getvalue(),
+            "--update-workflow arg '{}' uses 'containers' API, but --api='jobs' specified".format(self.existing_workflow_uuid))
 
     @stubs
     def test_update(self, stubs):

commit c654baedb04251a741c840860041768ec661d3e7
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Nov 17 16:48:38 2016 -0500

    10498: Tweak var names and help messages.

diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py
index 5515694..4c05f38 100644
--- a/sdk/cwl/arvados_cwl/__init__.py
+++ b/sdk/cwl/arvados_cwl/__init__.py
@@ -294,19 +294,19 @@ class ArvCwlRunner(object):
                                                                  keep_client=self.keep_client)
         self.fs_access = make_fs_access(kwargs["basedir"])
 
-        update_uuid = kwargs.get("update_workflow")
-        if update_uuid or kwargs.get("create_workflow"):
+        existing_uuid = kwargs.get("update_workflow")
+        if existing_uuid or kwargs.get("create_workflow"):
             if self.work_api == "jobs":
                 tmpl = RunnerTemplate(self, tool, job_order,
                                       kwargs.get("enable_reuse"),
-                                      uuid=update_uuid)
+                                      uuid=existing_uuid)
                 tmpl.save()
                 # cwltool.main will write our return value to stdout.
                 return tmpl.uuid
             else:
                 return upload_workflow(self, tool, job_order,
                                        self.project_uuid,
-                                       uuid=update_uuid)
+                                       uuid=existing_uuid)
 
         self.ignore_docker_for_reuse = kwargs.get("ignore_docker_for_reuse")
 
@@ -494,7 +494,7 @@ def arg_parser():  # type: () -> argparse.ArgumentParser
                         default=True, dest="submit")
     exgroup.add_argument("--create-template", action="store_true", help="(Deprecated) synonym for --create-workflow.",
                          dest="create_workflow")
-    exgroup.add_argument("--create-workflow", action="store_true", help="Create an Arvados workflow or pipeline template (depending on selected API, see --api).")
+    exgroup.add_argument("--create-workflow", action="store_true", help="Create an Arvados workflow (if using the 'containers' API) or pipeline template (if using the 'jobs' API). See --api.")
     exgroup.add_argument("--update-workflow", type=str, metavar="UUID", help="Update an existing Arvados workflow or pipeline template with the given UUID.")
 
     exgroup = parser.add_mutually_exclusive_group()

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list