diff --git a/run_tests.py b/run_tests.py index df6b6575c7a89ed4e343f9af7231597a9d0c1a34..9cb454f0e1111b6c53539beb0b93ba6bcf9141ee 100755 --- a/run_tests.py +++ b/run_tests.py @@ -29,8 +29,7 @@ class TestWorkflows(unittest.TestCase): def test_wf{num}_simple_duplicate(self): w = Workflow(f"tests/ressources/workflows/{num}", display_info=False, duplicate=True) w.initialise() - json_files = glob.glob(f'tests/ressources/workflows/{num}/*.json', recursive=False) - self.assertTrue(w.check_if_equal(json_files[0])) + self.assertTrue(w.check_if_equal('tests/ressources/workflows/{num}/specification_graph.json')) """ script+=text @@ -38,8 +37,153 @@ class TestWorkflows(unittest.TestCase): with open("./tests/test_workflows_simple_duplicate.py", "w") as text_file: text_file.write(script) +def write_executions_extraction_test(): + #I'm gonna automatically write the tests before running them + script = """import unittest +import json +import glob +from src.workflow import Workflow + +class Test_All_Executors_Extraction(unittest.TestCase): + """ + + workflows = glob.glob(f'./tests/ressources/workflows/*', recursive=False) + for wf in workflows: + num = wf.split("/")[-1] + text=f""" + def test_{num}_extraction(self): + w = Workflow(f"tests/ressources/workflows/{num}", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/{num}/all_executors.json') as json_file: + saved = json.load(json_file) + + executors = w.get_workflow_main().get_all_executors_in_workflow() + dico= {{}} + for e in executors: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + """ + + script+=text + + with open("./tests/test_workflows_all_executors.py", "w") as text_file: + text_file.write(script) + +def write_process_extraction_test(): + #I'm gonna automatically write the tests before running them + script = """import unittest +import json +import glob +from src.workflow import Workflow + +class Test_Process_Extraction(unittest.TestCase): + """ + + workflows = glob.glob(f'./tests/ressources/workflows/*', recursive=False) + for wf in workflows: + num = wf.split("/")[-1] + text=f""" + def test_{num}_extraction(self): + w = Workflow(f"tests/ressources/workflows/{num}", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/{num}/all_processes.json') as json_file: + saved = json.load(json_file) + + processes = w.get_processes_called() + dico= {{}} + for e in processes: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + """ + + script+=text + + with open("./tests/test_process_extraction.py", "w") as text_file: + text_file.write(script) + +def write_subworkflow_extraction_test(): + #I'm gonna automatically write the tests before running them + script = """import unittest +import json +import glob +from src.workflow import Workflow + +class Test_Subworkflow_Extraction(unittest.TestCase): + """ + + workflows = glob.glob(f'./tests/ressources/workflows/*', recursive=False) + for wf in workflows: + num = wf.split("/")[-1] + text=f""" + def test_{num}_extraction(self): + w = Workflow(f"tests/ressources/workflows/{num}", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/{num}/all_subworkflows.json') as json_file: + saved = json.load(json_file) + + subworkflows = w.get_subworkflows_called() + dico= {{}} + for e in subworkflows: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + """ + + script+=text + + with open("./tests/test_subworkflow_extraction.py", "w") as text_file: + text_file.write(script) + +def write_executor_extraction_per_subworkflow_test(): + #I'm gonna automatically write the tests before running them + script = """import unittest +import json +import glob +from src.workflow import Workflow + +class Test_Executor_Extraction_Per_Subworkflow(unittest.TestCase): + """ + + workflows = glob.glob(f'./tests/ressources/workflows/*', recursive=False) + for wf in workflows: + num = wf.split("/")[-1] + text=f""" + def test_{num}_extraction(self): + w = Workflow(f"tests/ressources/workflows/{num}", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/{num}/executors_per_subworkflows.json') as json_file: + saved = json.load(json_file) + saved_sets = [] + for sub in saved: + saved_sets.append(set(saved[sub].values())) + + subs = w.get_subworkflows_called() + dico= {{}} + for s in subs: + executors = s.get_all_executors_in_workflow() + executors_vals = [] + for e in executors: + executors_vals.append(e.get_code(get_OG = True)) + self.assertTrue(set(executors_vals) in saved_sets) + """ + + script+=text + + with open("./tests/test_executor_extraction_per_subworkflow.py", "w") as text_file: + text_file.write(script) + if __name__ == '__main__': write_duplicate_test() + write_executions_extraction_test() + write_process_extraction_test() + write_subworkflow_extraction_test() + write_executor_extraction_per_subworkflow_test() sys.exit(0 if main(*sys.argv[1:]) else 1) diff --git a/src/graph.py b/src/graph.py index 2023eef66d8f0922a58457d2655d85c906973c45..44b3d192e2a3d7e9bc6607b81e4b2c85a29a84b0 100644 --- a/src/graph.py +++ b/src/graph.py @@ -90,6 +90,9 @@ class Graph(): self.dico_flattened["subworkflows"] = [] + def get_full_dico(self): + return self.full_dico + def is_initialised(self): return self.initialised @@ -136,8 +139,8 @@ class Graph(): if(self.link_dico==None): self.link_dico = initia_link_dico_rec(self.full_dico) - def get_specification_graph(self, filename = "specification_graph", render_graphs = True): - generate_graph(self.get_output_dir()/'graphs'/filename, self.full_dico, render_graphs = render_graphs) + def get_specification_graph(self, dirc = 'graphs', filename = "specification_graph", render_graphs = True): + generate_graph(self.get_output_dir()/ dirc /filename, self.full_dico, render_graphs = render_graphs) def get_specification_graph_wo_labels(self, filename = "specification_graph_wo_labels", render_graphs = True): generate_graph(self.get_output_dir()/'graphs'/filename, self.full_dico, label_edge=False, label_node=False, render_graphs = render_graphs) diff --git a/src/root.py b/src/root.py index 2e92e8d21d6214d3b9cab6552c0931ea4138a3be..763f8aa31f0422c1c7174ed962d48bbb6a170bf8 100644 --- a/src/root.py +++ b/src/root.py @@ -164,8 +164,8 @@ class Root(Nextflow_Building_Blocks): b.get_inside_executors_rec(dico) return list(dico.keys()) - def get_all_executors_from_workflow(self): - return self.get_executors_same_level()+self.get_inside_executors() + #def get_all_executors_from_workflow(self): + # return self.get_executors_same_level()+self.get_inside_executors() #def get_calls(self): # tab = [] diff --git a/src/workflow.py b/src/workflow.py index fdef4b13ce9c04c02413333e5cc9c55d29c1d61d..4e0e863420bba0f06e03403f4522f019aaaf1ca9 100644 --- a/src/workflow.py +++ b/src/workflow.py @@ -201,7 +201,59 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen self.iniatilise_tab_processes_2_remove() return self.graph.check_if_equal(file, processes_2_remove = self.processes_2_remove) + ########################### + # Generate test data + ########################### + #These are the methods which generate the test data + + def generate_test_specification_graph(self): + dico = self.graph.get_full_dico() + with open(self.get_output_dir()/ 'test' /"specification_graph.json", "w") as outfile: + json.dump(dico, outfile, indent = 4) + + def generate_all_executors(self): + executors = self.get_workflow_main().get_all_executors_in_workflow() + dico= {} + for e in executors: + dico[str(e)] = e.get_code(get_OG = True) + with open(self.get_output_dir()/ 'test' /"all_executors.json", "w") as outfile: + json.dump(dico, outfile, indent = 4) + + def generate_executors_per_subworkflows(self): + subs = self.get_subworkflows_called() + dico= {} + for s in subs: + dico[str(s)]= {} + executors = s.get_all_executors_in_workflow() + for e in executors: + dico[str(s)][str(e)] = e.get_code(get_OG = True) + with open(self.get_output_dir()/ 'test' /"executors_per_subworkflows.json", "w") as outfile: + json.dump(dico, outfile, indent = 4) + + def generate_all_processes(self): + processes = self.get_processes_called() + dico= {} + for p in processes: + dico[str(p)] = p.get_code() + with open(self.get_output_dir()/ 'test' /"all_processes.json", "w") as outfile: + json.dump(dico, outfile, indent = 4) + + def generate_all_subworkflows(self): + subs = self.get_subworkflows_called() + dico= {} + for s in subs: + dico[str(s)] = s.get_code() + with open(self.get_output_dir()/ 'test' /"all_subworkflows.json", "w") as outfile: + json.dump(dico, outfile, indent = 4) + + def generate_all_test_data(self): + self.generate_test_specification_graph() + self.generate_all_executors() + self.generate_all_processes() + self.generate_all_subworkflows() + self.generate_executors_per_subworkflows() + #Returns a dico of number of processes called per each condition @@ -293,7 +345,7 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen #TODO -> update the operations -> also consider the operations in the params of the calls which need to be updated - for o in self.get_workflow_main().root.get_all_executors_from_workflow(): + for o in self.get_workflow_main().get_all_executors_in_workflow(): if(o.get_type()=="Operation"): code = code.replace(o.get_code(get_OG=True), o.convert_to_DSL2()) else: @@ -435,6 +487,14 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen if(ele.get_type()=="Subworkflow"): subs.append(ele) return subs + + def get_processes_called(self): + subs = [] + for c in self.get_workflow_main().get_all_calls_in_workflow(): + ele = c.get_first_element_called() + if(ele.get_type()=="Process"): + subs.append(ele) + return subs def rewrite_and_initialise(self, code): diff --git a/tests/ressources/workflows/wf1/all_executors.json b/tests/ressources/workflows/wf1/all_executors.json new file mode 100644 index 0000000000000000000000000000000000000000..4c29e68b92f4bb42b045438f1e97a86b7ba117c5 --- /dev/null +++ b/tests/ressources/workflows/wf1/all_executors.json @@ -0,0 +1,12 @@ +{ + "Call_124185449263312": "sub2()", + "Call_124185449266912": "sub3()", + "Call_124185450586384": "M1()", + "Call_124185450591088": "M2(M1.out)", + "Call_124185449161792": "M1()", + "Call_124185449333136": "M2(M1.out)", + "Call_124185450583648": "sub1()", + "<src.operation.Operation object at 0x70f22dacb8e0>": "sub1.out.view()", + "Call_124185449045184": "sub1()", + "<src.operation.Operation object at 0x70f22da43040>": "sub1.out.view()" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf1/all_processes.json b/tests/ressources/workflows/wf1/all_processes.json new file mode 100644 index 0000000000000000000000000000000000000000..ce51abebf998826ee991986048966db3dc5f246a --- /dev/null +++ b/tests/ressources/workflows/wf1/all_processes.json @@ -0,0 +1,6 @@ +{ + "<src.process.Process object at 0x70f22dac9210>": "process M1 {\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22dacb5b0>": "process M2 {\n input:\n path a\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22d925bd0>": "process M1 {\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22d927f10>": "process M2 {\n input:\n path a\n\n \"\"\"\n SOMETHING\n \"\"\"\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf1/all_subworkflows.json b/tests/ressources/workflows/wf1/all_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..92ac376ebab6673f40a8d4d7f6d986ec382c40dd --- /dev/null +++ b/tests/ressources/workflows/wf1/all_subworkflows.json @@ -0,0 +1,6 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22dab2770>": "workflow sub1 {\n main:\n M1()\n M2(M1.out)\n\n emit:\n M1.out\n}", + "<src.subworkflow.Subworkflow object at 0x70f22d93a5c0>": "workflow sub1 {\n main:\n M1()\n M2(M1.out)\n\n emit:\n M1.out\n}", + "<src.subworkflow.Subworkflow object at 0x70f22d96fca0>": "workflow sub2 {\n main:\n sub1()\n sub1.out.view()\n}", + "<src.subworkflow.Subworkflow object at 0x70f22d93a410>": "workflow sub3 {\n main:\n sub1()\n sub1.out.view()\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf1/executors_per_subworkflows.json b/tests/ressources/workflows/wf1/executors_per_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..f2c966b41b26127c8eebe009d0c0fbe2486626a4 --- /dev/null +++ b/tests/ressources/workflows/wf1/executors_per_subworkflows.json @@ -0,0 +1,22 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22dab2770>": { + "Call_124185450586384": "M1()", + "Call_124185450591088": "M2(M1.out)" + }, + "<src.subworkflow.Subworkflow object at 0x70f22d93a5c0>": { + "Call_124185449161792": "M1()", + "Call_124185449333136": "M2(M1.out)" + }, + "<src.subworkflow.Subworkflow object at 0x70f22d96fca0>": { + "Call_124185450583648": "sub1()", + "<src.operation.Operation object at 0x70f22dacb8e0>": "sub1.out.view()", + "Call_124185450586384": "M1()", + "Call_124185450591088": "M2(M1.out)" + }, + "<src.subworkflow.Subworkflow object at 0x70f22d93a410>": { + "Call_124185449045184": "sub1()", + "<src.operation.Operation object at 0x70f22da43040>": "sub1.out.view()", + "Call_124185449161792": "M1()", + "Call_124185449333136": "M2(M1.out)" + } +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf1/specification_graph.json b/tests/ressources/workflows/wf1/specification_graph.json index 2eb338d86db0336c884ae1f594c2fc918557756c..258873ec3328271fc1d62ccd3372e1ce3f4543b3 100644 --- a/tests/ressources/workflows/wf1/specification_graph.json +++ b/tests/ressources/workflows/wf1/specification_graph.json @@ -5,7 +5,7 @@ "sub2_0": { "nodes": [ { - "id": "<src.operation.Operation object at 0x786a10c39fc0>", + "id": "<src.operation.Operation object at 0x70f22dacb8e0>", "name": "", "shape": "point", "xlabel": "sub1.out.view()", @@ -14,8 +14,8 @@ ], "edges": [ { - "A": "<src.operation.Operation object at 0x786a10c399f0>", - "B": "<src.operation.Operation object at 0x786a10c39fc0>", + "A": "<src.operation.Operation object at 0x70f289390070>", + "B": "<src.operation.Operation object at 0x70f22dacb8e0>", "label": "sub1.out" } ], @@ -23,28 +23,28 @@ "sub1_0": { "nodes": [ { - "id": "<src.process.Process object at 0x786a10c394e0>", + "id": "<src.process.Process object at 0x70f22dac9210>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.process.Process object at 0x786a10c395a0>", + "id": "<src.process.Process object at 0x70f22dacb5b0>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x786a10c39420>", + "id": "<src.operation.Operation object at 0x70f22dacbf40>", "name": "", "shape": "point", "xlabel": "M1.out", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x786a10c399f0>", + "id": "<src.operation.Operation object at 0x70f289390070>", "name": "", "shape": "point", "xlabel": "emit: M1.out", @@ -53,18 +53,18 @@ ], "edges": [ { - "A": "<src.process.Process object at 0x786a10c394e0>", - "B": "<src.operation.Operation object at 0x786a10c39420>", + "A": "<src.process.Process object at 0x70f22dac9210>", + "B": "<src.operation.Operation object at 0x70f22dacbf40>", "label": "M1.out" }, { - "A": "<src.operation.Operation object at 0x786a10c39420>", - "B": "<src.process.Process object at 0x786a10c395a0>", + "A": "<src.operation.Operation object at 0x70f22dacbf40>", + "B": "<src.process.Process object at 0x70f22dacb5b0>", "label": "" }, { - "A": "<src.process.Process object at 0x786a10c394e0>", - "B": "<src.operation.Operation object at 0x786a10c399f0>", + "A": "<src.process.Process object at 0x70f22dac9210>", + "B": "<src.operation.Operation object at 0x70f289390070>", "label": "M1.out" } ], @@ -75,7 +75,7 @@ "sub3_0": { "nodes": [ { - "id": "<src.operation.Operation object at 0x786a10c3a770>", + "id": "<src.operation.Operation object at 0x70f22da43040>", "name": "", "shape": "point", "xlabel": "sub1.out.view()", @@ -84,8 +84,8 @@ ], "edges": [ { - "A": "<src.operation.Operation object at 0x786a10c3a560>", - "B": "<src.operation.Operation object at 0x786a10c3a770>", + "A": "<src.operation.Operation object at 0x70f22d9561a0>", + "B": "<src.operation.Operation object at 0x70f22da43040>", "label": "sub1.out" } ], @@ -93,28 +93,28 @@ "sub1_1": { "nodes": [ { - "id": "<src.process.Process object at 0x786a10c3a4a0>", + "id": "<src.process.Process object at 0x70f22d925bd0>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.process.Process object at 0x786a10c39f00>", + "id": "<src.process.Process object at 0x70f22d927f10>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x786a10c3a500>", + "id": "<src.operation.Operation object at 0x70f22d926c50>", "name": "", "shape": "point", "xlabel": "M1.out", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x786a10c3a560>", + "id": "<src.operation.Operation object at 0x70f22d9561a0>", "name": "", "shape": "point", "xlabel": "emit: M1.out", @@ -123,18 +123,18 @@ ], "edges": [ { - "A": "<src.process.Process object at 0x786a10c3a4a0>", - "B": "<src.operation.Operation object at 0x786a10c3a500>", + "A": "<src.process.Process object at 0x70f22d925bd0>", + "B": "<src.operation.Operation object at 0x70f22d926c50>", "label": "M1.out" }, { - "A": "<src.operation.Operation object at 0x786a10c3a500>", - "B": "<src.process.Process object at 0x786a10c39f00>", + "A": "<src.operation.Operation object at 0x70f22d926c50>", + "B": "<src.process.Process object at 0x70f22d927f10>", "label": "" }, { - "A": "<src.process.Process object at 0x786a10c3a4a0>", - "B": "<src.operation.Operation object at 0x786a10c3a560>", + "A": "<src.process.Process object at 0x70f22d925bd0>", + "B": "<src.operation.Operation object at 0x70f22d9561a0>", "label": "M1.out" } ], diff --git a/tests/ressources/workflows/wf10/all_executors.json b/tests/ressources/workflows/wf10/all_executors.json new file mode 100644 index 0000000000000000000000000000000000000000..a41a81d21669aefc0d48fcb748d25f645a3ff684 --- /dev/null +++ b/tests/ressources/workflows/wf10/all_executors.json @@ -0,0 +1,5 @@ +{ + "Call_124185448873504": "M2(M1.out)", + "Call_124185450888880": "M1()", + "Call_124185448859584": "M1()" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf10/all_processes.json b/tests/ressources/workflows/wf10/all_processes.json new file mode 100644 index 0000000000000000000000000000000000000000..78307731eb4d869876cbba262d2b1769f4810399 --- /dev/null +++ b/tests/ressources/workflows/wf10/all_processes.json @@ -0,0 +1,5 @@ +{ + "<src.process.Process object at 0x70f22dafa9e0>": "process M2 {\n input:\n path a\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22dafa200>": "process M1 {\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22dafbf10>": "process M1 {\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf10/all_subworkflows.json b/tests/ressources/workflows/wf10/all_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..9e26dfeeb6e641a33dae4961196235bdb965b21b --- /dev/null +++ b/tests/ressources/workflows/wf10/all_subworkflows.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ressources/workflows/wf10/executors_per_subworkflows.json b/tests/ressources/workflows/wf10/executors_per_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..9e26dfeeb6e641a33dae4961196235bdb965b21b --- /dev/null +++ b/tests/ressources/workflows/wf10/executors_per_subworkflows.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ressources/workflows/wf10/specification_graph.json b/tests/ressources/workflows/wf10/specification_graph.json index e34b9d597e8d8b90456bfd68372d239f859c912f..e3bd9f46a86d370df679c5bd51282ec43b87f2b1 100644 --- a/tests/ressources/workflows/wf10/specification_graph.json +++ b/tests/ressources/workflows/wf10/specification_graph.json @@ -1,28 +1,28 @@ { "nodes": [ { - "id": "<src.process.Process object at 0x71ee1a494c70>", + "id": "<src.process.Process object at 0x70f22dafa200>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.process.Process object at 0x71ee1a496ce0>", + "id": "<src.process.Process object at 0x70f22dafbf10>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.process.Process object at 0x71ee1a4950f0>", + "id": "<src.process.Process object at 0x70f22dafa9e0>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a497700>", + "id": "<src.operation.Operation object at 0x70f22daf9e10>", "name": "", "shape": "point", "xlabel": "M1.out", @@ -31,18 +31,18 @@ ], "edges": [ { - "A": "<src.process.Process object at 0x71ee1a494c70>", - "B": "<src.operation.Operation object at 0x71ee1a497700>", + "A": "<src.process.Process object at 0x70f22dafa200>", + "B": "<src.operation.Operation object at 0x70f22daf9e10>", "label": "M1.out" }, { - "A": "<src.process.Process object at 0x71ee1a496ce0>", - "B": "<src.operation.Operation object at 0x71ee1a497700>", + "A": "<src.process.Process object at 0x70f22dafbf10>", + "B": "<src.operation.Operation object at 0x70f22daf9e10>", "label": "M1.out" }, { - "A": "<src.operation.Operation object at 0x71ee1a497700>", - "B": "<src.process.Process object at 0x71ee1a4950f0>", + "A": "<src.operation.Operation object at 0x70f22daf9e10>", + "B": "<src.process.Process object at 0x70f22dafa9e0>", "label": "" } ], diff --git a/tests/ressources/workflows/wf11/all_executors.json b/tests/ressources/workflows/wf11/all_executors.json new file mode 100644 index 0000000000000000000000000000000000000000..168b609596dc2d637251f51c56873b187963c936 --- /dev/null +++ b/tests/ressources/workflows/wf11/all_executors.json @@ -0,0 +1,5 @@ +{ + "<src.operation.Operation object at 0x70f2e278ba60>": "a = M1()", + "<src.operation.Operation object at 0x70f22db13670>": "a = Channel.empty()", + "Call_124185450985744": "M2(a)" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf11/all_processes.json b/tests/ressources/workflows/wf11/all_processes.json new file mode 100644 index 0000000000000000000000000000000000000000..c15832f084395f8923eefbca6e3aec95bd868fb0 --- /dev/null +++ b/tests/ressources/workflows/wf11/all_processes.json @@ -0,0 +1,4 @@ +{ + "<src.process.Process object at 0x70f22db13280>": "process M1 {\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db13b80>": "process M2 {\n input:\n path a\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf11/all_subworkflows.json b/tests/ressources/workflows/wf11/all_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..9e26dfeeb6e641a33dae4961196235bdb965b21b --- /dev/null +++ b/tests/ressources/workflows/wf11/all_subworkflows.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ressources/workflows/wf11/executors_per_subworkflows.json b/tests/ressources/workflows/wf11/executors_per_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..9e26dfeeb6e641a33dae4961196235bdb965b21b --- /dev/null +++ b/tests/ressources/workflows/wf11/executors_per_subworkflows.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ressources/workflows/wf11/specification_graph.json b/tests/ressources/workflows/wf11/specification_graph.json index 62ec257161aeaa8bb547e315fb0f9677483e5b5b..8d97f3e6af9b7e3ba6aa6245f1dc447f07dd2afa 100644 --- a/tests/ressources/workflows/wf11/specification_graph.json +++ b/tests/ressources/workflows/wf11/specification_graph.json @@ -1,35 +1,35 @@ { "nodes": [ { - "id": "<src.operation.Operation object at 0x71ee1a48e440>", + "id": "<src.operation.Operation object at 0x70f2e278ba60>", "name": "", "shape": "point", "xlabel": "a = M1()", "fillcolor": "white" }, { - "id": "<src.process.Process object at 0x71ee1a48fb50>", + "id": "<src.process.Process object at 0x70f22db13280>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a48fac0>", + "id": "<src.operation.Operation object at 0x70f22db13670>", "name": "", "shape": "point", "xlabel": "a = Channel.empty()", "fillcolor": "" }, { - "id": "<src.process.Process object at 0x71ee1a48ed40>", + "id": "<src.process.Process object at 0x70f22db13b80>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a48fa60>", + "id": "<src.operation.Operation object at 0x70f22db134c0>", "name": "", "shape": "point", "xlabel": "a", @@ -38,23 +38,23 @@ ], "edges": [ { - "A": "<src.process.Process object at 0x71ee1a48fb50>", - "B": "<src.operation.Operation object at 0x71ee1a48e440>", + "A": "<src.process.Process object at 0x70f22db13280>", + "B": "<src.operation.Operation object at 0x70f2e278ba60>", "label": "" }, { - "A": "<src.operation.Operation object at 0x71ee1a48e440>", - "B": "<src.operation.Operation object at 0x71ee1a48fa60>", + "A": "<src.operation.Operation object at 0x70f2e278ba60>", + "B": "<src.operation.Operation object at 0x70f22db134c0>", "label": "a" }, { - "A": "<src.operation.Operation object at 0x71ee1a48fac0>", - "B": "<src.operation.Operation object at 0x71ee1a48fa60>", + "A": "<src.operation.Operation object at 0x70f22db13670>", + "B": "<src.operation.Operation object at 0x70f22db134c0>", "label": "a" }, { - "A": "<src.operation.Operation object at 0x71ee1a48fa60>", - "B": "<src.process.Process object at 0x71ee1a48ed40>", + "A": "<src.operation.Operation object at 0x70f22db134c0>", + "B": "<src.process.Process object at 0x70f22db13b80>", "label": "" } ], diff --git a/tests/ressources/workflows/wf12/all_executors.json b/tests/ressources/workflows/wf12/all_executors.json new file mode 100644 index 0000000000000000000000000000000000000000..ad7c83c35846911688fa44d74b458d8925877b3a --- /dev/null +++ b/tests/ressources/workflows/wf12/all_executors.json @@ -0,0 +1,7 @@ +{ + "<src.operation.Operation object at 0x70f22da400d0>": "b = sub1.out.a", + "Call_124185451105920": "sub1()", + "Call_124185448857952": "sub2(b)", + "<src.operation.Operation object at 0x70f22d927e20>": "a = M1()", + "Call_124185450917040": "M2(b)" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf12/all_processes.json b/tests/ressources/workflows/wf12/all_processes.json new file mode 100644 index 0000000000000000000000000000000000000000..29c5df2ffead45d18ad83d5e693e2703c2679af7 --- /dev/null +++ b/tests/ressources/workflows/wf12/all_processes.json @@ -0,0 +1,4 @@ +{ + "<src.process.Process object at 0x70f22d9270a0>": "process M1 {\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db00b50>": "process M2 {\n input:\n path a\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf12/all_subworkflows.json b/tests/ressources/workflows/wf12/all_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..2c314d14d034de1498bb91db026a381b5b1d3472 --- /dev/null +++ b/tests/ressources/workflows/wf12/all_subworkflows.json @@ -0,0 +1,4 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22d90d300>": "workflow sub1 {\n main:\n a = M1()\n\n emit:\n a\n}", + "<src.subworkflow.Subworkflow object at 0x70f22db03f10>": "workflow sub2 {\n\n take:\n b\n\n main:\n M2(b)\n\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf12/executors_per_subworkflows.json b/tests/ressources/workflows/wf12/executors_per_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..82663fdddf3d975e63c3390c785340a899204c8e --- /dev/null +++ b/tests/ressources/workflows/wf12/executors_per_subworkflows.json @@ -0,0 +1,8 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22d90d300>": { + "<src.operation.Operation object at 0x70f22d927e20>": "a = M1()" + }, + "<src.subworkflow.Subworkflow object at 0x70f22db03f10>": { + "Call_124185450917040": "M2(b)" + } +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf12/specification_graph.json b/tests/ressources/workflows/wf12/specification_graph.json index 595f78cf2224ee8dee7b03b6273a9419d5b88fbf..84804a63fe59b71c533521e06315c9f196c3429d 100644 --- a/tests/ressources/workflows/wf12/specification_graph.json +++ b/tests/ressources/workflows/wf12/specification_graph.json @@ -1,14 +1,14 @@ { "nodes": [ { - "id": "<src.operation.Operation object at 0x71ee1a4963b0>", + "id": "<src.operation.Operation object at 0x70f22da400d0>", "name": "", "shape": "point", "xlabel": "b = sub1.out.a", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x71ee1a285210>", + "id": "<src.operation.Operation object at 0x70f22db006d0>", "name": "", "shape": "point", "xlabel": "b", @@ -17,18 +17,18 @@ ], "edges": [ { - "A": "<src.operation.Operation object at 0x71ee1a2cb730>", - "B": "<src.operation.Operation object at 0x71ee1a4963b0>", + "A": "<src.operation.Operation object at 0x70f22d925a80>", + "B": "<src.operation.Operation object at 0x70f22da400d0>", "label": "sub1.out.a" }, { - "A": "<src.operation.Operation object at 0x71ee1a4963b0>", - "B": "<src.operation.Operation object at 0x71ee1a285210>", + "A": "<src.operation.Operation object at 0x70f22da400d0>", + "B": "<src.operation.Operation object at 0x70f22db006d0>", "label": "b" }, { - "A": "<src.operation.Operation object at 0x71ee1a285210>", - "B": "<src.operation.Operation object at 0x71ee1a2ca380>", + "A": "<src.operation.Operation object at 0x70f22db006d0>", + "B": "<src.operation.Operation object at 0x70f22db02c80>", "label": "" } ], @@ -36,21 +36,21 @@ "sub1_0": { "nodes": [ { - "id": "<src.operation.Operation object at 0x71ee1a496b90>", + "id": "<src.operation.Operation object at 0x70f22d927e20>", "name": "", "shape": "point", "xlabel": "a = M1()", "fillcolor": "white" }, { - "id": "<src.process.Process object at 0x71ee1a2ca230>", + "id": "<src.process.Process object at 0x70f22d9270a0>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a2cb730>", + "id": "<src.operation.Operation object at 0x70f22d925a80>", "name": "", "shape": "point", "xlabel": "emit: a", @@ -59,13 +59,13 @@ ], "edges": [ { - "A": "<src.process.Process object at 0x71ee1a2ca230>", - "B": "<src.operation.Operation object at 0x71ee1a496b90>", + "A": "<src.process.Process object at 0x70f22d9270a0>", + "B": "<src.operation.Operation object at 0x70f22d927e20>", "label": "" }, { - "A": "<src.operation.Operation object at 0x71ee1a496b90>", - "B": "<src.operation.Operation object at 0x71ee1a2cb730>", + "A": "<src.operation.Operation object at 0x70f22d927e20>", + "B": "<src.operation.Operation object at 0x70f22d925a80>", "label": "a" } ], @@ -74,21 +74,21 @@ "sub2_0": { "nodes": [ { - "id": "<src.process.Process object at 0x71ee1a287ac0>", + "id": "<src.process.Process object at 0x70f22db00b50>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a287040>", + "id": "<src.operation.Operation object at 0x70f22db00a30>", "name": "", "shape": "point", "xlabel": "b", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a2ca380>", + "id": "<src.operation.Operation object at 0x70f22db02c80>", "name": "", "shape": "point", "xlabel": "take: b", @@ -97,13 +97,13 @@ ], "edges": [ { - "A": "<src.operation.Operation object at 0x71ee1a2ca380>", - "B": "<src.operation.Operation object at 0x71ee1a287040>", + "A": "<src.operation.Operation object at 0x70f22db02c80>", + "B": "<src.operation.Operation object at 0x70f22db00a30>", "label": "b" }, { - "A": "<src.operation.Operation object at 0x71ee1a287040>", - "B": "<src.process.Process object at 0x71ee1a287ac0>", + "A": "<src.operation.Operation object at 0x70f22db00a30>", + "B": "<src.process.Process object at 0x70f22db00b50>", "label": "" } ], diff --git a/tests/ressources/workflows/wf13/all_executors.json b/tests/ressources/workflows/wf13/all_executors.json new file mode 100644 index 0000000000000000000000000000000000000000..a8a0a208e31df22bad878be85f71efbf6448f895 --- /dev/null +++ b/tests/ressources/workflows/wf13/all_executors.json @@ -0,0 +1,6 @@ +{ + "<src.operation.Operation object at 0x70f22db029b0>": "b = sub1.out.a", + "Call_124185450906288": "sub1()", + "Call_124185450679648": "M2(b)", + "<src.operation.Operation object at 0x70f22e63fa90>": "a = M1()" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf13/all_processes.json b/tests/ressources/workflows/wf13/all_processes.json new file mode 100644 index 0000000000000000000000000000000000000000..23dbe572fbf42db3218df7b072dd5675e2adaa5b --- /dev/null +++ b/tests/ressources/workflows/wf13/all_processes.json @@ -0,0 +1,4 @@ +{ + "<src.process.Process object at 0x70f22e610070>": "process M1 {\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db14370>": "process M2 {\n input:\n path a\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf13/all_subworkflows.json b/tests/ressources/workflows/wf13/all_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..cfa03bad80a3ef76e1160b33ebd5e8c6c45e2393 --- /dev/null +++ b/tests/ressources/workflows/wf13/all_subworkflows.json @@ -0,0 +1,3 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22dacb730>": "workflow sub1 {\n main:\n a = M1()\n\n emit:\n a\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf13/executors_per_subworkflows.json b/tests/ressources/workflows/wf13/executors_per_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..a80c7ffd301bac215d307840ae111f3fd15874ae --- /dev/null +++ b/tests/ressources/workflows/wf13/executors_per_subworkflows.json @@ -0,0 +1,5 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22dacb730>": { + "<src.operation.Operation object at 0x70f22e63fa90>": "a = M1()" + } +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf13/specification_graph.json b/tests/ressources/workflows/wf13/specification_graph.json index 9cfc7d41c9146129aea1f5b3b48883709c906294..b3f76bc74128df5ad39cb913de3c2529b577ad3d 100644 --- a/tests/ressources/workflows/wf13/specification_graph.json +++ b/tests/ressources/workflows/wf13/specification_graph.json @@ -1,21 +1,21 @@ { "nodes": [ { - "id": "<src.operation.Operation object at 0x71ee1a29d8d0>", + "id": "<src.operation.Operation object at 0x70f22db029b0>", "name": "", "shape": "point", "xlabel": "b = sub1.out.a", "fillcolor": "white" }, { - "id": "<src.process.Process object at 0x71eeceeed7b0>", + "id": "<src.process.Process object at 0x70f22db14370>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71eeceeec040>", + "id": "<src.operation.Operation object at 0x70f22db14160>", "name": "", "shape": "point", "xlabel": "b", @@ -24,18 +24,18 @@ ], "edges": [ { - "A": "<src.operation.Operation object at 0x71eeceeec2e0>", - "B": "<src.operation.Operation object at 0x71ee1a29d8d0>", + "A": "<src.operation.Operation object at 0x70f22e6100d0>", + "B": "<src.operation.Operation object at 0x70f22db029b0>", "label": "sub1.out.a" }, { - "A": "<src.operation.Operation object at 0x71ee1a29d8d0>", - "B": "<src.operation.Operation object at 0x71eeceeec040>", + "A": "<src.operation.Operation object at 0x70f22db029b0>", + "B": "<src.operation.Operation object at 0x70f22db14160>", "label": "b" }, { - "A": "<src.operation.Operation object at 0x71eeceeec040>", - "B": "<src.process.Process object at 0x71eeceeed7b0>", + "A": "<src.operation.Operation object at 0x70f22db14160>", + "B": "<src.process.Process object at 0x70f22db14370>", "label": "" } ], @@ -43,21 +43,21 @@ "sub1_0": { "nodes": [ { - "id": "<src.operation.Operation object at 0x71eeceeed4b0>", + "id": "<src.operation.Operation object at 0x70f22e63fa90>", "name": "", "shape": "point", "xlabel": "a = M1()", "fillcolor": "white" }, { - "id": "<src.process.Process object at 0x71eeceeee830>", + "id": "<src.process.Process object at 0x70f22e610070>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71eeceeec2e0>", + "id": "<src.operation.Operation object at 0x70f22e6100d0>", "name": "", "shape": "point", "xlabel": "emit: a", @@ -66,13 +66,13 @@ ], "edges": [ { - "A": "<src.process.Process object at 0x71eeceeee830>", - "B": "<src.operation.Operation object at 0x71eeceeed4b0>", + "A": "<src.process.Process object at 0x70f22e610070>", + "B": "<src.operation.Operation object at 0x70f22e63fa90>", "label": "" }, { - "A": "<src.operation.Operation object at 0x71eeceeed4b0>", - "B": "<src.operation.Operation object at 0x71eeceeec2e0>", + "A": "<src.operation.Operation object at 0x70f22e63fa90>", + "B": "<src.operation.Operation object at 0x70f22e6100d0>", "label": "a" } ], diff --git a/tests/ressources/workflows/wf14/all_executors.json b/tests/ressources/workflows/wf14/all_executors.json new file mode 100644 index 0000000000000000000000000000000000000000..3535e02189d29929e3bb1d197e8111e844187ddf --- /dev/null +++ b/tests/ressources/workflows/wf14/all_executors.json @@ -0,0 +1,5 @@ +{ + "<src.operation.Operation object at 0x70f22db13c10>": "b = Channel.empty()", + "Call_124185450986752": "sub2(b)", + "Call_124185450982384": "M2(b)" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf14/all_processes.json b/tests/ressources/workflows/wf14/all_processes.json new file mode 100644 index 0000000000000000000000000000000000000000..695fc41420d41de2f2ba54e17d871a1a5334a95a --- /dev/null +++ b/tests/ressources/workflows/wf14/all_processes.json @@ -0,0 +1,3 @@ +{ + "<src.process.Process object at 0x70f22db13c40>": "process M2 {\n input:\n path a\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf14/all_subworkflows.json b/tests/ressources/workflows/wf14/all_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..081f521ff8018e5ba9eea829ca6f61219a2f74f5 --- /dev/null +++ b/tests/ressources/workflows/wf14/all_subworkflows.json @@ -0,0 +1,3 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22db123b0>": "workflow sub2 {\n\n take:\n b\n\n main:\n M2(b)\n\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf14/executors_per_subworkflows.json b/tests/ressources/workflows/wf14/executors_per_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..6a20ec784a334cf6d2f49f3fa640c3e288b82044 --- /dev/null +++ b/tests/ressources/workflows/wf14/executors_per_subworkflows.json @@ -0,0 +1,5 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22db123b0>": { + "Call_124185450982384": "M2(b)" + } +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf14/specification_graph.json b/tests/ressources/workflows/wf14/specification_graph.json index 02765cfdcf0ecb7b445ec2f5052d5f57abc532a0..c6ee9fd3b11f4580309daeb1d026863518a57e67 100644 --- a/tests/ressources/workflows/wf14/specification_graph.json +++ b/tests/ressources/workflows/wf14/specification_graph.json @@ -1,14 +1,14 @@ { "nodes": [ { - "id": "<src.operation.Operation object at 0x71ee1a498160>", + "id": "<src.operation.Operation object at 0x70f22db13c10>", "name": "", "shape": "point", "xlabel": "b = Channel.empty()", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a3c9930>", + "id": "<src.operation.Operation object at 0x70f22db12ec0>", "name": "", "shape": "point", "xlabel": "b", @@ -17,13 +17,13 @@ ], "edges": [ { - "A": "<src.operation.Operation object at 0x71ee1a498160>", - "B": "<src.operation.Operation object at 0x71ee1a3c9930>", + "A": "<src.operation.Operation object at 0x70f22db13c10>", + "B": "<src.operation.Operation object at 0x70f22db12ec0>", "label": "b" }, { - "A": "<src.operation.Operation object at 0x71ee1a3c9930>", - "B": "<src.operation.Operation object at 0x71ee1a498250>", + "A": "<src.operation.Operation object at 0x70f22db12ec0>", + "B": "<src.operation.Operation object at 0x70f22db12740>", "label": "" } ], @@ -31,21 +31,21 @@ "sub2_0": { "nodes": [ { - "id": "<src.process.Process object at 0x71ee1a2686d0>", + "id": "<src.process.Process object at 0x70f22db13c40>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a269d20>", + "id": "<src.operation.Operation object at 0x70f22db138e0>", "name": "", "shape": "point", "xlabel": "b", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a498250>", + "id": "<src.operation.Operation object at 0x70f22db12740>", "name": "", "shape": "point", "xlabel": "take: b", @@ -54,13 +54,13 @@ ], "edges": [ { - "A": "<src.operation.Operation object at 0x71ee1a498250>", - "B": "<src.operation.Operation object at 0x71ee1a269d20>", + "A": "<src.operation.Operation object at 0x70f22db12740>", + "B": "<src.operation.Operation object at 0x70f22db138e0>", "label": "b" }, { - "A": "<src.operation.Operation object at 0x71ee1a269d20>", - "B": "<src.process.Process object at 0x71ee1a2686d0>", + "A": "<src.operation.Operation object at 0x70f22db138e0>", + "B": "<src.process.Process object at 0x70f22db13c40>", "label": "" } ], diff --git a/tests/ressources/workflows/wf15/all_executors.json b/tests/ressources/workflows/wf15/all_executors.json new file mode 100644 index 0000000000000000000000000000000000000000..71eba39590c1231cdcb1c03522fb86c87e6fbe6d --- /dev/null +++ b/tests/ressources/workflows/wf15/all_executors.json @@ -0,0 +1,10 @@ +{ + "Call_124185451046912": "sub2(sub_M3.out)", + "Call_124185451041632": "M1()", + "Call_124185451040144": "sub_M3(M1.out)", + "Call_124185451041056": "M2()", + "Call_124185451040528": "sub_M3(M2.out)", + "Call_124185451041968": "M4(b)", + "Call_124185451041344": "M3(ch)", + "Call_124185451039040": "M3(ch)" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf15/all_processes.json b/tests/ressources/workflows/wf15/all_processes.json new file mode 100644 index 0000000000000000000000000000000000000000..ca64096bda5545834d37ebaa4593c7afc53f8fea --- /dev/null +++ b/tests/ressources/workflows/wf15/all_processes.json @@ -0,0 +1,7 @@ +{ + "<src.process.Process object at 0x70f22db22680>": "process M4 {\n input:\n path a\n\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db21450>": "process M3 {\n input:\n path a\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db211e0>": "process M3 {\n input:\n path a\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db226b0>": "process M1 {\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db21000>": "process M2 {\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf15/all_subworkflows.json b/tests/ressources/workflows/wf15/all_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..3935b956dbc31c750ff51e60d3100eae6db8b1f9 --- /dev/null +++ b/tests/ressources/workflows/wf15/all_subworkflows.json @@ -0,0 +1,5 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22db228c0>": "workflow sub2 {\n\n take:\n b\n\n main:\n M4(b)\n\n}", + "<src.subworkflow.Subworkflow object at 0x70f22db20be0>": "workflow sub_M3 {\n\n take:\n ch\n\n main:\n M3(ch)\n\n emit:\n M3.out\n\n}", + "<src.subworkflow.Subworkflow object at 0x70f22db20fd0>": "workflow sub_M3 {\n\n take:\n ch\n\n main:\n M3(ch)\n\n emit:\n M3.out\n\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf15/executors_per_subworkflows.json b/tests/ressources/workflows/wf15/executors_per_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..f1b189c0f9ee49bb7eaaa6880ecbd5525d1a387d --- /dev/null +++ b/tests/ressources/workflows/wf15/executors_per_subworkflows.json @@ -0,0 +1,11 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22db228c0>": { + "Call_124185451041968": "M4(b)" + }, + "<src.subworkflow.Subworkflow object at 0x70f22db20be0>": { + "Call_124185451041344": "M3(ch)" + }, + "<src.subworkflow.Subworkflow object at 0x70f22db20fd0>": { + "Call_124185451039040": "M3(ch)" + } +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf15/specification_graph.json b/tests/ressources/workflows/wf15/specification_graph.json index 387e9473e7950d71a4bb607d69fa7ed636b46ab5..0e274bbd59d4cba3701e925d37d2cc0ebc33cfac 100644 --- a/tests/ressources/workflows/wf15/specification_graph.json +++ b/tests/ressources/workflows/wf15/specification_graph.json @@ -1,35 +1,35 @@ { "nodes": [ { - "id": "<src.process.Process object at 0x71ee1a488a60>", + "id": "<src.process.Process object at 0x70f22db226b0>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a4a5f90>", + "id": "<src.operation.Operation object at 0x70f22db20ee0>", "name": "", "shape": "point", "xlabel": "M1.out", "fillcolor": "white" }, { - "id": "<src.process.Process object at 0x71ee1a4a4820>", + "id": "<src.process.Process object at 0x70f22db21000>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a4a4d60>", + "id": "<src.operation.Operation object at 0x70f22db225c0>", "name": "", "shape": "point", "xlabel": "M2.out", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x71ee1a4a4c40>", + "id": "<src.operation.Operation object at 0x70f22db222c0>", "name": "", "shape": "point", "xlabel": "sub_M3.out", @@ -38,38 +38,38 @@ ], "edges": [ { - "A": "<src.process.Process object at 0x71ee1a488a60>", - "B": "<src.operation.Operation object at 0x71ee1a4a5f90>", + "A": "<src.process.Process object at 0x70f22db226b0>", + "B": "<src.operation.Operation object at 0x70f22db20ee0>", "label": "M1.out" }, { - "A": "<src.operation.Operation object at 0x71ee1a4a5f90>", - "B": "<src.operation.Operation object at 0x71ee1a48fbe0>", + "A": "<src.operation.Operation object at 0x70f22db20ee0>", + "B": "<src.operation.Operation object at 0x70f22db20970>", "label": "" }, { - "A": "<src.process.Process object at 0x71ee1a4a4820>", - "B": "<src.operation.Operation object at 0x71ee1a4a4d60>", + "A": "<src.process.Process object at 0x70f22db21000>", + "B": "<src.operation.Operation object at 0x70f22db225c0>", "label": "M2.out" }, { - "A": "<src.operation.Operation object at 0x71ee1a4a4d60>", - "B": "<src.operation.Operation object at 0x71ee1a4a4c70>", + "A": "<src.operation.Operation object at 0x70f22db225c0>", + "B": "<src.operation.Operation object at 0x70f22db21330>", "label": "" }, { - "A": "<src.operation.Operation object at 0x71ee1a48fdc0>", - "B": "<src.operation.Operation object at 0x71ee1a4a4c40>", + "A": "<src.operation.Operation object at 0x70f22db20d30>", + "B": "<src.operation.Operation object at 0x70f22db222c0>", "label": "sub_M3.out" }, { - "A": "<src.operation.Operation object at 0x71ee1a4a4af0>", - "B": "<src.operation.Operation object at 0x71ee1a4a4c40>", + "A": "<src.operation.Operation object at 0x70f22db21b10>", + "B": "<src.operation.Operation object at 0x70f22db222c0>", "label": "sub_M3.out" }, { - "A": "<src.operation.Operation object at 0x71ee1a4a4c40>", - "B": "<src.operation.Operation object at 0x71ee1a488b20>", + "A": "<src.operation.Operation object at 0x70f22db222c0>", + "B": "<src.operation.Operation object at 0x70f22db214e0>", "label": "" } ], @@ -77,28 +77,28 @@ "sub_M3_0": { "nodes": [ { - "id": "<src.process.Process object at 0x71ee1a4a5d20>", + "id": "<src.process.Process object at 0x70f22db21450>", "name": "M3", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a4a5390>", + "id": "<src.operation.Operation object at 0x70f22db226e0>", "name": "", "shape": "point", "xlabel": "ch", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a48fbe0>", + "id": "<src.operation.Operation object at 0x70f22db20970>", "name": "", "shape": "point", "xlabel": "take: ch", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a48fdc0>", + "id": "<src.operation.Operation object at 0x70f22db20d30>", "name": "", "shape": "point", "xlabel": "emit: M3.out", @@ -107,18 +107,18 @@ ], "edges": [ { - "A": "<src.operation.Operation object at 0x71ee1a48fbe0>", - "B": "<src.operation.Operation object at 0x71ee1a4a5390>", + "A": "<src.operation.Operation object at 0x70f22db20970>", + "B": "<src.operation.Operation object at 0x70f22db226e0>", "label": "ch" }, { - "A": "<src.operation.Operation object at 0x71ee1a4a5390>", - "B": "<src.process.Process object at 0x71ee1a4a5d20>", + "A": "<src.operation.Operation object at 0x70f22db226e0>", + "B": "<src.process.Process object at 0x70f22db21450>", "label": "" }, { - "A": "<src.process.Process object at 0x71ee1a4a5d20>", - "B": "<src.operation.Operation object at 0x71ee1a48fdc0>", + "A": "<src.process.Process object at 0x70f22db21450>", + "B": "<src.operation.Operation object at 0x70f22db20d30>", "label": "M3.out" } ], @@ -127,28 +127,28 @@ "sub_M3_1": { "nodes": [ { - "id": "<src.process.Process object at 0x71ee1a4a4a60>", + "id": "<src.process.Process object at 0x70f22db211e0>", "name": "M3", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a4a4880>", + "id": "<src.operation.Operation object at 0x70f22db209d0>", "name": "", "shape": "point", "xlabel": "ch", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a4a4c70>", + "id": "<src.operation.Operation object at 0x70f22db21330>", "name": "", "shape": "point", "xlabel": "take: ch", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a4a4af0>", + "id": "<src.operation.Operation object at 0x70f22db21b10>", "name": "", "shape": "point", "xlabel": "emit: M3.out", @@ -157,18 +157,18 @@ ], "edges": [ { - "A": "<src.operation.Operation object at 0x71ee1a4a4c70>", - "B": "<src.operation.Operation object at 0x71ee1a4a4880>", + "A": "<src.operation.Operation object at 0x70f22db21330>", + "B": "<src.operation.Operation object at 0x70f22db209d0>", "label": "ch" }, { - "A": "<src.operation.Operation object at 0x71ee1a4a4880>", - "B": "<src.process.Process object at 0x71ee1a4a4a60>", + "A": "<src.operation.Operation object at 0x70f22db209d0>", + "B": "<src.process.Process object at 0x70f22db211e0>", "label": "" }, { - "A": "<src.process.Process object at 0x71ee1a4a4a60>", - "B": "<src.operation.Operation object at 0x71ee1a4a4af0>", + "A": "<src.process.Process object at 0x70f22db211e0>", + "B": "<src.operation.Operation object at 0x70f22db21b10>", "label": "M3.out" } ], @@ -177,21 +177,21 @@ "sub2_0": { "nodes": [ { - "id": "<src.process.Process object at 0x71ee1a48a890>", + "id": "<src.process.Process object at 0x70f22db22680>", "name": "M4", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a48a470>", + "id": "<src.operation.Operation object at 0x70f22db227d0>", "name": "", "shape": "point", "xlabel": "b", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a488b20>", + "id": "<src.operation.Operation object at 0x70f22db214e0>", "name": "", "shape": "point", "xlabel": "take: b", @@ -200,13 +200,13 @@ ], "edges": [ { - "A": "<src.operation.Operation object at 0x71ee1a488b20>", - "B": "<src.operation.Operation object at 0x71ee1a48a470>", + "A": "<src.operation.Operation object at 0x70f22db214e0>", + "B": "<src.operation.Operation object at 0x70f22db227d0>", "label": "b" }, { - "A": "<src.operation.Operation object at 0x71ee1a48a470>", - "B": "<src.process.Process object at 0x71ee1a48a890>", + "A": "<src.operation.Operation object at 0x70f22db227d0>", + "B": "<src.process.Process object at 0x70f22db22680>", "label": "" } ], diff --git a/tests/ressources/workflows/wf16/all_executors.json b/tests/ressources/workflows/wf16/all_executors.json new file mode 100644 index 0000000000000000000000000000000000000000..a9986f3359cdb1c62dcf21dcdea28c488001cd44 --- /dev/null +++ b/tests/ressources/workflows/wf16/all_executors.json @@ -0,0 +1,8 @@ +{ + "Call_124185451044368": "sub2(M3.out)", + "Call_124185451048160": "M1()", + "Call_124185451044800": "M3(M1.out)", + "Call_124185451050272": "M2()", + "Call_124185451051136": "M3(M2.out)", + "Call_124185451043792": "M4(b)" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf16/all_processes.json b/tests/ressources/workflows/wf16/all_processes.json new file mode 100644 index 0000000000000000000000000000000000000000..9972dc8d402ce4162af8a2158ee3a8e6dd13749d --- /dev/null +++ b/tests/ressources/workflows/wf16/all_processes.json @@ -0,0 +1,7 @@ +{ + "<src.process.Process object at 0x70f22db22050>": "process M4 {\n input:\n path a\n\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db22e90>": "process M1 {\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db22ef0>": "process M3 {\n input:\n path a\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db23370>": "process M2 {\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db232e0>": "process M3 {\n input:\n path a\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf16/all_subworkflows.json b/tests/ressources/workflows/wf16/all_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..679d70c6f1dc0c4d0e49188699ec0d9b29e0e94d --- /dev/null +++ b/tests/ressources/workflows/wf16/all_subworkflows.json @@ -0,0 +1,3 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22db21f30>": "workflow sub2 {\n\n take:\n b\n\n main:\n M4(b)\n\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf16/executors_per_subworkflows.json b/tests/ressources/workflows/wf16/executors_per_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..730af7d71ce5bb5bff3a5194dd39335984dc4e0c --- /dev/null +++ b/tests/ressources/workflows/wf16/executors_per_subworkflows.json @@ -0,0 +1,5 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22db21f30>": { + "Call_124185451043792": "M4(b)" + } +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf16/specification_graph.json b/tests/ressources/workflows/wf16/specification_graph.json index 528f2bb2d8d9913996e1c0e21475bcb0065d0bda..480d6f5363269463ff7604a142068ddb7886d8f1 100644 --- a/tests/ressources/workflows/wf16/specification_graph.json +++ b/tests/ressources/workflows/wf16/specification_graph.json @@ -1,49 +1,49 @@ { "nodes": [ { - "id": "<src.process.Process object at 0x71ee1a53a5c0>", + "id": "<src.process.Process object at 0x70f22db22e90>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.process.Process object at 0x71ee1a2562f0>", + "id": "<src.process.Process object at 0x70f22db22ef0>", "name": "M3", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a257df0>", + "id": "<src.operation.Operation object at 0x70f22db23400>", "name": "", "shape": "point", "xlabel": "M1.out", "fillcolor": "white" }, { - "id": "<src.process.Process object at 0x71ee1a2dde70>", + "id": "<src.process.Process object at 0x70f22db23370>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.process.Process object at 0x71ee1a4a6380>", + "id": "<src.process.Process object at 0x70f22db232e0>", "name": "M3", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a4a63e0>", + "id": "<src.operation.Operation object at 0x70f22db236d0>", "name": "", "shape": "point", "xlabel": "M2.out", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x71ee1a4a48e0>", + "id": "<src.operation.Operation object at 0x70f22db23e50>", "name": "", "shape": "point", "xlabel": "M3.out", @@ -52,38 +52,38 @@ ], "edges": [ { - "A": "<src.process.Process object at 0x71ee1a53a5c0>", - "B": "<src.operation.Operation object at 0x71ee1a257df0>", + "A": "<src.process.Process object at 0x70f22db22e90>", + "B": "<src.operation.Operation object at 0x70f22db23400>", "label": "M1.out" }, { - "A": "<src.operation.Operation object at 0x71ee1a257df0>", - "B": "<src.process.Process object at 0x71ee1a2562f0>", + "A": "<src.operation.Operation object at 0x70f22db23400>", + "B": "<src.process.Process object at 0x70f22db22ef0>", "label": "" }, { - "A": "<src.process.Process object at 0x71ee1a2dde70>", - "B": "<src.operation.Operation object at 0x71ee1a4a63e0>", + "A": "<src.process.Process object at 0x70f22db23370>", + "B": "<src.operation.Operation object at 0x70f22db236d0>", "label": "M2.out" }, { - "A": "<src.operation.Operation object at 0x71ee1a4a63e0>", - "B": "<src.process.Process object at 0x71ee1a4a6380>", + "A": "<src.operation.Operation object at 0x70f22db236d0>", + "B": "<src.process.Process object at 0x70f22db232e0>", "label": "" }, { - "A": "<src.process.Process object at 0x71ee1a2562f0>", - "B": "<src.operation.Operation object at 0x71ee1a4a48e0>", + "A": "<src.process.Process object at 0x70f22db22ef0>", + "B": "<src.operation.Operation object at 0x70f22db23e50>", "label": "M3.out" }, { - "A": "<src.process.Process object at 0x71ee1a4a6380>", - "B": "<src.operation.Operation object at 0x71ee1a4a48e0>", + "A": "<src.process.Process object at 0x70f22db232e0>", + "B": "<src.operation.Operation object at 0x70f22db23e50>", "label": "M3.out" }, { - "A": "<src.operation.Operation object at 0x71ee1a4a48e0>", - "B": "<src.operation.Operation object at 0x71ee1a53b220>", + "A": "<src.operation.Operation object at 0x70f22db23e50>", + "B": "<src.operation.Operation object at 0x70f22db21cf0>", "label": "" } ], @@ -91,21 +91,21 @@ "sub2_0": { "nodes": [ { - "id": "<src.process.Process object at 0x71ee1a53aa10>", + "id": "<src.process.Process object at 0x70f22db22050>", "name": "M4", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a53b2b0>", + "id": "<src.operation.Operation object at 0x70f22db238b0>", "name": "", "shape": "point", "xlabel": "b", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a53b220>", + "id": "<src.operation.Operation object at 0x70f22db21cf0>", "name": "", "shape": "point", "xlabel": "take: b", @@ -114,13 +114,13 @@ ], "edges": [ { - "A": "<src.operation.Operation object at 0x71ee1a53b220>", - "B": "<src.operation.Operation object at 0x71ee1a53b2b0>", + "A": "<src.operation.Operation object at 0x70f22db21cf0>", + "B": "<src.operation.Operation object at 0x70f22db238b0>", "label": "b" }, { - "A": "<src.operation.Operation object at 0x71ee1a53b2b0>", - "B": "<src.process.Process object at 0x71ee1a53aa10>", + "A": "<src.operation.Operation object at 0x70f22db238b0>", + "B": "<src.process.Process object at 0x70f22db22050>", "label": "" } ], diff --git a/tests/ressources/workflows/wf17/all_executors.json b/tests/ressources/workflows/wf17/all_executors.json new file mode 100644 index 0000000000000000000000000000000000000000..b70f813b76c48f57de2972e6a9bcf29c20da5d4a --- /dev/null +++ b/tests/ressources/workflows/wf17/all_executors.json @@ -0,0 +1,16 @@ +{ + "<src.operation.Operation object at 0x70f22db20eb0>": "c = a", + "<src.operation.Operation object at 0x70f22db21060>": "a = sub1()", + "<src.operation.Operation object at 0x70f22db21330>": "a = sub2()", + "<src.operation.Operation object at 0x70f22db23ac0>": "ch = Channel.empty()", + "Call_124185451045376": "M1()", + "<src.operation.Operation object at 0x70f22db20be0>": "a = M2.out", + "Call_124185451048016": "M2(M1.out)", + "<src.operation.Operation object at 0x70f22db22fb0>": "a = Channel.empty()", + "Call_124185451040720": "M1()", + "Call_124185451040672": "sub3()", + "Call_124185451040240": "M3()", + "<src.operation.Operation object at 0x70f22db20af0>": "a = M2.out", + "Call_124185451045568": "M2(M1.out)", + "<src.operation.Operation object at 0x70f22db217b0>": "a = Channel.empty()" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf17/all_processes.json b/tests/ressources/workflows/wf17/all_processes.json new file mode 100644 index 0000000000000000000000000000000000000000..1a5168a03c65bb258521a56b5020aef5eadd08fc --- /dev/null +++ b/tests/ressources/workflows/wf17/all_processes.json @@ -0,0 +1,7 @@ +{ + "<src.process.Process object at 0x70f22db22950>": "process M1 {\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db23670>": "process M2 {\n input:\n path a\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db20a30>": "process M1 {\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db215a0>": "process M3 {\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db21180>": "process M2 {\n input:\n path a\n\n \"\"\"\n SOMETHING\n \"\"\"\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf17/all_subworkflows.json b/tests/ressources/workflows/wf17/all_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..aa03b73d5d78e1a5ee6e920f1116ba1471667a9f --- /dev/null +++ b/tests/ressources/workflows/wf17/all_subworkflows.json @@ -0,0 +1,5 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22db22650>": "workflow sub3 {\n main:\n ch = Channel.empty()\n \n\n}", + "<src.subworkflow.Subworkflow object at 0x70f22db20f10>": "workflow sub1 {\n main:\n M1()\n if(2==2){\n M2(M1.out)\n a = M2.out\n } else {\n a = Channel.empty()\n }\n\n emit:\n a\n}", + "<src.subworkflow.Subworkflow object at 0x70f22db22980>": "workflow sub2 {\n main:\n M1()\n if(2==2){\n M2(M1.out)\n a = M2.out\n } else {\n a = Channel.empty()\n }\n sub3()\n M3()\n\n emit:\n a\n \n\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf17/executors_per_subworkflows.json b/tests/ressources/workflows/wf17/executors_per_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..a00d97d59125ec5761299ba4c1f4347ca72d68df --- /dev/null +++ b/tests/ressources/workflows/wf17/executors_per_subworkflows.json @@ -0,0 +1,20 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22db22650>": { + "<src.operation.Operation object at 0x70f22db23ac0>": "ch = Channel.empty()" + }, + "<src.subworkflow.Subworkflow object at 0x70f22db20f10>": { + "Call_124185451045376": "M1()", + "<src.operation.Operation object at 0x70f22db20be0>": "a = M2.out", + "Call_124185451048016": "M2(M1.out)", + "<src.operation.Operation object at 0x70f22db22fb0>": "a = Channel.empty()" + }, + "<src.subworkflow.Subworkflow object at 0x70f22db22980>": { + "Call_124185451040720": "M1()", + "Call_124185451040672": "sub3()", + "Call_124185451040240": "M3()", + "<src.operation.Operation object at 0x70f22db20af0>": "a = M2.out", + "Call_124185451045568": "M2(M1.out)", + "<src.operation.Operation object at 0x70f22db217b0>": "a = Channel.empty()", + "<src.operation.Operation object at 0x70f22db23ac0>": "ch = Channel.empty()" + } +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf17/specification_graph.json b/tests/ressources/workflows/wf17/specification_graph.json index b67a38d69e5fbdbd3d0fef08750cc4f0a82b756f..08430315108fca2118357fffd241569c4a3f552c 100644 --- a/tests/ressources/workflows/wf17/specification_graph.json +++ b/tests/ressources/workflows/wf17/specification_graph.json @@ -1,21 +1,21 @@ { "nodes": [ { - "id": "<src.operation.Operation object at 0x71ee1a497850>", + "id": "<src.operation.Operation object at 0x70f22db21060>", "name": "", "shape": "point", "xlabel": "a = sub1()", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x71ee1a4a7070>", + "id": "<src.operation.Operation object at 0x70f22db21330>", "name": "", "shape": "point", "xlabel": "a = sub2()", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x71ee1a497310>", + "id": "<src.operation.Operation object at 0x70f22db20eb0>", "name": "", "shape": "point", "xlabel": "c = a", @@ -24,23 +24,23 @@ ], "edges": [ { - "A": "<src.operation.Operation object at 0x71ee1a4a7190>", - "B": "<src.operation.Operation object at 0x71ee1a497850>", + "A": "<src.operation.Operation object at 0x70f22db23ca0>", + "B": "<src.operation.Operation object at 0x70f22db21060>", "label": "emit: a" }, { - "A": "<src.operation.Operation object at 0x71ee1a4a6920>", - "B": "<src.operation.Operation object at 0x71ee1a4a7070>", + "A": "<src.operation.Operation object at 0x70f22db21300>", + "B": "<src.operation.Operation object at 0x70f22db21330>", "label": "emit: a" }, { - "A": "<src.operation.Operation object at 0x71ee1a497850>", - "B": "<src.operation.Operation object at 0x71ee1a497310>", + "A": "<src.operation.Operation object at 0x70f22db21060>", + "B": "<src.operation.Operation object at 0x70f22db20eb0>", "label": "a" }, { - "A": "<src.operation.Operation object at 0x71ee1a4a7070>", - "B": "<src.operation.Operation object at 0x71ee1a497310>", + "A": "<src.operation.Operation object at 0x70f22db21330>", + "B": "<src.operation.Operation object at 0x70f22db20eb0>", "label": "a" } ], @@ -48,42 +48,42 @@ "sub1_0": { "nodes": [ { - "id": "<src.operation.Operation object at 0x71ee1a2cb3a0>", + "id": "<src.operation.Operation object at 0x70f22db20be0>", "name": "", "shape": "point", "xlabel": "a = M2.out", "fillcolor": "white" }, { - "id": "<src.process.Process object at 0x71ee1a240fa0>", + "id": "<src.process.Process object at 0x70f22db23670>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a243850>", + "id": "<src.operation.Operation object at 0x70f22db224d0>", "name": "", "shape": "point", "xlabel": "M1.out", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x71ee1a4a7400>", + "id": "<src.operation.Operation object at 0x70f22db22fb0>", "name": "", "shape": "point", "xlabel": "a = Channel.empty()", "fillcolor": "" }, { - "id": "<src.process.Process object at 0x71ee1a2cbbb0>", + "id": "<src.process.Process object at 0x70f22db22950>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a4a7190>", + "id": "<src.operation.Operation object at 0x70f22db23ca0>", "name": "", "shape": "point", "xlabel": "emit: a", @@ -92,28 +92,28 @@ ], "edges": [ { - "A": "<src.process.Process object at 0x71ee1a240fa0>", - "B": "<src.operation.Operation object at 0x71ee1a2cb3a0>", + "A": "<src.process.Process object at 0x70f22db23670>", + "B": "<src.operation.Operation object at 0x70f22db20be0>", "label": "M2.out" }, { - "A": "<src.process.Process object at 0x71ee1a2cbbb0>", - "B": "<src.operation.Operation object at 0x71ee1a243850>", + "A": "<src.process.Process object at 0x70f22db22950>", + "B": "<src.operation.Operation object at 0x70f22db224d0>", "label": "M1.out" }, { - "A": "<src.operation.Operation object at 0x71ee1a243850>", - "B": "<src.process.Process object at 0x71ee1a240fa0>", + "A": "<src.operation.Operation object at 0x70f22db224d0>", + "B": "<src.process.Process object at 0x70f22db23670>", "label": "" }, { - "A": "<src.operation.Operation object at 0x71ee1a2cb3a0>", - "B": "<src.operation.Operation object at 0x71ee1a4a7190>", + "A": "<src.operation.Operation object at 0x70f22db20be0>", + "B": "<src.operation.Operation object at 0x70f22db23ca0>", "label": "a" }, { - "A": "<src.operation.Operation object at 0x71ee1a4a7400>", - "B": "<src.operation.Operation object at 0x71ee1a4a7190>", + "A": "<src.operation.Operation object at 0x70f22db22fb0>", + "B": "<src.operation.Operation object at 0x70f22db23ca0>", "label": "a" } ], @@ -122,49 +122,49 @@ "sub2_0": { "nodes": [ { - "id": "<src.operation.Operation object at 0x71ee1a4a6950>", + "id": "<src.operation.Operation object at 0x70f22db20af0>", "name": "", "shape": "point", "xlabel": "a = M2.out", "fillcolor": "white" }, { - "id": "<src.process.Process object at 0x71ee1a4a6650>", + "id": "<src.process.Process object at 0x70f22db21180>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a4a67d0>", + "id": "<src.operation.Operation object at 0x70f22db20f70>", "name": "", "shape": "point", "xlabel": "M1.out", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x71ee1a4a68c0>", + "id": "<src.operation.Operation object at 0x70f22db217b0>", "name": "", "shape": "point", "xlabel": "a = Channel.empty()", "fillcolor": "" }, { - "id": "<src.process.Process object at 0x71ee1a4a6c50>", + "id": "<src.process.Process object at 0x70f22db20a30>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.process.Process object at 0x71ee1a4a69b0>", + "id": "<src.process.Process object at 0x70f22db215a0>", "name": "M3", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a4a6920>", + "id": "<src.operation.Operation object at 0x70f22db21300>", "name": "", "shape": "point", "xlabel": "emit: a", @@ -173,28 +173,28 @@ ], "edges": [ { - "A": "<src.process.Process object at 0x71ee1a4a6650>", - "B": "<src.operation.Operation object at 0x71ee1a4a6950>", + "A": "<src.process.Process object at 0x70f22db21180>", + "B": "<src.operation.Operation object at 0x70f22db20af0>", "label": "M2.out" }, { - "A": "<src.process.Process object at 0x71ee1a4a6c50>", - "B": "<src.operation.Operation object at 0x71ee1a4a67d0>", + "A": "<src.process.Process object at 0x70f22db20a30>", + "B": "<src.operation.Operation object at 0x70f22db20f70>", "label": "M1.out" }, { - "A": "<src.operation.Operation object at 0x71ee1a4a67d0>", - "B": "<src.process.Process object at 0x71ee1a4a6650>", + "A": "<src.operation.Operation object at 0x70f22db20f70>", + "B": "<src.process.Process object at 0x70f22db21180>", "label": "" }, { - "A": "<src.operation.Operation object at 0x71ee1a4a6950>", - "B": "<src.operation.Operation object at 0x71ee1a4a6920>", + "A": "<src.operation.Operation object at 0x70f22db20af0>", + "B": "<src.operation.Operation object at 0x70f22db21300>", "label": "a" }, { - "A": "<src.operation.Operation object at 0x71ee1a4a68c0>", - "B": "<src.operation.Operation object at 0x71ee1a4a6920>", + "A": "<src.operation.Operation object at 0x70f22db217b0>", + "B": "<src.operation.Operation object at 0x70f22db21300>", "label": "a" } ], @@ -202,7 +202,7 @@ "sub3_0": { "nodes": [ { - "id": "<src.operation.Operation object at 0x71ee1a4a6cb0>", + "id": "<src.operation.Operation object at 0x70f22db23ac0>", "name": "", "shape": "point", "xlabel": "ch = Channel.empty()", diff --git a/tests/ressources/workflows/wf18/all_executors.json b/tests/ressources/workflows/wf18/all_executors.json new file mode 100644 index 0000000000000000000000000000000000000000..4717a59dff20306ceaa1c3af1e63d00f9f11b3f5 --- /dev/null +++ b/tests/ressources/workflows/wf18/all_executors.json @@ -0,0 +1,11 @@ +{ + "<src.operation.Operation object at 0x70f22db104f0>": "a = sub1.out", + "Call_124185450980512": "sub1()", + "Call_124185450976240": "sub2()", + "<src.operation.Operation object at 0x70f22db12980>": "b = sub2.out", + "<src.operation.Operation object at 0x70f22d90d300>": "b = Channel.empty()", + "Call_124185450983152": "M1()", + "Call_124185450981376": "M2(M1.out)", + "Call_124185450987232": "M1()", + "Call_124185450980224": "M2(M1.out)" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf18/all_processes.json b/tests/ressources/workflows/wf18/all_processes.json new file mode 100644 index 0000000000000000000000000000000000000000..35f4925acec7b2c02f4adfbc299962b39d203fe9 --- /dev/null +++ b/tests/ressources/workflows/wf18/all_processes.json @@ -0,0 +1,6 @@ +{ + "<src.process.Process object at 0x70f22db12f80>": "process M1 {\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db12650>": "process M2 {\n input:\n path a\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db11f30>": "process M1 {\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db13460>": "process M2 {\n input:\n path a\n\n \"\"\"\n SOMETHING\n \"\"\"\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf18/all_subworkflows.json b/tests/ressources/workflows/wf18/all_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..dec2746d3fecbc202f74c35bd3adc043fbbe04fc --- /dev/null +++ b/tests/ressources/workflows/wf18/all_subworkflows.json @@ -0,0 +1,4 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22db13580>": "workflow sub1 {\n main:\n M1()\n M2(M1.out)\n\n emit:\n M2.out\n}", + "<src.subworkflow.Subworkflow object at 0x70f22db12d40>": "workflow sub2 {\n main:\n M1()\n M2(M1.out)\n\n emit:\n M2.out\n\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf18/executors_per_subworkflows.json b/tests/ressources/workflows/wf18/executors_per_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..b4dd3fb8e23133d5404377192b9ddbbfde33f16a --- /dev/null +++ b/tests/ressources/workflows/wf18/executors_per_subworkflows.json @@ -0,0 +1,10 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22db13580>": { + "Call_124185450983152": "M1()", + "Call_124185450981376": "M2(M1.out)" + }, + "<src.subworkflow.Subworkflow object at 0x70f22db12d40>": { + "Call_124185450987232": "M1()", + "Call_124185450980224": "M2(M1.out)" + } +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf18/specification_graph.json b/tests/ressources/workflows/wf18/specification_graph.json index 7fe9450dccde6c46ff2699a4da0f3c5323eb4a9c..94ff4940a0893c74279aadcca5b5a96992dd6553 100644 --- a/tests/ressources/workflows/wf18/specification_graph.json +++ b/tests/ressources/workflows/wf18/specification_graph.json @@ -1,21 +1,21 @@ { "nodes": [ { - "id": "<src.operation.Operation object at 0x79717dcc3a00>", + "id": "<src.operation.Operation object at 0x70f22db104f0>", "name": "", "shape": "point", "xlabel": "a = sub1.out", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x79717db0d3c0>", + "id": "<src.operation.Operation object at 0x70f22db12980>", "name": "", "shape": "point", "xlabel": "b = sub2.out", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x79717db0e2f0>", + "id": "<src.operation.Operation object at 0x70f22d90d300>", "name": "", "shape": "point", "xlabel": "b = Channel.empty()", @@ -24,13 +24,13 @@ ], "edges": [ { - "A": "<src.operation.Operation object at 0x79717db0d900>", - "B": "<src.operation.Operation object at 0x79717dcc3a00>", + "A": "<src.operation.Operation object at 0x70f22db141f0>", + "B": "<src.operation.Operation object at 0x70f22db104f0>", "label": "sub1.out" }, { - "A": "<src.operation.Operation object at 0x79717db0dc30>", - "B": "<src.operation.Operation object at 0x79717db0d3c0>", + "A": "<src.operation.Operation object at 0x70f2e278b040>", + "B": "<src.operation.Operation object at 0x70f22db12980>", "label": "sub2.out" } ], @@ -38,28 +38,28 @@ "sub1_0": { "nodes": [ { - "id": "<src.process.Process object at 0x79717db0d0c0>", + "id": "<src.process.Process object at 0x70f22db12f80>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.process.Process object at 0x79717db0d180>", + "id": "<src.process.Process object at 0x70f22db12650>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x79717db0cdc0>", + "id": "<src.operation.Operation object at 0x70f22d925a80>", "name": "", "shape": "point", "xlabel": "M1.out", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x79717db0d900>", + "id": "<src.operation.Operation object at 0x70f22db141f0>", "name": "", "shape": "point", "xlabel": "emit: M2.out", @@ -68,18 +68,18 @@ ], "edges": [ { - "A": "<src.process.Process object at 0x79717db0d0c0>", - "B": "<src.operation.Operation object at 0x79717db0cdc0>", + "A": "<src.process.Process object at 0x70f22db12f80>", + "B": "<src.operation.Operation object at 0x70f22d925a80>", "label": "M1.out" }, { - "A": "<src.operation.Operation object at 0x79717db0cdc0>", - "B": "<src.process.Process object at 0x79717db0d180>", + "A": "<src.operation.Operation object at 0x70f22d925a80>", + "B": "<src.process.Process object at 0x70f22db12650>", "label": "" }, { - "A": "<src.process.Process object at 0x79717db0d180>", - "B": "<src.operation.Operation object at 0x79717db0d900>", + "A": "<src.process.Process object at 0x70f22db12650>", + "B": "<src.operation.Operation object at 0x70f22db141f0>", "label": "M2.out" } ], @@ -88,28 +88,28 @@ "sub2_0": { "nodes": [ { - "id": "<src.process.Process object at 0x79717db0dfc0>", + "id": "<src.process.Process object at 0x70f22db11f30>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.process.Process object at 0x79717db0e110>", + "id": "<src.process.Process object at 0x70f22db13460>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x79717db0e200>", + "id": "<src.operation.Operation object at 0x70f2e278b8e0>", "name": "", "shape": "point", "xlabel": "M1.out", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x79717db0dc30>", + "id": "<src.operation.Operation object at 0x70f2e278b040>", "name": "", "shape": "point", "xlabel": "emit: M2.out", @@ -118,18 +118,18 @@ ], "edges": [ { - "A": "<src.process.Process object at 0x79717db0dfc0>", - "B": "<src.operation.Operation object at 0x79717db0e200>", + "A": "<src.process.Process object at 0x70f22db11f30>", + "B": "<src.operation.Operation object at 0x70f2e278b8e0>", "label": "M1.out" }, { - "A": "<src.operation.Operation object at 0x79717db0e200>", - "B": "<src.process.Process object at 0x79717db0e110>", + "A": "<src.operation.Operation object at 0x70f2e278b8e0>", + "B": "<src.process.Process object at 0x70f22db13460>", "label": "" }, { - "A": "<src.process.Process object at 0x79717db0e110>", - "B": "<src.operation.Operation object at 0x79717db0dc30>", + "A": "<src.process.Process object at 0x70f22db13460>", + "B": "<src.operation.Operation object at 0x70f2e278b040>", "label": "M2.out" } ], diff --git a/tests/ressources/workflows/wf2/all_executors.json b/tests/ressources/workflows/wf2/all_executors.json new file mode 100644 index 0000000000000000000000000000000000000000..746c99325d51f8cf0d051363d2583a1ca8c6ac5f --- /dev/null +++ b/tests/ressources/workflows/wf2/all_executors.json @@ -0,0 +1,8 @@ +{ + "Call_124185451102800": "sub1()", + "Call_124185450907824": "sub2()", + "Call_124185450917136": "M1()", + "Call_124185450918240": "M2(M1.out)", + "Call_124185449161264": "M1()", + "Call_124185450877456": "M2(M1.out)" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf2/all_processes.json b/tests/ressources/workflows/wf2/all_processes.json new file mode 100644 index 0000000000000000000000000000000000000000..aa89886cfc1177e4399429826dfe823ddf95f23a --- /dev/null +++ b/tests/ressources/workflows/wf2/all_processes.json @@ -0,0 +1,6 @@ +{ + "<src.process.Process object at 0x70f22db00430>": "process M1 {\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db00400>": "process M2 {\n input:\n path a\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22dafaa40>": "process M1 {\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22daf9f60>": "process M2 {\n input:\n path a\n\n \"\"\"\n SOMETHING\n \"\"\"\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf2/all_subworkflows.json b/tests/ressources/workflows/wf2/all_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..b8538588c096e1683d512fed2b6e26c3c0295791 --- /dev/null +++ b/tests/ressources/workflows/wf2/all_subworkflows.json @@ -0,0 +1,4 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22db02c80>": "workflow sub1 {\n main:\n M1()\n M2(M1.out)\n\n emit:\n M2.out\n}", + "<src.subworkflow.Subworkflow object at 0x70f22db024a0>": "workflow sub2 {\n main:\n M1()\n M2(M1.out)\n\n emit:\n M2.out\n\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf2/executors_per_subworkflows.json b/tests/ressources/workflows/wf2/executors_per_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..8053ac8cafb427bcb68a8de72ed5af0eaccfb553 --- /dev/null +++ b/tests/ressources/workflows/wf2/executors_per_subworkflows.json @@ -0,0 +1,10 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22db02c80>": { + "Call_124185450917136": "M1()", + "Call_124185450918240": "M2(M1.out)" + }, + "<src.subworkflow.Subworkflow object at 0x70f22db024a0>": { + "Call_124185449161264": "M1()", + "Call_124185450877456": "M2(M1.out)" + } +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf2/specification_graph.json b/tests/ressources/workflows/wf2/specification_graph.json index dac46c982ea5c6f39f1f7675cc772479f631edeb..3ccb1bf8e34ea8765fb9f98df38130aeff772cb6 100644 --- a/tests/ressources/workflows/wf2/specification_graph.json +++ b/tests/ressources/workflows/wf2/specification_graph.json @@ -5,28 +5,28 @@ "sub1_0": { "nodes": [ { - "id": "<src.process.Process object at 0x71ee1a284100>", + "id": "<src.process.Process object at 0x70f22db00430>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.process.Process object at 0x71ee1a285c30>", + "id": "<src.process.Process object at 0x70f22db00400>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a2b3f10>", + "id": "<src.operation.Operation object at 0x70f22db00a30>", "name": "", "shape": "point", "xlabel": "M1.out", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x71ee1a229480>", + "id": "<src.operation.Operation object at 0x70f22da2b1f0>", "name": "", "shape": "point", "xlabel": "emit: M2.out", @@ -35,18 +35,18 @@ ], "edges": [ { - "A": "<src.process.Process object at 0x71ee1a284100>", - "B": "<src.operation.Operation object at 0x71ee1a2b3f10>", + "A": "<src.process.Process object at 0x70f22db00430>", + "B": "<src.operation.Operation object at 0x70f22db00a30>", "label": "M1.out" }, { - "A": "<src.operation.Operation object at 0x71ee1a2b3f10>", - "B": "<src.process.Process object at 0x71ee1a285c30>", + "A": "<src.operation.Operation object at 0x70f22db00a30>", + "B": "<src.process.Process object at 0x70f22db00400>", "label": "" }, { - "A": "<src.process.Process object at 0x71ee1a285c30>", - "B": "<src.operation.Operation object at 0x71ee1a229480>", + "A": "<src.process.Process object at 0x70f22db00400>", + "B": "<src.operation.Operation object at 0x70f22da2b1f0>", "label": "M2.out" } ], @@ -55,28 +55,28 @@ "sub2_0": { "nodes": [ { - "id": "<src.process.Process object at 0x71ee1a4887c0>", + "id": "<src.process.Process object at 0x70f22dafaa40>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.process.Process object at 0x71ee1a48ada0>", + "id": "<src.process.Process object at 0x70f22daf9f60>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a48a5f0>", + "id": "<src.operation.Operation object at 0x70f22dafb550>", "name": "", "shape": "point", "xlabel": "M1.out", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x71ee1a48ad40>", + "id": "<src.operation.Operation object at 0x70f22db02680>", "name": "", "shape": "point", "xlabel": "emit: M2.out", @@ -85,18 +85,18 @@ ], "edges": [ { - "A": "<src.process.Process object at 0x71ee1a4887c0>", - "B": "<src.operation.Operation object at 0x71ee1a48a5f0>", + "A": "<src.process.Process object at 0x70f22dafaa40>", + "B": "<src.operation.Operation object at 0x70f22dafb550>", "label": "M1.out" }, { - "A": "<src.operation.Operation object at 0x71ee1a48a5f0>", - "B": "<src.process.Process object at 0x71ee1a48ada0>", + "A": "<src.operation.Operation object at 0x70f22dafb550>", + "B": "<src.process.Process object at 0x70f22daf9f60>", "label": "" }, { - "A": "<src.process.Process object at 0x71ee1a48ada0>", - "B": "<src.operation.Operation object at 0x71ee1a48ad40>", + "A": "<src.process.Process object at 0x70f22daf9f60>", + "B": "<src.operation.Operation object at 0x70f22db02680>", "label": "M2.out" } ], diff --git a/tests/ressources/workflows/wf3/all_executors.json b/tests/ressources/workflows/wf3/all_executors.json new file mode 100644 index 0000000000000000000000000000000000000000..07bd31d7679a08b149ede93445d1a3f4b3c058f7 --- /dev/null +++ b/tests/ressources/workflows/wf3/all_executors.json @@ -0,0 +1,9 @@ +{ + "<src.operation.Operation object at 0x70f22e613c40>": "c = a", + "<src.operation.Operation object at 0x70f22da2a9e0>": "a = sub1()", + "<src.operation.Operation object at 0x70f22db12f80>": "a = sub2()", + "Call_124185450982720": "M1()", + "Call_124185450982672": "M2(M1.out)", + "Call_124185450981376": "M1()", + "Call_124185450981232": "M2(M1.out)" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf3/all_processes.json b/tests/ressources/workflows/wf3/all_processes.json new file mode 100644 index 0000000000000000000000000000000000000000..80ffb7b61072c028fff98ba376557130f5dbd3ab --- /dev/null +++ b/tests/ressources/workflows/wf3/all_processes.json @@ -0,0 +1,6 @@ +{ + "<src.process.Process object at 0x70f22db12cb0>": "process M1 {\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db12da0>": "process M2 {\n input:\n path a\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db12740>": "process M1 {\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db125f0>": "process M2 {\n input:\n path a\n\n \"\"\"\n SOMETHING\n \"\"\"\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf3/all_subworkflows.json b/tests/ressources/workflows/wf3/all_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..8654c9ef4648cd64cabdcdc1977a30d7dc37b40e --- /dev/null +++ b/tests/ressources/workflows/wf3/all_subworkflows.json @@ -0,0 +1,4 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22db12260>": "workflow sub1 {\n main:\n M1()\n M2(M1.out)\n\n emit:\n M2.out\n}", + "<src.subworkflow.Subworkflow object at 0x70f22db12380>": "workflow sub2 {\n main:\n M1()\n M2(M1.out)\n\n emit:\n M2.out\n\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf3/executors_per_subworkflows.json b/tests/ressources/workflows/wf3/executors_per_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..45a27464946c661e038ad0af7bec56fffb4ce259 --- /dev/null +++ b/tests/ressources/workflows/wf3/executors_per_subworkflows.json @@ -0,0 +1,10 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22db12260>": { + "Call_124185450982720": "M1()", + "Call_124185450982672": "M2(M1.out)" + }, + "<src.subworkflow.Subworkflow object at 0x70f22db12380>": { + "Call_124185450981376": "M1()", + "Call_124185450981232": "M2(M1.out)" + } +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf3/specification_graph.json b/tests/ressources/workflows/wf3/specification_graph.json index e5f689e9be48980e7bb97496ec4afb1821d5956e..799e222726082740a291150bd03756a38726cbbc 100644 --- a/tests/ressources/workflows/wf3/specification_graph.json +++ b/tests/ressources/workflows/wf3/specification_graph.json @@ -1,21 +1,21 @@ { "nodes": [ { - "id": "<src.operation.Operation object at 0x71ee1a4971c0>", + "id": "<src.operation.Operation object at 0x70f22da2a9e0>", "name": "", "shape": "point", "xlabel": "a = sub1()", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x71ee1a48ada0>", + "id": "<src.operation.Operation object at 0x70f22db12f80>", "name": "", "shape": "point", "xlabel": "a = sub2()", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x71ee1a496da0>", + "id": "<src.operation.Operation object at 0x70f22e613c40>", "name": "", "shape": "point", "xlabel": "c = a", @@ -24,23 +24,23 @@ ], "edges": [ { - "A": "<src.operation.Operation object at 0x71ee1a340fa0>", - "B": "<src.operation.Operation object at 0x71ee1a4971c0>", + "A": "<src.operation.Operation object at 0x70f22d90e470>", + "B": "<src.operation.Operation object at 0x70f22da2a9e0>", "label": "emit: M2.out" }, { - "A": "<src.operation.Operation object at 0x71ee1a32d7e0>", - "B": "<src.operation.Operation object at 0x71ee1a48ada0>", + "A": "<src.operation.Operation object at 0x70f22db123b0>", + "B": "<src.operation.Operation object at 0x70f22db12f80>", "label": "emit: M2.out" }, { - "A": "<src.operation.Operation object at 0x71ee1a4971c0>", - "B": "<src.operation.Operation object at 0x71ee1a496da0>", + "A": "<src.operation.Operation object at 0x70f22da2a9e0>", + "B": "<src.operation.Operation object at 0x70f22e613c40>", "label": "a" }, { - "A": "<src.operation.Operation object at 0x71ee1a48ada0>", - "B": "<src.operation.Operation object at 0x71ee1a496da0>", + "A": "<src.operation.Operation object at 0x70f22db12f80>", + "B": "<src.operation.Operation object at 0x70f22e613c40>", "label": "a" } ], @@ -48,28 +48,28 @@ "sub1_0": { "nodes": [ { - "id": "<src.process.Process object at 0x71ee1a496c20>", + "id": "<src.process.Process object at 0x70f22db12cb0>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.process.Process object at 0x71ee1a496830>", + "id": "<src.process.Process object at 0x70f22db12da0>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a4967d0>", + "id": "<src.operation.Operation object at 0x70f22db12e00>", "name": "", "shape": "point", "xlabel": "M1.out", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x71ee1a340fa0>", + "id": "<src.operation.Operation object at 0x70f22d90e470>", "name": "", "shape": "point", "xlabel": "emit: M2.out", @@ -78,18 +78,18 @@ ], "edges": [ { - "A": "<src.process.Process object at 0x71ee1a496c20>", - "B": "<src.operation.Operation object at 0x71ee1a4967d0>", + "A": "<src.process.Process object at 0x70f22db12cb0>", + "B": "<src.operation.Operation object at 0x70f22db12e00>", "label": "M1.out" }, { - "A": "<src.operation.Operation object at 0x71ee1a4967d0>", - "B": "<src.process.Process object at 0x71ee1a496830>", + "A": "<src.operation.Operation object at 0x70f22db12e00>", + "B": "<src.process.Process object at 0x70f22db12da0>", "label": "" }, { - "A": "<src.process.Process object at 0x71ee1a496830>", - "B": "<src.operation.Operation object at 0x71ee1a340fa0>", + "A": "<src.process.Process object at 0x70f22db12da0>", + "B": "<src.operation.Operation object at 0x70f22d90e470>", "label": "M2.out" } ], @@ -98,28 +98,28 @@ "sub2_0": { "nodes": [ { - "id": "<src.process.Process object at 0x71ee1a488a60>", + "id": "<src.process.Process object at 0x70f22db12740>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.process.Process object at 0x71ee1a240760>", + "id": "<src.process.Process object at 0x70f22db125f0>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a32da50>", + "id": "<src.operation.Operation object at 0x70f22db12530>", "name": "", "shape": "point", "xlabel": "M1.out", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x71ee1a32d7e0>", + "id": "<src.operation.Operation object at 0x70f22db123b0>", "name": "", "shape": "point", "xlabel": "emit: M2.out", @@ -128,18 +128,18 @@ ], "edges": [ { - "A": "<src.process.Process object at 0x71ee1a488a60>", - "B": "<src.operation.Operation object at 0x71ee1a32da50>", + "A": "<src.process.Process object at 0x70f22db12740>", + "B": "<src.operation.Operation object at 0x70f22db12530>", "label": "M1.out" }, { - "A": "<src.operation.Operation object at 0x71ee1a32da50>", - "B": "<src.process.Process object at 0x71ee1a240760>", + "A": "<src.operation.Operation object at 0x70f22db12530>", + "B": "<src.process.Process object at 0x70f22db125f0>", "label": "" }, { - "A": "<src.process.Process object at 0x71ee1a240760>", - "B": "<src.operation.Operation object at 0x71ee1a32d7e0>", + "A": "<src.process.Process object at 0x70f22db125f0>", + "B": "<src.operation.Operation object at 0x70f22db123b0>", "label": "M2.out" } ], diff --git a/tests/ressources/workflows/wf4/all_executors.json b/tests/ressources/workflows/wf4/all_executors.json new file mode 100644 index 0000000000000000000000000000000000000000..4d0c3686abeb04c0426880425b517fa86e4260bf --- /dev/null +++ b/tests/ressources/workflows/wf4/all_executors.json @@ -0,0 +1,5 @@ +{ + "Call_124185450972880": "sub1(Channel.empty())", + "Call_124185450986560": "M1(a)", + "Call_124185450981760": "M2(M1.out)" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf4/all_processes.json b/tests/ressources/workflows/wf4/all_processes.json new file mode 100644 index 0000000000000000000000000000000000000000..1385e6bc02728ebd3d0ce7e47a7cca6376dea412 --- /dev/null +++ b/tests/ressources/workflows/wf4/all_processes.json @@ -0,0 +1,4 @@ +{ + "<src.process.Process object at 0x70f22db121a0>": "process M1 {\n input:\n path a\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db12590>": "process M2 {\n input:\n path a\n\n \"\"\"\n SOMETHING\n \"\"\"\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf4/all_subworkflows.json b/tests/ressources/workflows/wf4/all_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..53eed4112cfe534ef2ef7195ff4a16a8b5b13c8a --- /dev/null +++ b/tests/ressources/workflows/wf4/all_subworkflows.json @@ -0,0 +1,3 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22db13940>": "workflow sub1 {\n take:\n a\n\n main:\n M1(a)\n M2(M1.out)\n\n emit:\n M2.out\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf4/executors_per_subworkflows.json b/tests/ressources/workflows/wf4/executors_per_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..9513f23043319c0c9d16bc50c507e9fb1e3ad27e --- /dev/null +++ b/tests/ressources/workflows/wf4/executors_per_subworkflows.json @@ -0,0 +1,6 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22db13940>": { + "Call_124185450986560": "M1(a)", + "Call_124185450981760": "M2(M1.out)" + } +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf4/specification_graph.json b/tests/ressources/workflows/wf4/specification_graph.json index fa988c3f7b86b572c1956ee3235062cad4949467..070eca9948f697c2524808b62426ce6890c6af85 100644 --- a/tests/ressources/workflows/wf4/specification_graph.json +++ b/tests/ressources/workflows/wf4/specification_graph.json @@ -1,7 +1,7 @@ { "nodes": [ { - "id": "<src.operation.Operation object at 0x71ee1a496170>", + "id": "<src.operation.Operation object at 0x70f22db13a30>", "name": "", "shape": "point", "xlabel": "Channel.empty()", @@ -10,8 +10,8 @@ ], "edges": [ { - "A": "<src.operation.Operation object at 0x71ee1a496170>", - "B": "<src.operation.Operation object at 0x71ee1a4975e0>", + "A": "<src.operation.Operation object at 0x70f22db13a30>", + "B": "<src.operation.Operation object at 0x70f22db125c0>", "label": "" } ], @@ -19,42 +19,42 @@ "sub1_0": { "nodes": [ { - "id": "<src.process.Process object at 0x71ee1a4973a0>", + "id": "<src.process.Process object at 0x70f22db121a0>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a4968c0>", + "id": "<src.operation.Operation object at 0x70f22db12a10>", "name": "", "shape": "point", "xlabel": "a", "fillcolor": "" }, { - "id": "<src.process.Process object at 0x71ee1a496f50>", + "id": "<src.process.Process object at 0x70f22db12590>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a496380>", + "id": "<src.operation.Operation object at 0x70f22db12920>", "name": "", "shape": "point", "xlabel": "M1.out", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x71ee1a4975e0>", + "id": "<src.operation.Operation object at 0x70f22db125c0>", "name": "", "shape": "point", "xlabel": "take: a", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a287b20>", + "id": "<src.operation.Operation object at 0x70f22db13f10>", "name": "", "shape": "point", "xlabel": "emit: M2.out", @@ -63,28 +63,28 @@ ], "edges": [ { - "A": "<src.operation.Operation object at 0x71ee1a4975e0>", - "B": "<src.operation.Operation object at 0x71ee1a4968c0>", + "A": "<src.operation.Operation object at 0x70f22db125c0>", + "B": "<src.operation.Operation object at 0x70f22db12a10>", "label": "a" }, { - "A": "<src.operation.Operation object at 0x71ee1a4968c0>", - "B": "<src.process.Process object at 0x71ee1a4973a0>", + "A": "<src.operation.Operation object at 0x70f22db12a10>", + "B": "<src.process.Process object at 0x70f22db121a0>", "label": "" }, { - "A": "<src.process.Process object at 0x71ee1a4973a0>", - "B": "<src.operation.Operation object at 0x71ee1a496380>", + "A": "<src.process.Process object at 0x70f22db121a0>", + "B": "<src.operation.Operation object at 0x70f22db12920>", "label": "M1.out" }, { - "A": "<src.operation.Operation object at 0x71ee1a496380>", - "B": "<src.process.Process object at 0x71ee1a496f50>", + "A": "<src.operation.Operation object at 0x70f22db12920>", + "B": "<src.process.Process object at 0x70f22db12590>", "label": "" }, { - "A": "<src.process.Process object at 0x71ee1a496f50>", - "B": "<src.operation.Operation object at 0x71ee1a287b20>", + "A": "<src.process.Process object at 0x70f22db12590>", + "B": "<src.operation.Operation object at 0x70f22db13f10>", "label": "M2.out" } ], diff --git a/tests/ressources/workflows/wf5/all_executors.json b/tests/ressources/workflows/wf5/all_executors.json new file mode 100644 index 0000000000000000000000000000000000000000..a6b1236d71db412cfbd8da1322b3707d2c0bcebe --- /dev/null +++ b/tests/ressources/workflows/wf5/all_executors.json @@ -0,0 +1,5 @@ +{ + "<src.operation.Operation object at 0x70f22db13e20>": "c = sub1(Channel.empty())", + "Call_124185450981088": "M1(a)", + "Call_124185450973360": "M2(M1.out)" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf5/all_processes.json b/tests/ressources/workflows/wf5/all_processes.json new file mode 100644 index 0000000000000000000000000000000000000000..bcac77b5426feda8535a7745d6e38106a5ce3766 --- /dev/null +++ b/tests/ressources/workflows/wf5/all_processes.json @@ -0,0 +1,4 @@ +{ + "<src.process.Process object at 0x70f22db142e0>": "process M1 {\n input:\n path a\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db14610>": "process M2 {\n input:\n path a\n\n \"\"\"\n SOMETHING\n \"\"\"\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf5/all_subworkflows.json b/tests/ressources/workflows/wf5/all_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..1f24d0bd9e536675148be2bfb5e0eeca5893799b --- /dev/null +++ b/tests/ressources/workflows/wf5/all_subworkflows.json @@ -0,0 +1,3 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22db13820>": "workflow sub1 {\n take:\n a\n\n main:\n M1(a)\n M2(M1.out)\n\n emit:\n M2.out\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf5/executors_per_subworkflows.json b/tests/ressources/workflows/wf5/executors_per_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..2631f107849eb210ee70ca796ff505908f955995 --- /dev/null +++ b/tests/ressources/workflows/wf5/executors_per_subworkflows.json @@ -0,0 +1,6 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22db13820>": { + "Call_124185450981088": "M1(a)", + "Call_124185450973360": "M2(M1.out)" + } +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf5/specification_graph.json b/tests/ressources/workflows/wf5/specification_graph.json index 259eca243f6974bbfcc79453ee3a08157b9cd8aa..cd05741c7afc11d2dbe59d3cca7098f2553090e7 100644 --- a/tests/ressources/workflows/wf5/specification_graph.json +++ b/tests/ressources/workflows/wf5/specification_graph.json @@ -1,14 +1,14 @@ { "nodes": [ { - "id": "<src.operation.Operation object at 0x71ee1a4a4df0>", + "id": "<src.operation.Operation object at 0x70f22db13e20>", "name": "", "shape": "point", "xlabel": "c = sub1(Channel.empty())", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x71ee1a498b20>", + "id": "<src.operation.Operation object at 0x70f22db154e0>", "name": "", "shape": "point", "xlabel": "Channel.empty()", @@ -17,13 +17,13 @@ ], "edges": [ { - "A": "<src.operation.Operation object at 0x71ee1a498b20>", - "B": "<src.operation.Operation object at 0x71ee1a4a4b20>", + "A": "<src.operation.Operation object at 0x70f22db154e0>", + "B": "<src.operation.Operation object at 0x70f22db11cf0>", "label": "" }, { - "A": "<src.operation.Operation object at 0x71ee1a4982e0>", - "B": "<src.operation.Operation object at 0x71ee1a4a4df0>", + "A": "<src.operation.Operation object at 0x70f22db13b20>", + "B": "<src.operation.Operation object at 0x70f22db13e20>", "label": "emit: M2.out" } ], @@ -31,42 +31,42 @@ "sub1_0": { "nodes": [ { - "id": "<src.process.Process object at 0x71ee1a4a47f0>", + "id": "<src.process.Process object at 0x70f22db142e0>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a498730>", + "id": "<src.operation.Operation object at 0x70f22db144f0>", "name": "", "shape": "point", "xlabel": "a", "fillcolor": "" }, { - "id": "<src.process.Process object at 0x71ee1a498040>", + "id": "<src.process.Process object at 0x70f22db14610>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a498250>", + "id": "<src.operation.Operation object at 0x70f22db14190>", "name": "", "shape": "point", "xlabel": "M1.out", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x71ee1a4a4b20>", + "id": "<src.operation.Operation object at 0x70f22db11cf0>", "name": "", "shape": "point", "xlabel": "take: a", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a4982e0>", + "id": "<src.operation.Operation object at 0x70f22db13b20>", "name": "", "shape": "point", "xlabel": "emit: M2.out", @@ -75,28 +75,28 @@ ], "edges": [ { - "A": "<src.operation.Operation object at 0x71ee1a4a4b20>", - "B": "<src.operation.Operation object at 0x71ee1a498730>", + "A": "<src.operation.Operation object at 0x70f22db11cf0>", + "B": "<src.operation.Operation object at 0x70f22db144f0>", "label": "a" }, { - "A": "<src.operation.Operation object at 0x71ee1a498730>", - "B": "<src.process.Process object at 0x71ee1a4a47f0>", + "A": "<src.operation.Operation object at 0x70f22db144f0>", + "B": "<src.process.Process object at 0x70f22db142e0>", "label": "" }, { - "A": "<src.process.Process object at 0x71ee1a4a47f0>", - "B": "<src.operation.Operation object at 0x71ee1a498250>", + "A": "<src.process.Process object at 0x70f22db142e0>", + "B": "<src.operation.Operation object at 0x70f22db14190>", "label": "M1.out" }, { - "A": "<src.operation.Operation object at 0x71ee1a498250>", - "B": "<src.process.Process object at 0x71ee1a498040>", + "A": "<src.operation.Operation object at 0x70f22db14190>", + "B": "<src.process.Process object at 0x70f22db14610>", "label": "" }, { - "A": "<src.process.Process object at 0x71ee1a498040>", - "B": "<src.operation.Operation object at 0x71ee1a4982e0>", + "A": "<src.process.Process object at 0x70f22db14610>", + "B": "<src.operation.Operation object at 0x70f22db13b20>", "label": "M2.out" } ], diff --git a/tests/ressources/workflows/wf6/all_executors.json b/tests/ressources/workflows/wf6/all_executors.json new file mode 100644 index 0000000000000000000000000000000000000000..6ef2abce95f28409157a290566e1e16a7da9f1c8 --- /dev/null +++ b/tests/ressources/workflows/wf6/all_executors.json @@ -0,0 +1,7 @@ +{ + "<src.operation.Operation object at 0x70f22db13160>": "c = sub1(a)", + "<src.operation.Operation object at 0x70f22db12aa0>": "a = 1", + "<src.operation.Operation object at 0x70f22db138e0>": "a = Channel.empty()", + "Call_124185450987232": "M1(a)", + "Call_124185450972640": "M2(M1.out)" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf6/all_processes.json b/tests/ressources/workflows/wf6/all_processes.json new file mode 100644 index 0000000000000000000000000000000000000000..76236a2a06220b4a1a33b70a26a1f821e88cb008 --- /dev/null +++ b/tests/ressources/workflows/wf6/all_processes.json @@ -0,0 +1,4 @@ +{ + "<src.process.Process object at 0x70f22db13400>": "process M1 {\n input:\n path a\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db12650>": "process M2 {\n input:\n path a\n\n \"\"\"\n SOMETHING\n \"\"\"\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf6/all_subworkflows.json b/tests/ressources/workflows/wf6/all_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..1daf2ef5c027ec0313b005e28be046b50c08b4d3 --- /dev/null +++ b/tests/ressources/workflows/wf6/all_subworkflows.json @@ -0,0 +1,3 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22db12740>": "workflow sub1 {\n take:\n a\n\n main:\n M1(a)\n M2(M1.out)\n\n emit:\n M2.out\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf6/executors_per_subworkflows.json b/tests/ressources/workflows/wf6/executors_per_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..308091fac4e2a3ce999a52c1d2ea6672271f88d3 --- /dev/null +++ b/tests/ressources/workflows/wf6/executors_per_subworkflows.json @@ -0,0 +1,6 @@ +{ + "<src.subworkflow.Subworkflow object at 0x70f22db12740>": { + "Call_124185450987232": "M1(a)", + "Call_124185450972640": "M2(M1.out)" + } +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf6/specification_graph.json b/tests/ressources/workflows/wf6/specification_graph.json index 42a0511d6c2760307c8b6e7c33fb8cbf7107b8c2..c533035822ed79dd22911ff5773c0c78a6a44ba9 100644 --- a/tests/ressources/workflows/wf6/specification_graph.json +++ b/tests/ressources/workflows/wf6/specification_graph.json @@ -1,28 +1,28 @@ { "nodes": [ { - "id": "<src.operation.Operation object at 0x71ee1a497bb0>", + "id": "<src.operation.Operation object at 0x70f22db12aa0>", "name": "", "shape": "point", "xlabel": "a = 1", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x71ee1a497010>", + "id": "<src.operation.Operation object at 0x70f22db138e0>", "name": "", "shape": "point", "xlabel": "a = Channel.empty()", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a496200>", + "id": "<src.operation.Operation object at 0x70f22db13160>", "name": "", "shape": "point", "xlabel": "c = sub1(a)", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x71ee1a496da0>", + "id": "<src.operation.Operation object at 0x70f22db12470>", "name": "", "shape": "point", "xlabel": "a", @@ -31,23 +31,23 @@ ], "edges": [ { - "A": "<src.operation.Operation object at 0x71ee1a497bb0>", - "B": "<src.operation.Operation object at 0x71ee1a496da0>", + "A": "<src.operation.Operation object at 0x70f22db12aa0>", + "B": "<src.operation.Operation object at 0x70f22db12470>", "label": "a" }, { - "A": "<src.operation.Operation object at 0x71ee1a497010>", - "B": "<src.operation.Operation object at 0x71ee1a496da0>", + "A": "<src.operation.Operation object at 0x70f22db138e0>", + "B": "<src.operation.Operation object at 0x70f22db12470>", "label": "a" }, { - "A": "<src.operation.Operation object at 0x71ee1a496da0>", - "B": "<src.operation.Operation object at 0x71ee1a496350>", + "A": "<src.operation.Operation object at 0x70f22db12470>", + "B": "<src.operation.Operation object at 0x70f22db11210>", "label": "" }, { - "A": "<src.operation.Operation object at 0x71ee1a496950>", - "B": "<src.operation.Operation object at 0x71ee1a496200>", + "A": "<src.operation.Operation object at 0x70f22db13b50>", + "B": "<src.operation.Operation object at 0x70f22db13160>", "label": "emit: M2.out" } ], @@ -55,42 +55,42 @@ "sub1_0": { "nodes": [ { - "id": "<src.process.Process object at 0x71ee1a496a70>", + "id": "<src.process.Process object at 0x70f22db13400>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a496b00>", + "id": "<src.operation.Operation object at 0x70f22db13d90>", "name": "", "shape": "point", "xlabel": "a", "fillcolor": "" }, { - "id": "<src.process.Process object at 0x71ee1a496b30>", + "id": "<src.process.Process object at 0x70f22db12650>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a4970a0>", + "id": "<src.operation.Operation object at 0x70f22db13520>", "name": "", "shape": "point", "xlabel": "M1.out", "fillcolor": "white" }, { - "id": "<src.operation.Operation object at 0x71ee1a496350>", + "id": "<src.operation.Operation object at 0x70f22db11210>", "name": "", "shape": "point", "xlabel": "take: a", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a496950>", + "id": "<src.operation.Operation object at 0x70f22db13b50>", "name": "", "shape": "point", "xlabel": "emit: M2.out", @@ -99,28 +99,28 @@ ], "edges": [ { - "A": "<src.operation.Operation object at 0x71ee1a496350>", - "B": "<src.operation.Operation object at 0x71ee1a496b00>", + "A": "<src.operation.Operation object at 0x70f22db11210>", + "B": "<src.operation.Operation object at 0x70f22db13d90>", "label": "a" }, { - "A": "<src.operation.Operation object at 0x71ee1a496b00>", - "B": "<src.process.Process object at 0x71ee1a496a70>", + "A": "<src.operation.Operation object at 0x70f22db13d90>", + "B": "<src.process.Process object at 0x70f22db13400>", "label": "" }, { - "A": "<src.process.Process object at 0x71ee1a496a70>", - "B": "<src.operation.Operation object at 0x71ee1a4970a0>", + "A": "<src.process.Process object at 0x70f22db13400>", + "B": "<src.operation.Operation object at 0x70f22db13520>", "label": "M1.out" }, { - "A": "<src.operation.Operation object at 0x71ee1a4970a0>", - "B": "<src.process.Process object at 0x71ee1a496b30>", + "A": "<src.operation.Operation object at 0x70f22db13520>", + "B": "<src.process.Process object at 0x70f22db12650>", "label": "" }, { - "A": "<src.process.Process object at 0x71ee1a496b30>", - "B": "<src.operation.Operation object at 0x71ee1a496950>", + "A": "<src.process.Process object at 0x70f22db12650>", + "B": "<src.operation.Operation object at 0x70f22db13b50>", "label": "M2.out" } ], diff --git a/tests/ressources/workflows/wf7/all_executors.json b/tests/ressources/workflows/wf7/all_executors.json new file mode 100644 index 0000000000000000000000000000000000000000..b5d58045332e619fcc144a8a39cae987c0631583 --- /dev/null +++ b/tests/ressources/workflows/wf7/all_executors.json @@ -0,0 +1,4 @@ +{ + "Call_124185450030048": "M1(Channel.empty())", + "Call_124185450119376": "M2(M1.out)" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf7/all_processes.json b/tests/ressources/workflows/wf7/all_processes.json new file mode 100644 index 0000000000000000000000000000000000000000..22f48e2d5dbc044c83a86b20658b8dda00efbe6e --- /dev/null +++ b/tests/ressources/workflows/wf7/all_processes.json @@ -0,0 +1,4 @@ +{ + "<src.process.Process object at 0x70f22e6106d0>": "process M1 {\n input:\n path a\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22dac8eb0>": "process M2 {\n input:\n path a\n\n \"\"\"\n SOMETHING\n \"\"\"\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf7/all_subworkflows.json b/tests/ressources/workflows/wf7/all_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..9e26dfeeb6e641a33dae4961196235bdb965b21b --- /dev/null +++ b/tests/ressources/workflows/wf7/all_subworkflows.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ressources/workflows/wf7/executors_per_subworkflows.json b/tests/ressources/workflows/wf7/executors_per_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..9e26dfeeb6e641a33dae4961196235bdb965b21b --- /dev/null +++ b/tests/ressources/workflows/wf7/executors_per_subworkflows.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ressources/workflows/wf7/specification_graph.json b/tests/ressources/workflows/wf7/specification_graph.json index 216264373f0df3533f9f99c26f0c0b1ae521c613..8824d27bb01ebe38cccddffc93ed6a7b3e8923a7 100644 --- a/tests/ressources/workflows/wf7/specification_graph.json +++ b/tests/ressources/workflows/wf7/specification_graph.json @@ -1,28 +1,28 @@ { "nodes": [ { - "id": "<src.process.Process object at 0x71ee1a496170>", + "id": "<src.process.Process object at 0x70f22dac8eb0>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a496470>", + "id": "<src.operation.Operation object at 0x70f22dac9060>", "name": "", "shape": "point", "xlabel": "M1.out", "fillcolor": "white" }, { - "id": "<src.process.Process object at 0x71ee1a494880>", + "id": "<src.process.Process object at 0x70f22e6106d0>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a495bd0>", + "id": "<src.operation.Operation object at 0x70f22e610310>", "name": "", "shape": "point", "xlabel": "Channel.empty()", @@ -31,18 +31,18 @@ ], "edges": [ { - "A": "<src.process.Process object at 0x71ee1a494880>", - "B": "<src.operation.Operation object at 0x71ee1a496470>", + "A": "<src.process.Process object at 0x70f22e6106d0>", + "B": "<src.operation.Operation object at 0x70f22dac9060>", "label": "M1.out" }, { - "A": "<src.operation.Operation object at 0x71ee1a496470>", - "B": "<src.process.Process object at 0x71ee1a496170>", + "A": "<src.operation.Operation object at 0x70f22dac9060>", + "B": "<src.process.Process object at 0x70f22dac8eb0>", "label": "" }, { - "A": "<src.operation.Operation object at 0x71ee1a495bd0>", - "B": "<src.process.Process object at 0x71ee1a494880>", + "A": "<src.operation.Operation object at 0x70f22e610310>", + "B": "<src.process.Process object at 0x70f22e6106d0>", "label": "" } ], diff --git a/tests/ressources/workflows/wf8/all_executors.json b/tests/ressources/workflows/wf8/all_executors.json new file mode 100644 index 0000000000000000000000000000000000000000..a3f231b94784518815c60c35fa97dd6f6291ebd5 --- /dev/null +++ b/tests/ressources/workflows/wf8/all_executors.json @@ -0,0 +1,4 @@ +{ + "Call_124185450937408": "M2(M1())", + "Call_124185450936736": "M3(M1.out)" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf8/all_processes.json b/tests/ressources/workflows/wf8/all_processes.json new file mode 100644 index 0000000000000000000000000000000000000000..d917e4d2a0b08cc07eb53cced699e186b5285755 --- /dev/null +++ b/tests/ressources/workflows/wf8/all_processes.json @@ -0,0 +1,5 @@ +{ + "<src.process.Process object at 0x70f22db07a90>": "process M2 {\n input:\n path a\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db121d0>": "process M1 {\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}", + "<src.process.Process object at 0x70f22db07ee0>": "process M3 {\n input:\n path a\n\n \"\"\"\n SOMETHING\n \"\"\"\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf8/all_subworkflows.json b/tests/ressources/workflows/wf8/all_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..9e26dfeeb6e641a33dae4961196235bdb965b21b --- /dev/null +++ b/tests/ressources/workflows/wf8/all_subworkflows.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ressources/workflows/wf8/executors_per_subworkflows.json b/tests/ressources/workflows/wf8/executors_per_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..9e26dfeeb6e641a33dae4961196235bdb965b21b --- /dev/null +++ b/tests/ressources/workflows/wf8/executors_per_subworkflows.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ressources/workflows/wf8/specification_graph.json b/tests/ressources/workflows/wf8/specification_graph.json index 46978b07d59b56bf2bd95a7e048eb5476eda1f7c..2f44f4335bfd38f495ac5274a14aa5d465b13e5f 100644 --- a/tests/ressources/workflows/wf8/specification_graph.json +++ b/tests/ressources/workflows/wf8/specification_graph.json @@ -1,35 +1,35 @@ { "nodes": [ { - "id": "<src.process.Process object at 0x71ee1a496050>", + "id": "<src.process.Process object at 0x70f22db07a90>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a496410>", + "id": "<src.operation.Operation object at 0x70f22d955ba0>", "name": "", "shape": "point", "xlabel": "M1()", "fillcolor": "white" }, { - "id": "<src.process.Process object at 0x71ee1a2400a0>", + "id": "<src.process.Process object at 0x70f22db121d0>", "name": "M1", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.process.Process object at 0x71ee1a495780>", + "id": "<src.process.Process object at 0x70f22db07ee0>", "name": "M3", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a243580>", + "id": "<src.operation.Operation object at 0x70f22db12140>", "name": "", "shape": "point", "xlabel": "M1.out", @@ -38,23 +38,23 @@ ], "edges": [ { - "A": "<src.process.Process object at 0x71ee1a2400a0>", - "B": "<src.operation.Operation object at 0x71ee1a496410>", + "A": "<src.process.Process object at 0x70f22db121d0>", + "B": "<src.operation.Operation object at 0x70f22d955ba0>", "label": "" }, { - "A": "<src.operation.Operation object at 0x71ee1a496410>", - "B": "<src.process.Process object at 0x71ee1a496050>", + "A": "<src.operation.Operation object at 0x70f22d955ba0>", + "B": "<src.process.Process object at 0x70f22db07a90>", "label": "" }, { - "A": "<src.process.Process object at 0x71ee1a2400a0>", - "B": "<src.operation.Operation object at 0x71ee1a243580>", + "A": "<src.process.Process object at 0x70f22db121d0>", + "B": "<src.operation.Operation object at 0x70f22db12140>", "label": "M1.out" }, { - "A": "<src.operation.Operation object at 0x71ee1a243580>", - "B": "<src.process.Process object at 0x71ee1a495780>", + "A": "<src.operation.Operation object at 0x70f22db12140>", + "B": "<src.process.Process object at 0x70f22db07ee0>", "label": "" } ], diff --git a/tests/ressources/workflows/wf9/all_executors.json b/tests/ressources/workflows/wf9/all_executors.json new file mode 100644 index 0000000000000000000000000000000000000000..47ff6975fe23a048480fd3a870402266201734b3 --- /dev/null +++ b/tests/ressources/workflows/wf9/all_executors.json @@ -0,0 +1,5 @@ +{ + "Call_124185450797840": "M2(ch2)", + "<src.operation.Operation object at 0x70f22e6ab580>": "ch2 = Channel.empty()", + "<src.operation.Operation object at 0x70f22e6abd00>": "ch2 = Channel.empty()" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf9/all_processes.json b/tests/ressources/workflows/wf9/all_processes.json new file mode 100644 index 0000000000000000000000000000000000000000..71e52a262efb776c3ed2e87a9c99511872f8eda5 --- /dev/null +++ b/tests/ressources/workflows/wf9/all_processes.json @@ -0,0 +1,3 @@ +{ + "<src.process.Process object at 0x70f22e6aa170>": "process M2 {\n input:\n path a\n\n output:\n path 'chunk_*'\n\n \"\"\"\n SOMETHING\n \"\"\"\n}" +} \ No newline at end of file diff --git a/tests/ressources/workflows/wf9/all_subworkflows.json b/tests/ressources/workflows/wf9/all_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..9e26dfeeb6e641a33dae4961196235bdb965b21b --- /dev/null +++ b/tests/ressources/workflows/wf9/all_subworkflows.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ressources/workflows/wf9/executors_per_subworkflows.json b/tests/ressources/workflows/wf9/executors_per_subworkflows.json new file mode 100644 index 0000000000000000000000000000000000000000..9e26dfeeb6e641a33dae4961196235bdb965b21b --- /dev/null +++ b/tests/ressources/workflows/wf9/executors_per_subworkflows.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/ressources/workflows/wf9/specification_graph.json b/tests/ressources/workflows/wf9/specification_graph.json index c9cc76ac79a262fa8a9936acd5c40ab6e27b8608..0bd85a00ac8cc693effdabaf3cd1bda1966167b4 100644 --- a/tests/ressources/workflows/wf9/specification_graph.json +++ b/tests/ressources/workflows/wf9/specification_graph.json @@ -1,28 +1,28 @@ { "nodes": [ { - "id": "<src.operation.Operation object at 0x71ee1a53b1c0>", + "id": "<src.operation.Operation object at 0x70f22e6ab580>", "name": "", "shape": "point", "xlabel": "ch2 = Channel.empty()", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a32ff10>", + "id": "<src.operation.Operation object at 0x70f22e6abd00>", "name": "", "shape": "point", "xlabel": "ch2 = Channel.empty()", "fillcolor": "" }, { - "id": "<src.process.Process object at 0x71ee1a53b2b0>", + "id": "<src.process.Process object at 0x70f22e6aa170>", "name": "M2", "shape": "ellipse", "xlabel": "", "fillcolor": "" }, { - "id": "<src.operation.Operation object at 0x71ee1a268850>", + "id": "<src.operation.Operation object at 0x70f22e6aba30>", "name": "", "shape": "point", "xlabel": "ch2", @@ -31,18 +31,18 @@ ], "edges": [ { - "A": "<src.operation.Operation object at 0x71ee1a53b1c0>", - "B": "<src.operation.Operation object at 0x71ee1a268850>", + "A": "<src.operation.Operation object at 0x70f22e6ab580>", + "B": "<src.operation.Operation object at 0x70f22e6aba30>", "label": "ch2" }, { - "A": "<src.operation.Operation object at 0x71ee1a32ff10>", - "B": "<src.operation.Operation object at 0x71ee1a268850>", + "A": "<src.operation.Operation object at 0x70f22e6abd00>", + "B": "<src.operation.Operation object at 0x70f22e6aba30>", "label": "ch2" }, { - "A": "<src.operation.Operation object at 0x71ee1a268850>", - "B": "<src.process.Process object at 0x71ee1a53b2b0>", + "A": "<src.operation.Operation object at 0x70f22e6aba30>", + "B": "<src.process.Process object at 0x70f22e6aa170>", "label": "" } ], diff --git a/tests/test_executor_extraction_per_subworkflow.py b/tests/test_executor_extraction_per_subworkflow.py new file mode 100644 index 0000000000000000000000000000000000000000..74a7b9187d44df2e4d349a39f27de013eaba6bc1 --- /dev/null +++ b/tests/test_executor_extraction_per_subworkflow.py @@ -0,0 +1,349 @@ +import unittest +import json +import glob +from src.workflow import Workflow + +class Test_Executor_Extraction_Per_Subworkflow(unittest.TestCase): + + def test_wf6_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf6", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf6/executors_per_subworkflows.json') as json_file: + saved = json.load(json_file) + saved_sets = [] + for sub in saved: + saved_sets.append(set(saved[sub].values())) + + subs = w.get_subworkflows_called() + dico= {} + for s in subs: + executors = s.get_all_executors_in_workflow() + executors_vals = [] + for e in executors: + executors_vals.append(e.get_code(get_OG = True)) + self.assertTrue(set(executors_vals) in saved_sets) + + def test_wf1_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf1", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf1/executors_per_subworkflows.json') as json_file: + saved = json.load(json_file) + saved_sets = [] + for sub in saved: + saved_sets.append(set(saved[sub].values())) + + subs = w.get_subworkflows_called() + dico= {} + for s in subs: + executors = s.get_all_executors_in_workflow() + executors_vals = [] + for e in executors: + executors_vals.append(e.get_code(get_OG = True)) + self.assertTrue(set(executors_vals) in saved_sets) + + def test_wf18_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf18", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf18/executors_per_subworkflows.json') as json_file: + saved = json.load(json_file) + saved_sets = [] + for sub in saved: + saved_sets.append(set(saved[sub].values())) + + subs = w.get_subworkflows_called() + dico= {} + for s in subs: + executors = s.get_all_executors_in_workflow() + executors_vals = [] + for e in executors: + executors_vals.append(e.get_code(get_OG = True)) + self.assertTrue(set(executors_vals) in saved_sets) + + def test_wf13_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf13", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf13/executors_per_subworkflows.json') as json_file: + saved = json.load(json_file) + saved_sets = [] + for sub in saved: + saved_sets.append(set(saved[sub].values())) + + subs = w.get_subworkflows_called() + dico= {} + for s in subs: + executors = s.get_all_executors_in_workflow() + executors_vals = [] + for e in executors: + executors_vals.append(e.get_code(get_OG = True)) + self.assertTrue(set(executors_vals) in saved_sets) + + def test_wf8_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf8", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf8/executors_per_subworkflows.json') as json_file: + saved = json.load(json_file) + saved_sets = [] + for sub in saved: + saved_sets.append(set(saved[sub].values())) + + subs = w.get_subworkflows_called() + dico= {} + for s in subs: + executors = s.get_all_executors_in_workflow() + executors_vals = [] + for e in executors: + executors_vals.append(e.get_code(get_OG = True)) + self.assertTrue(set(executors_vals) in saved_sets) + + def test_wf3_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf3", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf3/executors_per_subworkflows.json') as json_file: + saved = json.load(json_file) + saved_sets = [] + for sub in saved: + saved_sets.append(set(saved[sub].values())) + + subs = w.get_subworkflows_called() + dico= {} + for s in subs: + executors = s.get_all_executors_in_workflow() + executors_vals = [] + for e in executors: + executors_vals.append(e.get_code(get_OG = True)) + self.assertTrue(set(executors_vals) in saved_sets) + + def test_wf2_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf2", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf2/executors_per_subworkflows.json') as json_file: + saved = json.load(json_file) + saved_sets = [] + for sub in saved: + saved_sets.append(set(saved[sub].values())) + + subs = w.get_subworkflows_called() + dico= {} + for s in subs: + executors = s.get_all_executors_in_workflow() + executors_vals = [] + for e in executors: + executors_vals.append(e.get_code(get_OG = True)) + self.assertTrue(set(executors_vals) in saved_sets) + + def test_wf5_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf5", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf5/executors_per_subworkflows.json') as json_file: + saved = json.load(json_file) + saved_sets = [] + for sub in saved: + saved_sets.append(set(saved[sub].values())) + + subs = w.get_subworkflows_called() + dico= {} + for s in subs: + executors = s.get_all_executors_in_workflow() + executors_vals = [] + for e in executors: + executors_vals.append(e.get_code(get_OG = True)) + self.assertTrue(set(executors_vals) in saved_sets) + + def test_wf16_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf16", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf16/executors_per_subworkflows.json') as json_file: + saved = json.load(json_file) + saved_sets = [] + for sub in saved: + saved_sets.append(set(saved[sub].values())) + + subs = w.get_subworkflows_called() + dico= {} + for s in subs: + executors = s.get_all_executors_in_workflow() + executors_vals = [] + for e in executors: + executors_vals.append(e.get_code(get_OG = True)) + self.assertTrue(set(executors_vals) in saved_sets) + + def test_wf12_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf12", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf12/executors_per_subworkflows.json') as json_file: + saved = json.load(json_file) + saved_sets = [] + for sub in saved: + saved_sets.append(set(saved[sub].values())) + + subs = w.get_subworkflows_called() + dico= {} + for s in subs: + executors = s.get_all_executors_in_workflow() + executors_vals = [] + for e in executors: + executors_vals.append(e.get_code(get_OG = True)) + self.assertTrue(set(executors_vals) in saved_sets) + + def test_wf10_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf10", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf10/executors_per_subworkflows.json') as json_file: + saved = json.load(json_file) + saved_sets = [] + for sub in saved: + saved_sets.append(set(saved[sub].values())) + + subs = w.get_subworkflows_called() + dico= {} + for s in subs: + executors = s.get_all_executors_in_workflow() + executors_vals = [] + for e in executors: + executors_vals.append(e.get_code(get_OG = True)) + self.assertTrue(set(executors_vals) in saved_sets) + + def test_wf9_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf9", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf9/executors_per_subworkflows.json') as json_file: + saved = json.load(json_file) + saved_sets = [] + for sub in saved: + saved_sets.append(set(saved[sub].values())) + + subs = w.get_subworkflows_called() + dico= {} + for s in subs: + executors = s.get_all_executors_in_workflow() + executors_vals = [] + for e in executors: + executors_vals.append(e.get_code(get_OG = True)) + self.assertTrue(set(executors_vals) in saved_sets) + + def test_wf7_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf7", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf7/executors_per_subworkflows.json') as json_file: + saved = json.load(json_file) + saved_sets = [] + for sub in saved: + saved_sets.append(set(saved[sub].values())) + + subs = w.get_subworkflows_called() + dico= {} + for s in subs: + executors = s.get_all_executors_in_workflow() + executors_vals = [] + for e in executors: + executors_vals.append(e.get_code(get_OG = True)) + self.assertTrue(set(executors_vals) in saved_sets) + + def test_wf4_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf4", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf4/executors_per_subworkflows.json') as json_file: + saved = json.load(json_file) + saved_sets = [] + for sub in saved: + saved_sets.append(set(saved[sub].values())) + + subs = w.get_subworkflows_called() + dico= {} + for s in subs: + executors = s.get_all_executors_in_workflow() + executors_vals = [] + for e in executors: + executors_vals.append(e.get_code(get_OG = True)) + self.assertTrue(set(executors_vals) in saved_sets) + + def test_wf15_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf15", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf15/executors_per_subworkflows.json') as json_file: + saved = json.load(json_file) + saved_sets = [] + for sub in saved: + saved_sets.append(set(saved[sub].values())) + + subs = w.get_subworkflows_called() + dico= {} + for s in subs: + executors = s.get_all_executors_in_workflow() + executors_vals = [] + for e in executors: + executors_vals.append(e.get_code(get_OG = True)) + self.assertTrue(set(executors_vals) in saved_sets) + + def test_wf17_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf17", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf17/executors_per_subworkflows.json') as json_file: + saved = json.load(json_file) + saved_sets = [] + for sub in saved: + saved_sets.append(set(saved[sub].values())) + + subs = w.get_subworkflows_called() + dico= {} + for s in subs: + executors = s.get_all_executors_in_workflow() + executors_vals = [] + for e in executors: + executors_vals.append(e.get_code(get_OG = True)) + self.assertTrue(set(executors_vals) in saved_sets) + + def test_wf14_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf14", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf14/executors_per_subworkflows.json') as json_file: + saved = json.load(json_file) + saved_sets = [] + for sub in saved: + saved_sets.append(set(saved[sub].values())) + + subs = w.get_subworkflows_called() + dico= {} + for s in subs: + executors = s.get_all_executors_in_workflow() + executors_vals = [] + for e in executors: + executors_vals.append(e.get_code(get_OG = True)) + self.assertTrue(set(executors_vals) in saved_sets) + + def test_wf11_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf11", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf11/executors_per_subworkflows.json') as json_file: + saved = json.load(json_file) + saved_sets = [] + for sub in saved: + saved_sets.append(set(saved[sub].values())) + + subs = w.get_subworkflows_called() + dico= {} + for s in subs: + executors = s.get_all_executors_in_workflow() + executors_vals = [] + for e in executors: + executors_vals.append(e.get_code(get_OG = True)) + self.assertTrue(set(executors_vals) in saved_sets) + \ No newline at end of file diff --git a/tests/test_process_extraction.py b/tests/test_process_extraction.py new file mode 100644 index 0000000000000000000000000000000000000000..06faeefd0507c9cb7365ce5ff232db0dae064dee --- /dev/null +++ b/tests/test_process_extraction.py @@ -0,0 +1,259 @@ +import unittest +import json +import glob +from src.workflow import Workflow + +class Test_Process_Extraction(unittest.TestCase): + + def test_wf6_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf6", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf6/all_processes.json') as json_file: + saved = json.load(json_file) + + processes = w.get_processes_called() + dico= {} + for e in processes: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf1_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf1", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf1/all_processes.json') as json_file: + saved = json.load(json_file) + + processes = w.get_processes_called() + dico= {} + for e in processes: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf18_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf18", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf18/all_processes.json') as json_file: + saved = json.load(json_file) + + processes = w.get_processes_called() + dico= {} + for e in processes: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf13_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf13", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf13/all_processes.json') as json_file: + saved = json.load(json_file) + + processes = w.get_processes_called() + dico= {} + for e in processes: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf8_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf8", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf8/all_processes.json') as json_file: + saved = json.load(json_file) + + processes = w.get_processes_called() + dico= {} + for e in processes: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf3_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf3", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf3/all_processes.json') as json_file: + saved = json.load(json_file) + + processes = w.get_processes_called() + dico= {} + for e in processes: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf2_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf2", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf2/all_processes.json') as json_file: + saved = json.load(json_file) + + processes = w.get_processes_called() + dico= {} + for e in processes: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf5_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf5", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf5/all_processes.json') as json_file: + saved = json.load(json_file) + + processes = w.get_processes_called() + dico= {} + for e in processes: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf16_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf16", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf16/all_processes.json') as json_file: + saved = json.load(json_file) + + processes = w.get_processes_called() + dico= {} + for e in processes: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf12_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf12", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf12/all_processes.json') as json_file: + saved = json.load(json_file) + + processes = w.get_processes_called() + dico= {} + for e in processes: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf10_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf10", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf10/all_processes.json') as json_file: + saved = json.load(json_file) + + processes = w.get_processes_called() + dico= {} + for e in processes: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf9_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf9", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf9/all_processes.json') as json_file: + saved = json.load(json_file) + + processes = w.get_processes_called() + dico= {} + for e in processes: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf7_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf7", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf7/all_processes.json') as json_file: + saved = json.load(json_file) + + processes = w.get_processes_called() + dico= {} + for e in processes: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf4_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf4", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf4/all_processes.json') as json_file: + saved = json.load(json_file) + + processes = w.get_processes_called() + dico= {} + for e in processes: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf15_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf15", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf15/all_processes.json') as json_file: + saved = json.load(json_file) + + processes = w.get_processes_called() + dico= {} + for e in processes: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf17_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf17", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf17/all_processes.json') as json_file: + saved = json.load(json_file) + + processes = w.get_processes_called() + dico= {} + for e in processes: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf14_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf14", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf14/all_processes.json') as json_file: + saved = json.load(json_file) + + processes = w.get_processes_called() + dico= {} + for e in processes: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf11_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf11", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf11/all_processes.json') as json_file: + saved = json.load(json_file) + + processes = w.get_processes_called() + dico= {} + for e in processes: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + \ No newline at end of file diff --git a/tests/test_subworkflow_extraction.py b/tests/test_subworkflow_extraction.py new file mode 100644 index 0000000000000000000000000000000000000000..b7db0b072b811ec24f479ff2fd6b6dd411ac4a9f --- /dev/null +++ b/tests/test_subworkflow_extraction.py @@ -0,0 +1,259 @@ +import unittest +import json +import glob +from src.workflow import Workflow + +class Test_Subworkflow_Extraction(unittest.TestCase): + + def test_wf6_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf6", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf6/all_subworkflows.json') as json_file: + saved = json.load(json_file) + + subworkflows = w.get_subworkflows_called() + dico= {} + for e in subworkflows: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf1_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf1", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf1/all_subworkflows.json') as json_file: + saved = json.load(json_file) + + subworkflows = w.get_subworkflows_called() + dico= {} + for e in subworkflows: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf18_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf18", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf18/all_subworkflows.json') as json_file: + saved = json.load(json_file) + + subworkflows = w.get_subworkflows_called() + dico= {} + for e in subworkflows: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf13_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf13", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf13/all_subworkflows.json') as json_file: + saved = json.load(json_file) + + subworkflows = w.get_subworkflows_called() + dico= {} + for e in subworkflows: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf8_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf8", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf8/all_subworkflows.json') as json_file: + saved = json.load(json_file) + + subworkflows = w.get_subworkflows_called() + dico= {} + for e in subworkflows: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf3_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf3", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf3/all_subworkflows.json') as json_file: + saved = json.load(json_file) + + subworkflows = w.get_subworkflows_called() + dico= {} + for e in subworkflows: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf2_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf2", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf2/all_subworkflows.json') as json_file: + saved = json.load(json_file) + + subworkflows = w.get_subworkflows_called() + dico= {} + for e in subworkflows: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf5_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf5", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf5/all_subworkflows.json') as json_file: + saved = json.load(json_file) + + subworkflows = w.get_subworkflows_called() + dico= {} + for e in subworkflows: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf16_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf16", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf16/all_subworkflows.json') as json_file: + saved = json.load(json_file) + + subworkflows = w.get_subworkflows_called() + dico= {} + for e in subworkflows: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf12_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf12", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf12/all_subworkflows.json') as json_file: + saved = json.load(json_file) + + subworkflows = w.get_subworkflows_called() + dico= {} + for e in subworkflows: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf10_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf10", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf10/all_subworkflows.json') as json_file: + saved = json.load(json_file) + + subworkflows = w.get_subworkflows_called() + dico= {} + for e in subworkflows: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf9_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf9", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf9/all_subworkflows.json') as json_file: + saved = json.load(json_file) + + subworkflows = w.get_subworkflows_called() + dico= {} + for e in subworkflows: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf7_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf7", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf7/all_subworkflows.json') as json_file: + saved = json.load(json_file) + + subworkflows = w.get_subworkflows_called() + dico= {} + for e in subworkflows: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf4_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf4", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf4/all_subworkflows.json') as json_file: + saved = json.load(json_file) + + subworkflows = w.get_subworkflows_called() + dico= {} + for e in subworkflows: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf15_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf15", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf15/all_subworkflows.json') as json_file: + saved = json.load(json_file) + + subworkflows = w.get_subworkflows_called() + dico= {} + for e in subworkflows: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf17_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf17", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf17/all_subworkflows.json') as json_file: + saved = json.load(json_file) + + subworkflows = w.get_subworkflows_called() + dico= {} + for e in subworkflows: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf14_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf14", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf14/all_subworkflows.json') as json_file: + saved = json.load(json_file) + + subworkflows = w.get_subworkflows_called() + dico= {} + for e in subworkflows: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf11_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf11", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf11/all_subworkflows.json') as json_file: + saved = json.load(json_file) + + subworkflows = w.get_subworkflows_called() + dico= {} + for e in subworkflows: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + \ No newline at end of file diff --git a/tests/test_workflows_all_executors.py b/tests/test_workflows_all_executors.py new file mode 100644 index 0000000000000000000000000000000000000000..40231b28cd67398a3de40944a18ab89fda715657 --- /dev/null +++ b/tests/test_workflows_all_executors.py @@ -0,0 +1,259 @@ +import unittest +import json +import glob +from src.workflow import Workflow + +class Test_All_Executors_Extraction(unittest.TestCase): + + def test_wf6_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf6", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf6/all_executors.json') as json_file: + saved = json.load(json_file) + + executors = w.get_workflow_main().get_all_executors_in_workflow() + dico= {} + for e in executors: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf1_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf1", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf1/all_executors.json') as json_file: + saved = json.load(json_file) + + executors = w.get_workflow_main().get_all_executors_in_workflow() + dico= {} + for e in executors: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf18_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf18", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf18/all_executors.json') as json_file: + saved = json.load(json_file) + + executors = w.get_workflow_main().get_all_executors_in_workflow() + dico= {} + for e in executors: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf13_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf13", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf13/all_executors.json') as json_file: + saved = json.load(json_file) + + executors = w.get_workflow_main().get_all_executors_in_workflow() + dico= {} + for e in executors: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf8_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf8", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf8/all_executors.json') as json_file: + saved = json.load(json_file) + + executors = w.get_workflow_main().get_all_executors_in_workflow() + dico= {} + for e in executors: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf3_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf3", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf3/all_executors.json') as json_file: + saved = json.load(json_file) + + executors = w.get_workflow_main().get_all_executors_in_workflow() + dico= {} + for e in executors: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf2_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf2", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf2/all_executors.json') as json_file: + saved = json.load(json_file) + + executors = w.get_workflow_main().get_all_executors_in_workflow() + dico= {} + for e in executors: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf5_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf5", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf5/all_executors.json') as json_file: + saved = json.load(json_file) + + executors = w.get_workflow_main().get_all_executors_in_workflow() + dico= {} + for e in executors: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf16_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf16", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf16/all_executors.json') as json_file: + saved = json.load(json_file) + + executors = w.get_workflow_main().get_all_executors_in_workflow() + dico= {} + for e in executors: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf12_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf12", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf12/all_executors.json') as json_file: + saved = json.load(json_file) + + executors = w.get_workflow_main().get_all_executors_in_workflow() + dico= {} + for e in executors: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf10_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf10", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf10/all_executors.json') as json_file: + saved = json.load(json_file) + + executors = w.get_workflow_main().get_all_executors_in_workflow() + dico= {} + for e in executors: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf9_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf9", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf9/all_executors.json') as json_file: + saved = json.load(json_file) + + executors = w.get_workflow_main().get_all_executors_in_workflow() + dico= {} + for e in executors: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf7_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf7", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf7/all_executors.json') as json_file: + saved = json.load(json_file) + + executors = w.get_workflow_main().get_all_executors_in_workflow() + dico= {} + for e in executors: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf4_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf4", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf4/all_executors.json') as json_file: + saved = json.load(json_file) + + executors = w.get_workflow_main().get_all_executors_in_workflow() + dico= {} + for e in executors: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf15_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf15", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf15/all_executors.json') as json_file: + saved = json.load(json_file) + + executors = w.get_workflow_main().get_all_executors_in_workflow() + dico= {} + for e in executors: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf17_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf17", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf17/all_executors.json') as json_file: + saved = json.load(json_file) + + executors = w.get_workflow_main().get_all_executors_in_workflow() + dico= {} + for e in executors: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf14_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf14", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf14/all_executors.json') as json_file: + saved = json.load(json_file) + + executors = w.get_workflow_main().get_all_executors_in_workflow() + dico= {} + for e in executors: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + + def test_wf11_extraction(self): + w = Workflow(f"tests/ressources/workflows/wf11", display_info=False, duplicate=True) + w.initialise() + + with open('tests/ressources/workflows/wf11/all_executors.json') as json_file: + saved = json.load(json_file) + + executors = w.get_workflow_main().get_all_executors_in_workflow() + dico= {} + for e in executors: + dico[str(e)] = e.get_code(get_OG = True) + + self.assertTrue(set(dico.values())==set(saved.values())) + \ No newline at end of file diff --git a/tests/test_workflows_simple_duplicate.py b/tests/test_workflows_simple_duplicate.py index 9f2685ea23108a13343178ac1e1828460c4fbb3a..730c593ab67f02184c0d947e24bf9cc0c3ebc510 100644 --- a/tests/test_workflows_simple_duplicate.py +++ b/tests/test_workflows_simple_duplicate.py @@ -7,108 +7,90 @@ class TestWorkflows(unittest.TestCase): def test_wfwf6_simple_duplicate(self): w = Workflow(f"tests/ressources/workflows/wf6", display_info=False, duplicate=True) w.initialise() - json_files = glob.glob(f'tests/ressources/workflows/wf6/*.json', recursive=False) - self.assertTrue(w.check_if_equal(json_files[0])) + self.assertTrue(w.check_if_equal('tests/ressources/workflows/wf6/specification_graph.json')) def test_wfwf1_simple_duplicate(self): w = Workflow(f"tests/ressources/workflows/wf1", display_info=False, duplicate=True) w.initialise() - json_files = glob.glob(f'tests/ressources/workflows/wf1/*.json', recursive=False) - self.assertTrue(w.check_if_equal(json_files[0])) + self.assertTrue(w.check_if_equal('tests/ressources/workflows/wf1/specification_graph.json')) def test_wfwf18_simple_duplicate(self): w = Workflow(f"tests/ressources/workflows/wf18", display_info=False, duplicate=True) w.initialise() - json_files = glob.glob(f'tests/ressources/workflows/wf18/*.json', recursive=False) - self.assertTrue(w.check_if_equal(json_files[0])) + self.assertTrue(w.check_if_equal('tests/ressources/workflows/wf18/specification_graph.json')) def test_wfwf13_simple_duplicate(self): w = Workflow(f"tests/ressources/workflows/wf13", display_info=False, duplicate=True) w.initialise() - json_files = glob.glob(f'tests/ressources/workflows/wf13/*.json', recursive=False) - self.assertTrue(w.check_if_equal(json_files[0])) + self.assertTrue(w.check_if_equal('tests/ressources/workflows/wf13/specification_graph.json')) def test_wfwf8_simple_duplicate(self): w = Workflow(f"tests/ressources/workflows/wf8", display_info=False, duplicate=True) w.initialise() - json_files = glob.glob(f'tests/ressources/workflows/wf8/*.json', recursive=False) - self.assertTrue(w.check_if_equal(json_files[0])) + self.assertTrue(w.check_if_equal('tests/ressources/workflows/wf8/specification_graph.json')) def test_wfwf3_simple_duplicate(self): w = Workflow(f"tests/ressources/workflows/wf3", display_info=False, duplicate=True) w.initialise() - json_files = glob.glob(f'tests/ressources/workflows/wf3/*.json', recursive=False) - self.assertTrue(w.check_if_equal(json_files[0])) + self.assertTrue(w.check_if_equal('tests/ressources/workflows/wf3/specification_graph.json')) def test_wfwf2_simple_duplicate(self): w = Workflow(f"tests/ressources/workflows/wf2", display_info=False, duplicate=True) w.initialise() - json_files = glob.glob(f'tests/ressources/workflows/wf2/*.json', recursive=False) - self.assertTrue(w.check_if_equal(json_files[0])) + self.assertTrue(w.check_if_equal('tests/ressources/workflows/wf2/specification_graph.json')) def test_wfwf5_simple_duplicate(self): w = Workflow(f"tests/ressources/workflows/wf5", display_info=False, duplicate=True) w.initialise() - json_files = glob.glob(f'tests/ressources/workflows/wf5/*.json', recursive=False) - self.assertTrue(w.check_if_equal(json_files[0])) + self.assertTrue(w.check_if_equal('tests/ressources/workflows/wf5/specification_graph.json')) def test_wfwf16_simple_duplicate(self): w = Workflow(f"tests/ressources/workflows/wf16", display_info=False, duplicate=True) w.initialise() - json_files = glob.glob(f'tests/ressources/workflows/wf16/*.json', recursive=False) - self.assertTrue(w.check_if_equal(json_files[0])) + self.assertTrue(w.check_if_equal('tests/ressources/workflows/wf16/specification_graph.json')) def test_wfwf12_simple_duplicate(self): w = Workflow(f"tests/ressources/workflows/wf12", display_info=False, duplicate=True) w.initialise() - json_files = glob.glob(f'tests/ressources/workflows/wf12/*.json', recursive=False) - self.assertTrue(w.check_if_equal(json_files[0])) + self.assertTrue(w.check_if_equal('tests/ressources/workflows/wf12/specification_graph.json')) def test_wfwf10_simple_duplicate(self): w = Workflow(f"tests/ressources/workflows/wf10", display_info=False, duplicate=True) w.initialise() - json_files = glob.glob(f'tests/ressources/workflows/wf10/*.json', recursive=False) - self.assertTrue(w.check_if_equal(json_files[0])) + self.assertTrue(w.check_if_equal('tests/ressources/workflows/wf10/specification_graph.json')) def test_wfwf9_simple_duplicate(self): w = Workflow(f"tests/ressources/workflows/wf9", display_info=False, duplicate=True) w.initialise() - json_files = glob.glob(f'tests/ressources/workflows/wf9/*.json', recursive=False) - self.assertTrue(w.check_if_equal(json_files[0])) + self.assertTrue(w.check_if_equal('tests/ressources/workflows/wf9/specification_graph.json')) def test_wfwf7_simple_duplicate(self): w = Workflow(f"tests/ressources/workflows/wf7", display_info=False, duplicate=True) w.initialise() - json_files = glob.glob(f'tests/ressources/workflows/wf7/*.json', recursive=False) - self.assertTrue(w.check_if_equal(json_files[0])) + self.assertTrue(w.check_if_equal('tests/ressources/workflows/wf7/specification_graph.json')) def test_wfwf4_simple_duplicate(self): w = Workflow(f"tests/ressources/workflows/wf4", display_info=False, duplicate=True) w.initialise() - json_files = glob.glob(f'tests/ressources/workflows/wf4/*.json', recursive=False) - self.assertTrue(w.check_if_equal(json_files[0])) + self.assertTrue(w.check_if_equal('tests/ressources/workflows/wf4/specification_graph.json')) def test_wfwf15_simple_duplicate(self): w = Workflow(f"tests/ressources/workflows/wf15", display_info=False, duplicate=True) w.initialise() - json_files = glob.glob(f'tests/ressources/workflows/wf15/*.json', recursive=False) - self.assertTrue(w.check_if_equal(json_files[0])) + self.assertTrue(w.check_if_equal('tests/ressources/workflows/wf15/specification_graph.json')) def test_wfwf17_simple_duplicate(self): w = Workflow(f"tests/ressources/workflows/wf17", display_info=False, duplicate=True) w.initialise() - json_files = glob.glob(f'tests/ressources/workflows/wf17/*.json', recursive=False) - self.assertTrue(w.check_if_equal(json_files[0])) + self.assertTrue(w.check_if_equal('tests/ressources/workflows/wf17/specification_graph.json')) def test_wfwf14_simple_duplicate(self): w = Workflow(f"tests/ressources/workflows/wf14", display_info=False, duplicate=True) w.initialise() - json_files = glob.glob(f'tests/ressources/workflows/wf14/*.json', recursive=False) - self.assertTrue(w.check_if_equal(json_files[0])) + self.assertTrue(w.check_if_equal('tests/ressources/workflows/wf14/specification_graph.json')) def test_wfwf11_simple_duplicate(self): w = Workflow(f"tests/ressources/workflows/wf11", display_info=False, duplicate=True) w.initialise() - json_files = glob.glob(f'tests/ressources/workflows/wf11/*.json', recursive=False) - self.assertTrue(w.check_if_equal(json_files[0])) + self.assertTrue(w.check_if_equal('tests/ressources/workflows/wf11/specification_graph.json')) \ No newline at end of file