Beispiel #1
0
 def write_graph(self, dotfilename='graph.dot', graph2use='orig'):
     """
     graph2use = 'orig', 'flat', 'exec'
     """
     graph = self._graph
     if graph2use in ['flat', 'exec']:
         if self._flatgraph is None:
             self._create_flat_graph()
         graph = self._flatgraph
     if graph2use == 'exec':
         graph = self._execgraph
         if graph is None:
             graph = _generate_expanded_graph(deepcopy(self._flatgraph))
     export_graph(graph, self.base_dir, dotfilename=dotfilename)
Beispiel #2
0
    def run(self, inseries=False):
        """ Execute the workflow

        Parameters
        ----------
        
        inseries: Boolean
            Execute workflow in series
        """
        self._create_flat_graph()
        self._execgraph = _generate_expanded_graph(deepcopy(self._flatgraph))
        for node in self._execgraph.nodes():
            node.config = self.config
        if inseries == True:
            self._execute_in_series()
        else:
            self._execute_with_manager()