[ARVADOS] updated: 98457f6fdb93116d31bec47057094041e9c47bde

Git user git at public.curoverse.com
Fri Sep 16 11:02:05 EDT 2016


Summary of changes:
 sdk/cwl/arvados_cwl/__init__.py | 4 +++-
 sdk/cwl/tests/test_job.py       | 8 ++++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

       via  98457f6fdb93116d31bec47057094041e9c47bde (commit)
      from  defaa234ca09f1c0a202a77d7660b75d3c12de02 (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 98457f6fdb93116d31bec47057094041e9c47bde
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Fri Sep 16 11:01:59 2016 -0400

    10081: Fix RunInSingleContainer test

diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py
index 20bbc41..0c56c86 100644
--- a/sdk/cwl/arvados_cwl/__init__.py
+++ b/sdk/cwl/arvados_cwl/__init__.py
@@ -56,6 +56,7 @@ class ArvCwlRunner(object):
         self.work_api = work_api
         self.stop_polling = threading.Event()
         self.poll_api = None
+        self.pipeline = None
 
         if self.work_api is None:
             # todo: autodetect API to use.
@@ -373,7 +374,8 @@ def add_arv_hints():
     _, cwlnames, _, _ = cwltool.process.get_schema("v1.0")
     _, extnames, _, _ = schema_salad.schema.load_schema("https://w3id.org/cwl/arv-cwl-schema.yml", cache=cache)
     for n in extnames.names:
-        cwlnames.add_name("http://arvados.org/cwl#"+n, "", extnames.get_name(n, ""))
+        if not cwlnames.has_name("http://arvados.org/cwl#"+n, ""):
+            cwlnames.add_name("http://arvados.org/cwl#"+n, "", extnames.get_name(n, ""))
 
 def main(args, stdout, stderr, api_client=None):
     parser = arg_parser()
diff --git a/sdk/cwl/tests/test_job.py b/sdk/cwl/tests/test_job.py
index 324e2c3..e95589c 100644
--- a/sdk/cwl/tests/test_job.py
+++ b/sdk/cwl/tests/test_job.py
@@ -200,6 +200,8 @@ class TestWorkflow(unittest.TestCase):
     # The test passes no builder.resources
     # Hence the default resources will apply: {'cores': 1, 'ram': 1024, 'outdirSize': 1024, 'tmpdirSize': 1024}
     def test_run(self):
+        arvados_cwl.add_arv_hints()
+
         runner = arvados_cwl.ArvCwlRunner(mock.MagicMock())
         runner.project_uuid = "zzzzz-8i9sb-zzzzzzzzzzzzzzz"
         runner.ignore_docker_for_reuse = False
@@ -213,8 +215,10 @@ class TestWorkflow(unittest.TestCase):
                                               basedir="", make_fs_access=make_fs_access, loader=document_loader,
                                               makeTool=runner.arv_make_tool, metadata=metadata)
         arvtool.formatgraph = None
-        for j in arvtool.job({}, mock.MagicMock(), basedir="", make_fs_access=make_fs_access):
-            j.run()
+        it = arvtool.job({}, mock.MagicMock(), basedir="", make_fs_access=make_fs_access)
+        it.next().run()
+        it.next().run()
+
         runner.api.jobs().create.assert_called_with(
             body={
                 'minimum_script_version': '9e5b98e8f5f4727856b53447191f9c06e3da2ba6',

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list