-
Notifications
You must be signed in to change notification settings - Fork 3
Description
There are a number of places where we use local imports to avoid cyclic dependency:
Drawing to depth:
pyiron_workflow/pyiron_workflow/draw.py
Line 358 in b781ab2
from pyiron_workflow.nodes.composite import Composite |
Specifying a node's lexical parent type:
pyiron_workflow/pyiron_workflow/node.py
Line 322 in b781ab2
from pyiron_workflow.nodes.composite import Composite |
Pulling directly on a node:
pyiron_workflow/pyiron_workflow/node.py
Line 678 in b781ab2
from pyiron_workflow.workflow import Workflow |
Pushing directly from a node:
pyiron_workflow/pyiron_workflow/node.py
Line 800 in b781ab2
from pyiron_workflow.workflow import Workflow |
(Also #667)
It looks to me like the consistent thread is the way that our lexical Node
's lexical parent is itself always a Node
(a Composite
, in particular).
I think that breaking out a Graph
object as the lexical parent of Node
will resolve this. The macros are then still both nodes and graphs, but we don't demand that all graphs are nodes. This should also move in the direction of resolving #360