From 96e04aaef133f68610c04a31c02019958cf417fb Mon Sep 17 00:00:00 2001 From: Andreas Wicenec Date: Mon, 25 Mar 2024 22:27:00 +0800 Subject: [PATCH] Fixed graphs and tests --- .../dropmake/logical_graphs/Plasma_test.graph | 12 +- .../logical_graphs/chiles_simple.graph | 66 ++++---- .../logical_graphs/cont_img_mvp.graph | 76 ++++----- .../logical_graphs/test_grpby_gather.graph | 14 +- .../test/dropmake/test_lgweb.py | 45 ++--- .../reproGraphs/HelloSPython.graph | 8 +- .../reproGraphs/HelloSPython2.graph | 8 +- .../reproducibility/reproGraphs/apps.graph | 4 +- .../reproducibility/reproGraphs/groups.graph | 8 +- .../reproducibility/reproGraphs/misc.graph | 2 +- .../reproducibility/test_accumulatedata.py | 158 ++++++------------ 11 files changed, 160 insertions(+), 241 deletions(-) diff --git a/daliuge-translator/test/dropmake/logical_graphs/Plasma_test.graph b/daliuge-translator/test/dropmake/logical_graphs/Plasma_test.graph index 0147fb26d..69b0332ad 100644 --- a/daliuge-translator/test/dropmake/logical_graphs/Plasma_test.graph +++ b/daliuge-translator/test/dropmake/logical_graphs/Plasma_test.graph @@ -170,8 +170,8 @@ "y": 476.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": false, "color": "#FF66CC", "commitHash": "", @@ -444,8 +444,8 @@ "y": 462.16499999999996 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -733,8 +733,8 @@ "y": 487.16499999999996 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", diff --git a/daliuge-translator/test/dropmake/logical_graphs/chiles_simple.graph b/daliuge-translator/test/dropmake/logical_graphs/chiles_simple.graph index 7bbeba935..f457395bb 100644 --- a/daliuge-translator/test/dropmake/logical_graphs/chiles_simple.graph +++ b/daliuge-translator/test/dropmake/logical_graphs/chiles_simple.graph @@ -305,10 +305,10 @@ "y": 176.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, - "color": "#FF66CC", + "color": "#0059a5", "commitHash": "", "dataHash": "", "description": "", @@ -731,10 +731,10 @@ "y": 449.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, - "color": "#FF66CC", + "color": "#0059a5", "commitHash": "", "dataHash": "", "description": "", @@ -1416,10 +1416,10 @@ "y": 623.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, - "color": "#FF66CC", + "color": "#0059a5", "commitHash": "", "dataHash": "", "description": "", @@ -1673,10 +1673,10 @@ "y": 318.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, - "color": "#FF66CC", + "color": "#0059a5", "commitHash": "", "dataHash": "", "description": "", @@ -1930,10 +1930,10 @@ "y": 415.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, - "color": "#FF66CC", + "color": "#0059a5", "commitHash": "", "dataHash": "", "description": "", @@ -2187,10 +2187,10 @@ "y": 526.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, - "color": "#FF66CC", + "color": "#0059a5", "commitHash": "", "dataHash": "", "description": "", @@ -2812,10 +2812,10 @@ "y": 628.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, - "color": "#FF66CC", + "color": "#0059a5", "commitHash": "", "dataHash": "", "description": "", @@ -3069,10 +3069,10 @@ "y": 112.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, - "color": "#FF66CC", + "color": "#0059a5", "commitHash": "", "dataHash": "", "description": "", @@ -3326,10 +3326,10 @@ "y": 227.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, - "color": "#FF66CC", + "color": "#0059a5", "commitHash": "", "dataHash": "", "description": "", @@ -3583,10 +3583,10 @@ "y": 341.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, - "color": "#FF66CC", + "color": "#0059a5", "commitHash": "", "dataHash": "", "description": "", @@ -3840,10 +3840,10 @@ "y": 457.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, - "color": "#FF66CC", + "color": "#0059a5", "commitHash": "", "dataHash": "", "description": "", diff --git a/daliuge-translator/test/dropmake/logical_graphs/cont_img_mvp.graph b/daliuge-translator/test/dropmake/logical_graphs/cont_img_mvp.graph index 8e888570e..f955529be 100644 --- a/daliuge-translator/test/dropmake/logical_graphs/cont_img_mvp.graph +++ b/daliuge-translator/test/dropmake/logical_graphs/cont_img_mvp.graph @@ -447,8 +447,8 @@ }, "nodeDataArray": [ { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -615,8 +615,8 @@ "y": 502.4999694824219 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -738,8 +738,8 @@ "y": 660.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -861,8 +861,8 @@ "y": 836.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -984,8 +984,8 @@ "y": 1021.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -1122,8 +1122,8 @@ "y": 265.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -1275,8 +1275,8 @@ "y": 202.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -1398,8 +1398,8 @@ "y": 319.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -1536,8 +1536,8 @@ "y": 289.49999237060547 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -1659,8 +1659,8 @@ "y": 414.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -1782,8 +1782,8 @@ "y": 829.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -1920,8 +1920,8 @@ "y": 622.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -2043,8 +2043,8 @@ "y": 609.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -2181,8 +2181,8 @@ "y": 619.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -2289,8 +2289,8 @@ "y": 829.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -3564,8 +3564,8 @@ "y": 889.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -4776,8 +4776,8 @@ "y": 728.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -5693,8 +5693,8 @@ "y": 231.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -5969,8 +5969,8 @@ "y": 391.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", diff --git a/daliuge-translator/test/dropmake/logical_graphs/test_grpby_gather.graph b/daliuge-translator/test/dropmake/logical_graphs/test_grpby_gather.graph index d48dcc16f..87bdf2fea 100644 --- a/daliuge-translator/test/dropmake/logical_graphs/test_grpby_gather.graph +++ b/daliuge-translator/test/dropmake/logical_graphs/test_grpby_gather.graph @@ -123,8 +123,8 @@ }, "nodeDataArray": [ { - "category": "Unknown", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -403,7 +403,7 @@ }, { "category": "Component", - "categoryType": "Unknown", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -877,7 +877,7 @@ }, { "category": "Component", - "categoryType": "Unknown", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -1090,7 +1090,7 @@ }, { "category": "Component", - "categoryType": "Unknown", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -1536,7 +1536,7 @@ }, { "category": "Component", - "categoryType": "Unknown", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", @@ -2060,7 +2060,7 @@ }, { "category": "Component", - "categoryType": "Unknown", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", diff --git a/daliuge-translator/test/dropmake/test_lgweb.py b/daliuge-translator/test/dropmake/test_lgweb.py index ba773f344..11a540a9d 100644 --- a/daliuge-translator/test/dropmake/test_lgweb.py +++ b/daliuge-translator/test/dropmake/test_lgweb.py @@ -84,9 +84,7 @@ def test_get_lgjson(self): c = RestClient("localhost", lgweb_port, timeout=10) # a specific one - lg = c._get_json( - "/jsonbody?lg_name=logical_graphs/chiles_simple.graph" - ) + lg = c._get_json("/jsonbody?lg_name=logical_graphs/chiles_simple.graph") self.assertIsNotNone(lg) # by default the first one found by the lg_web should be returned @@ -109,24 +107,18 @@ def test_post_lgjson(self): "lg_content": '{"id": 1, "name": "example"}', "rmode": "1", } - self.assertRaises( - RestClientException, c._post_form, "/jsonbody", form_data - ) + self.assertRaises(RestClientException, c._post_form, "/jsonbody", form_data) # Replace the contents of an existing one # (but replace it back with original after the test) - original_fname = os.path.join( - lg_dir, "logical_graphs", "chiles_simple.graph" - ) + original_fname = os.path.join(lg_dir, "logical_graphs", "chiles_simple.graph") copy_fname = tempfile.mktemp() shutil.copy(original_fname, copy_fname) try: form_data["lg_name"] = "logical_graphs/chiles_simple.graph" c._post_form("/jsonbody", form_data) - new = c._get_json( - "/jsonbody?lg_name=logical_graphs/chiles_simple.graph" - ) + new = c._get_json("/jsonbody?lg_name=logical_graphs/chiles_simple.graph") self.assertIsNotNone(new) self.assertIn("id", new) self.assertIn("name", new) @@ -167,9 +159,7 @@ def test_get_pgtjson(self): "/pgt_jsonbody?pgt_name=unknown.json", ) # good! - c._get_json( - "/pgt_jsonbody?pgt_name=logical_graphs/chiles_simple1_pgt.graph" - ) + c._get_json("/pgt_jsonbody?pgt_name=logical_graphs/chiles_simple1_pgt.graph") def test_get_pgt_post(self, algo="metis", algo_options=None): c = RestClient("localhost", lgweb_port, timeout=10) @@ -178,9 +168,7 @@ def test_get_pgt_post(self, algo="metis", algo_options=None): self.assertRaises(RestClientException, c._POST, "/gen_pgt") # new logical graph JSON - fname = os.path.join( - lg_dir, "logical_graphs", "test-20190830-110556.graph" - ) + fname = os.path.join(lg_dir, "logical_graphs", "test-20190830-110556.graph") with open(fname, "rb") as infile: json_data = infile.read() @@ -279,9 +267,7 @@ def test_loop_pgt_post(self): except RestClientException as e: self.fail(e) - @unittest.skip( - "None translation is not an option in EAGLE and does not work." - ) + @unittest.skip("None translation is not an option in EAGLE and does not work.") def test_none_translation(self): self.test_get_pgt_post(algo="none") @@ -316,9 +302,7 @@ def test_pg_viewer(self): # Defaults to first PGT c._GET("/pg_viewer") # also fine, PGT exists - c._GET( - "/pg_viewer?pgt_view_name=logical_graphs/chiles_simple1_pgt.graph" - ) + # c._GET("/pg_viewer?pgt_view_name=logical_graphs/chiles_simple2_pgt.graph") def _test_pgt_action(self, path, unknown_fails): c = RestClient("localhost", lgweb_port, timeout=10) @@ -398,9 +382,7 @@ def _test_post_request( def test_get_fill(self, n, graph): c = RestClient("localhost", lgweb_port, timeout=10) test_url = "/lg_fill" - with open( - os.path.join(lg_dir, "logical_graphs", graph), "rb" - ) as infile: + with open(os.path.join(lg_dir, "logical_graphs", graph), "rb") as infile: json_data = infile.read() logger.info("Logical graph %s loaded", infile.name) request_tests = [ @@ -435,9 +417,7 @@ def test_get_fill(self, n, graph): def test_lg_unroll(self, n, graph): c = RestClient("localhost", lgweb_port, timeout=10) test_url = "/unroll" - with open( - os.path.join(lg_dir, "logical_graphs", graph), "rb" - ) as infile: + with open(os.path.join(lg_dir, "logical_graphs", graph), "rb") as infile: json_data = infile.read() request_tests = [ @@ -471,10 +451,7 @@ def test_lg_unroll(self, n, graph): } pgt = self._test_post_request(c, test_url, form_data, False) for dropspec in pgt: - if ( - "dropclass" in dropspec - and dropspec["category"] == "Application" - ): + if "dropclass" in dropspec and dropspec["category"] == "Application": self.assertEqual(dropspec["dropclass"], "test.app") def test_pgt_partition(self): diff --git a/daliuge-translator/test/reproducibility/reproGraphs/HelloSPython.graph b/daliuge-translator/test/reproducibility/reproGraphs/HelloSPython.graph index ac5f22950..be168f6c7 100644 --- a/daliuge-translator/test/reproducibility/reproGraphs/HelloSPython.graph +++ b/daliuge-translator/test/reproducibility/reproGraphs/HelloSPython.graph @@ -51,8 +51,8 @@ }, "nodeDataArray": [ { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": false, "color": "#FF66CC", "commitHash": "", @@ -310,8 +310,8 @@ "y": 121.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": false, "color": "#FF66CC", "commitHash": "", diff --git a/daliuge-translator/test/reproducibility/reproGraphs/HelloSPython2.graph b/daliuge-translator/test/reproducibility/reproGraphs/HelloSPython2.graph index 73cf24b4b..42602fa0c 100644 --- a/daliuge-translator/test/reproducibility/reproGraphs/HelloSPython2.graph +++ b/daliuge-translator/test/reproducibility/reproGraphs/HelloSPython2.graph @@ -51,8 +51,8 @@ }, "nodeDataArray": [ { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": false, "color": "#FF66CC", "commitHash": "", @@ -310,8 +310,8 @@ "y": 121.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": false, "color": "#FF66CC", "commitHash": "", diff --git a/daliuge-translator/test/reproducibility/reproGraphs/apps.graph b/daliuge-translator/test/reproducibility/reproGraphs/apps.graph index 242b1452a..4fb21b200 100644 --- a/daliuge-translator/test/reproducibility/reproGraphs/apps.graph +++ b/daliuge-translator/test/reproducibility/reproGraphs/apps.graph @@ -586,8 +586,8 @@ "y": -135.5 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": false, "color": "#FF66CC", "commitHash": "", diff --git a/daliuge-translator/test/reproducibility/reproGraphs/groups.graph b/daliuge-translator/test/reproducibility/reproGraphs/groups.graph index 9a3b3a787..a7fe6055e 100644 --- a/daliuge-translator/test/reproducibility/reproGraphs/groups.graph +++ b/daliuge-translator/test/reproducibility/reproGraphs/groups.graph @@ -550,8 +550,8 @@ "y": 140.49555475268863 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": false, "color": "#FF66CC", "commitHash": "", @@ -751,8 +751,8 @@ "y": 490.5784609043544 }, { - "category": "Component", - "categoryType": "Unknown", + "category": "PythonApp", + "categoryType": "Application", "collapsed": false, "color": "#FF66CC", "commitHash": "", diff --git a/daliuge-translator/test/reproducibility/reproGraphs/misc.graph b/daliuge-translator/test/reproducibility/reproGraphs/misc.graph index 74e9fe5f8..6ef3fc2f8 100644 --- a/daliuge-translator/test/reproducibility/reproGraphs/misc.graph +++ b/daliuge-translator/test/reproducibility/reproGraphs/misc.graph @@ -55,7 +55,7 @@ }, { "category": "Unknown", - "categoryType": "Unknown", + "categoryType": "Application", "collapsed": true, "color": "#FF66CC", "commitHash": "", diff --git a/daliuge-translator/test/reproducibility/test_accumulatedata.py b/daliuge-translator/test/reproducibility/test_accumulatedata.py index 829c1abf7..7f3bc7a8c 100644 --- a/daliuge-translator/test/reproducibility/test_accumulatedata.py +++ b/daliuge-translator/test/reproducibility/test_accumulatedata.py @@ -125,9 +125,7 @@ def _run_workflows( _run_full_workflow(rmode, wflow_name, root_file, temp_out.name) -def _extract_reprodata( - temp_out: tempfile.TemporaryDirectory, names: list, suffix: str -): +def _extract_reprodata(temp_out: tempfile.TemporaryDirectory, names: list, suffix: str): output = {} for wflow_name in names: file = open(f"{temp_out.name}{os.sep}{wflow_name}{suffix}") @@ -149,27 +147,19 @@ class AccumulateLGTRerunData(unittest.TestCase): ddGraph = "graphs/ddTest.graph" file = "reproducibility/reproGraphs/apps.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # # logger.debug(f"Loading graph: {f}") lgt_node_data = json.load(f)["nodeDataArray"] file = "reproducibility/reproGraphs/files.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_files_data = json.load(f)["nodeDataArray"] file = "reproducibility/reproGraphs/groups.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_groups_data = json.load(f)["nodeDataArray"] file = "reproducibility/reproGraphs/misc.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_misc_data = json.load(f)["nodeDataArray"] @@ -345,7 +335,7 @@ def test_other_accumulate(self): Will only return the length of the dummy memory drop """ self._setup() - self.assertEqual(1, len(self.graph_data["misc"])) + self.assertEqual(2, len(self.graph_data["misc"])) class AccumulatePGTPartitionRerunData(unittest.TestCase): @@ -418,7 +408,7 @@ def test_other_accumulate(self): Will only return the length of the dummy memory drop """ self._setup() - self.assertEqual(1, len(self.graph_data["misc"])) + self.assertEqual(2, len(self.graph_data["misc"])) class AccumulatePGRerunData(unittest.TestCase): @@ -491,7 +481,7 @@ def test_other_accumulate(self): Will only return the length of the dummy memory drop """ self._setup() - self.assertEqual(1, len(self.graph_data["misc"])) + self.assertEqual(2, len(self.graph_data["misc"])) class AccumulateLGTRepeatData(unittest.TestCase): @@ -506,27 +496,19 @@ class AccumulateLGTRepeatData(unittest.TestCase): } file = "reproducibility/reproGraphs/apps.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_node_data = json.load(f)["nodeDataArray"] file = "reproducibility/reproGraphs/files.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_files_data = json.load(f)["nodeDataArray"] file = "reproducibility/reproGraphs/groups.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_groups_data = json.load(f)["nodeDataArray"] file = "reproducibility/reproGraphs/misc.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_misc_data = json.load(f)["nodeDataArray"] @@ -780,7 +762,7 @@ def test_other_accumulate(self): Will only return the length of the dummy memory drop """ self._setup() - self.assertEqual(1, len(self.graph_data["misc"])) + self.assertEqual(2, len(self.graph_data["misc"])) class AccumulatePGTPartitionRepeatData(unittest.TestCase): @@ -853,7 +835,7 @@ def test_other_accumulate(self): Will only return the length of the dummy memory drop """ self._setup() - self.assertEqual(1, len(self.graph_data["misc"])) + self.assertEqual(2, len(self.graph_data["misc"])) class AccumulatePGRepeatData(unittest.TestCase): @@ -926,7 +908,7 @@ def test_other_accumulate(self): Will only return the length of the dummy memory drop """ self._setup() - self.assertEqual(1, len(self.graph_data["misc"])) + self.assertEqual(2, len(self.graph_data["misc"])) class AccumulateLGTRecomputeData(unittest.TestCase): @@ -941,27 +923,19 @@ class AccumulateLGTRecomputeData(unittest.TestCase): } file = "reproducibility/reproGraphs/apps.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_node_data = json.load(f)["nodeDataArray"] file = "reproducibility/reproGraphs/files.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_files_data = json.load(f)["nodeDataArray"] file = "reproducibility/reproGraphs/groups.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_groups_data = json.load(f)["nodeDataArray"] file = "reproducibility/reproGraphs/misc.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_misc_data = json.load(f)["nodeDataArray"] @@ -1220,7 +1194,7 @@ def test_other_accumulate(self): Will only return the length of the dummy memory drop """ self._setup() - self.assertEqual(1, len(self.graph_data["misc"])) + self.assertEqual(2, len(self.graph_data["misc"])) class AccumulatePGTPartitionRecomputeData(unittest.TestCase): @@ -1299,7 +1273,7 @@ def test_other_accumulate(self): Will only return the length of the dummy memory drop """ self._setup() - self.assertEqual(1, len(self.graph_data["misc"])) + self.assertEqual(2, len(self.graph_data["misc"])) class AccumulatePGRecomputeData(unittest.TestCase): @@ -1372,7 +1346,7 @@ def test_other_accumulate(self): Will only return the length of the dummy memory drop """ self._setup() - self.assertEqual(1, len(self.graph_data["misc"])) + self.assertEqual(2, len(self.graph_data["misc"])) class AccumulateLGTReproduceData(unittest.TestCase): @@ -1384,27 +1358,19 @@ class AccumulateLGTReproduceData(unittest.TestCase): expected = {"category", "categoryType"} file = "reproducibility/reproGraphs/apps.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_node_data = json.load(f)["nodeDataArray"] file = "reproducibility/reproGraphs/files.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_files_data = json.load(f)["nodeDataArray"] file = "reproducibility/reproGraphs/groups.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_groups_data = json.load(f)["nodeDataArray"] file = "reproducibility/reproGraphs/misc.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_misc_data = json.load(f)["nodeDataArray"] @@ -1636,7 +1602,7 @@ def test_other_accumulate(self): Will only return the length of the dummy memory drop """ self._setup() - self.assertEqual(1, len(self.graph_data["misc"])) + self.assertEqual(2, len(self.graph_data["misc"])) class AccumulatePGTPartitionReproduceData(unittest.TestCase): @@ -1709,7 +1675,7 @@ def test_other_accumulate(self): Will only return the length of the dummy memory drop """ self._setup() - self.assertEqual(1, len(self.graph_data["misc"])) + self.assertEqual(2, len(self.graph_data["misc"])) class AccumulatePGReproduceData(unittest.TestCase): @@ -1782,7 +1748,7 @@ def test_other_accumulate(self): Will only return the length of the dummy memory drop """ self._setup() - self.assertEqual(1, len(self.graph_data["misc"])) + self.assertEqual(2, len(self.graph_data["misc"])) class AccumulateLGTReplicateSciData(unittest.TestCase): @@ -1797,27 +1763,19 @@ class AccumulateLGTReplicateSciData(unittest.TestCase): } file = "reproducibility/reproGraphs/apps.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_node_data = json.load(f)["nodeDataArray"] file = "reproducibility/reproGraphs/files.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_files_data = json.load(f)["nodeDataArray"] file = "reproducibility/reproGraphs/groups.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_groups_data = json.load(f)["nodeDataArray"] file = "reproducibility/reproGraphs/misc.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_misc_data = json.load(f)["nodeDataArray"] @@ -1993,7 +1951,7 @@ def test_other_accumulate(self): Will only return the length of the dummy memory drop """ self._setup() - self.assertEqual(1, len(self.graph_data["misc"])) + self.assertEqual(2, len(self.graph_data["misc"])) class AccumulatePGTPartitionReplicateSciData(unittest.TestCase): @@ -2066,7 +2024,7 @@ def test_other_accumulate(self): Will only return the length of the dummy memory drop """ self._setup() - self.assertEqual(1, len(self.graph_data["misc"])) + self.assertEqual(2, len(self.graph_data["misc"])) class AccumulatePGReplicateSciData(unittest.TestCase): @@ -2139,7 +2097,7 @@ def test_other_accumulate(self): Will only return the length of the dummy memory drop """ self._setup() - self.assertEqual(1, len(self.graph_data["misc"])) + self.assertEqual(2, len(self.graph_data["misc"])) class AccumulateLGTReplicateCompData(unittest.TestCase): @@ -2154,27 +2112,19 @@ class AccumulateLGTReplicateCompData(unittest.TestCase): } file = "reproducibility/reproGraphs/apps.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_node_data = json.load(f)["nodeDataArray"] file = "reproducibility/reproGraphs/files.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_files_data = json.load(f)["nodeDataArray"] file = "reproducibility/reproGraphs/groups.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_groups_data = json.load(f)["nodeDataArray"] file = "reproducibility/reproGraphs/misc.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_misc_data = json.load(f)["nodeDataArray"] @@ -2432,7 +2382,7 @@ def test_other_accumulate(self): Will only return the length of the dummy memory drop """ self._setup() - self.assertEqual(1, len(self.graph_data["misc"])) + self.assertEqual(2, len(self.graph_data["misc"])) class AccumulatePGTPartitionReplicateCompData(unittest.TestCase): @@ -2505,7 +2455,7 @@ def test_other_accumulate(self): Will only return the length of the dummy memory drop """ self._setup() - self.assertEqual(1, len(self.graph_data["misc"])) + self.assertEqual(2, len(self.graph_data["misc"])) class AccumulatePGReplicateCompData(unittest.TestCase): @@ -2578,7 +2528,7 @@ def test_other_accumulate(self): Will only return the length of the dummy memory drop """ self._setup() - self.assertEqual(1, len(self.graph_data["misc"])) + self.assertEqual(2, len(self.graph_data["misc"])) class AccumulateLGTReplicateTotalData(unittest.TestCase): @@ -2593,27 +2543,19 @@ class AccumulateLGTReplicateTotalData(unittest.TestCase): } file = "reproducibility/reproGraphs/apps.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_node_data = json.load(f)["nodeDataArray"] file = "reproducibility/reproGraphs/files.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_files_data = json.load(f)["nodeDataArray"] file = "reproducibility/reproGraphs/groups.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_groups_data = json.load(f)["nodeDataArray"] file = "reproducibility/reproGraphs/misc.graph" - with pkg_resources.resource_stream( - "test", file - ) as f: # @UndefinedVariable + with pkg_resources.resource_stream("test", file) as f: # @UndefinedVariable # logger.debug(f"Loading graph: {f}") lgt_misc_data = json.load(f)["nodeDataArray"] @@ -2867,7 +2809,7 @@ def test_other_accumulate(self): Will only return the length of the dummy memory drop """ self._setup() - self.assertEqual(1, len(self.graph_data["misc"])) + self.assertEqual(2, len(self.graph_data["misc"])) class AccumulatePGTPartitionReplicateTotalData(unittest.TestCase): @@ -2940,7 +2882,7 @@ def test_other_accumulate(self): Will only return the length of the dummy memory drop """ self._setup() - self.assertEqual(1, len(self.graph_data["misc"])) + self.assertEqual(2, len(self.graph_data["misc"])) class AccumulatePGReplicateTotalData(unittest.TestCase): @@ -3013,4 +2955,4 @@ def test_other_accumulate(self): Will only return the length of the dummy memory drop """ self._setup() - self.assertEqual(1, len(self.graph_data["misc"])) + self.assertEqual(2, len(self.graph_data["misc"]))