Skip to content

Break cyclic dependency #668

@liamhuber

Description

@liamhuber

There are a number of places where we use local imports to avoid cyclic dependency:

Drawing to depth:

from pyiron_workflow.nodes.composite import Composite

Specifying a node's lexical parent type:

from pyiron_workflow.nodes.composite import Composite

Pulling directly on a node:

from pyiron_workflow.workflow import Workflow

Pushing directly from a node:

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

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions