From c125865287978db3d5d161341b359c4792554ee4 Mon Sep 17 00:00:00 2001 From: Amr Abouelleil Date: Tue, 26 Sep 2017 09:55:54 -0400 Subject: [PATCH] - Backwards compatability with cromwell 26. --- src/Monitor.py | 2 +- tests/{test_cromwell_ale.py => test_cromwell_gscid_26.py} | 6 +++--- widdler.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename tests/{test_cromwell_ale.py => test_cromwell_gscid_26.py} (96%) diff --git a/src/Monitor.py b/src/Monitor.py index a065eb0..ec90ded 100644 --- a/src/Monitor.py +++ b/src/Monitor.py @@ -42,7 +42,7 @@ class Monitor: A class for monitoring a user's workflows, providing status reports at regular intervals as well as e-mail notification. """ - def __init__(self, user, host, no_notify, verbose, interval, status_filter): + def __init__(self, user, host, no_notify, verbose, interval, status_filter=None): self.host = host self.user = user self.interval = interval diff --git a/tests/test_cromwell_ale.py b/tests/test_cromwell_gscid_26.py similarity index 96% rename from tests/test_cromwell_ale.py rename to tests/test_cromwell_gscid_26.py index 37058c0..e0923ca 100644 --- a/tests/test_cromwell_ale.py +++ b/tests/test_cromwell_gscid_26.py @@ -19,7 +19,7 @@ def setUpClass(self): hdlr.setFormatter(formatter) self.logger.addHandler(hdlr) self.logger.setLevel(logging.INFO) - self.cromwell = Cromwell(host='ale') + self.cromwell = Cromwell(host='gscid-cromwell') self.json = os.path.join(resources, 'test.json') self.wdl = os.path.join(resources, 'test.wdl') self.logger.info('Resources: {}, {}'.format(self.wdl, self.json)) @@ -76,7 +76,7 @@ def test_query(self): def test_label_workflow(self): r = self.cromwell.label_workflow(self.workflow_id, self.labels) - self.assertEquals(r.status_code, 200) + self.assertEquals(r.status_code, 405) def test_query_labels(self): # This sleep is needed to make sure test_label_workflow runs before the query does. @@ -85,7 +85,7 @@ def test_query_labels(self): r = self.cromwell.query_labels(labels) # Here, the most recent workflow that matches the query will be the last item so we can use that to check # this assertion. - self.assertTrue(self.workflow_id in r['results'][-1]['id']) + self.assertEqual('fail', r['status']) def test_query_backend(self): self.assertTrue('defaultBackend' in self.cromwell.query_backend()) diff --git a/widdler.py b/widdler.py index 83ad01d..8aa28e4 100644 --- a/widdler.py +++ b/widdler.py @@ -23,7 +23,7 @@ __copyright__ = "Copyright 2017, The Broad Institute" __credits__ = ["Amr Abouelleil", "Paul Cao", "Jean Chang"] __license__ = "GPL" -__version__ = "1.4.4" +__version__ = "1.4.5" __maintainer__ = "Amr Abouelleil" __email__ = "amr@broadinstitute.org" __status__ = "Production"