TenetoWorkflow¶
-
class
TenetoWorkflow
(remove_nonterminal_output=True)[source]¶ Bases:
object
Methods Summary
add_node
(nodename, func[, depends_on, params])Adds a node to the workflow graph. calc_runorder
()Calculate the run order of the different nodes on the graph. delete_output_from_level
(level)Delete the output found after calling TenetoWorkflow.run(). make_workflow_figure
([fig, ax])Creates a figure depicting the workflow figure. remove_node
(nodename)Remove a node from the graph. run
()Runs the entire graph. Methods Documentation
-
add_node
(nodename, func, depends_on=None, params=None)[source]¶ Adds a node to the workflow graph.
Parameters: - nodename (str) – Name of the node
- func (str) – The function that is to be called. The alternatives here are ‘TemporalNetwork’ or ‘TenetoBIDS’, or any of the functions that can be called within these classes.
- depends_on (str) – which step the node depends on. If empty, is considered to preceed the previous step. If ‘isroot’ is specified, it is considered an input variable.
- params (dict) – Parameters that are passed into func.
Note
These functions are not run until TenetoWorkflow.run() is called.
-
delete_output_from_level
(level)[source]¶ Delete the output found after calling TenetoWorkflow.run().
-
make_workflow_figure
(fig=None, ax=None)[source]¶ Creates a figure depicting the workflow figure.
Parameters: - fig (matplotlib) –
- ax (matplotlib) –
- fig is used as input, ax should be too. (if) –
Returns: fig, ax – matplotlib figure and axis
Return type: matplotlib
-