You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe I'm doing this the wrong way, but I have a hierarchical workflow that needs to connect some boilerplate fields (dimension and terminal_output, in this case) from the input node to all of the nodes in the workflow that expect these inputs. I could obtain the list of nodes to iterate over with map(workflow.get_node, workflow.list_node_names()), but because this flattens the graph, it would only be possible at the top level and would prevent me from using the same trick on my sub-workflows (because the inputs would collide). The list of nodes that I actually want to connect to is precisely workflow._graph.nodes(), and philosophically I would like the ability to consider sub-workflows as black boxes, which I currently can't figure out how to do using the public API.
I understand not wanting to expose Workflow._graph directly, but is there a reason not to expose an iterator over the graph's nodes?
The text was updated successfully, but these errors were encountered:
ischwabacher
changed the title
Why isn't Workflow._graph.nodes_iter exposed through the public API?
Exposing Workflow._graph.nodes_iter() through the public API
Nov 19, 2014
Maybe I'm doing this the wrong way, but I have a hierarchical workflow that needs to connect some boilerplate fields (
dimension
andterminal_output
, in this case) from the input node to all of the nodes in the workflow that expect these inputs. I could obtain the list of nodes to iterate over withmap(workflow.get_node, workflow.list_node_names())
, but because this flattens the graph, it would only be possible at the top level and would prevent me from using the same trick on my sub-workflows (because the inputs would collide). The list of nodes that I actually want to connect to is preciselyworkflow._graph.nodes()
, and philosophically I would like the ability to consider sub-workflows as black boxes, which I currently can't figure out how to do using the public API.I understand not wanting to expose
Workflow._graph
directly, but is there a reason not to expose an iterator over the graph's nodes?The text was updated successfully, but these errors were encountered: