Package mrv :: Package automation :: Module workflow :: Class Workflow :: Class CallGraph
[hide private]
[frames] | no frames]

Class CallGraph

source code

                  object --+        
                           |        
networkx.classes.graph.Graph --+    
                               |    
networkx.classes.digraph.DiGraph --+
                                   |
                                  Workflow.CallGraph

Simple wrapper storing a call graph, keeping the root at which the call started

Note: this class is specialized to be used by workflows, its not general for that purpose

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
startCall(self, pdata)
Add a call of a process
source code
 
endCall(self, result)
End the call start started previously
source code
 
callRoot(self)
Returns: root at which the call started
source code
 
callstackSize(self)
Returns: length of the callstack
source code
 
toCallList(self, reverse=True, pruneIfTrue=<function <lambda> at 0x37f1488>)
Returns: flattened version of graph as list of ProcessData edges in call order , having the root as last element of the list
source code

Inherited from networkx.classes.digraph.DiGraph: add_edge, add_edges_from, add_node, add_nodes_from, clear, degree_iter, edges_iter, has_predecessor, has_successor, in_degree, in_degree_iter, in_edges, in_edges_iter, is_directed, is_multigraph, neighbors, neighbors_iter, out_degree, out_degree_iter, out_edges, out_edges_iter, predecessors, predecessors_iter, remove_edge, remove_edges_from, remove_node, remove_nodes_from, reverse, subgraph, successors, successors_iter, to_directed, to_undirected

Inherited from networkx.classes.graph.Graph: __contains__, __getitem__, __iter__, __len__, __str__, add_cycle, add_path, add_star, add_weighted_edges_from, adjacency_iter, adjacency_list, copy, degree, edges, get_edge_data, has_edge, has_node, nbunch_iter, nodes, nodes_iter, nodes_with_selfloops, number_of_edges, number_of_nodes, number_of_selfloops, order, selfloop_edges, size

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

endCall(self, result)

source code 
End the call start started previously
Parameters:
  • result - the result of the call

callRoot(self)

source code 
Returns:
root at which the call started

callstackSize(self)

source code 
Returns:
length of the callstack

toCallList(self, reverse=True, pruneIfTrue=<function <lambda> at 0x37f1488>)

source code 
Parameters:
  • pruneIfTrue - Function taking ProcessData to return true if the node should be pruned from the result
  • reverse - if true, the calllist will be properly reversed ( taking childre into account
Returns:
flattened version of graph as list of ProcessData edges in call order , having the root as last element of the list