def test_e_generate_list_stub(self): info = StubInfo(self.test_list_exec, nodeType=NodeType.split) info.outputfiles = [('quadrants_list', 5)] info.inputfiles = ['exposures'] info.isParallelSplit = True info.ram = 10 info.walltime = 2 info.cores = 1 self.generator.generate_stubs([info])
def filter_executables_with_graph(self, pydron_graph, loaded_executables): """ :type pydron_graph: Graph :type executables: [Executable] :type filtered_executables: Set :return: """ filtered_executables = set() for key, value in pydron_graph._ticks.items(): task = value.task if isinstance(task, ExecTask): print("Normal: %s" % task.command) matching = [s for s in loaded_executables if task.command in s] if len(matching) == 1 and loaded_executables[ matching[0]].outputs[0].content_type == 'listfile': filtered_executables.add( StubInfo(task.command, NodeType.normal, True)) else: filtered_executables.add( StubInfo(task.command, NodeType.normal)) continue if isinstance(task, ParallelSplitTask): print("Split: %s" % task.name) filtered_executables.add(StubInfo(task.name, NodeType.split)) subTasks = self.filter_executables_with_graph( task.body_graph, loaded_executables) filtered_executables = filtered_executables.union(subTasks) continue if isinstance(task, NestedGraphTask): print("Nested: %s" % task.name) filtered_executables.add(StubInfo(task.name, NodeType.nested)) subTasks = self.filter_executables_with_graph( task.body_graph, loaded_executables) filtered_executables = filtered_executables.union(subTasks) continue print("Unkown: %s" % type(task)) return filtered_executables
def test_a_generate_xml_stub(self): info = StubInfo(self.test_xml_exec) info.outputfiles = [('quadrant', 2), ('master_dark', 2), ('control_params', 2)] info.inputfiles = ['corrected_frame', 'hot_pixels_map'] info.ram = 10 info.walltime = 2 info.cores = 1 self.generator.generate_stubs([info])