Skip to content

Compatibility with pyiron_workflow==0.19.2 - #148

Draft
samwaseda with Copilot wants to merge 4 commits into
mainfrom
copilot/make-compatible-with-pyiron-workflow-0192
Draft

Compatibility with pyiron_workflow==0.19.2#148
samwaseda with Copilot wants to merge 4 commits into
mainfrom
copilot/make-compatible-with-pyiron-workflow-0192

Conversation

Copilot AI commented Aug 21, 2026

Copy link
Copy Markdown

pyiron_workflow 0.19.x is a ground-up redesign: nodes are now immutable recipe-based objects backed by flowrep, ports have no mutable .value, wf.children is gone, NOT_DATA moved to flowrep, and the old Function/Macro/DataclassNode class hierarchy no longer exists. This PR updates pyironFlow to work with the new API.

Core architectural changes

  • Port values — ports are now frozen dataclasses with no .value. Input values are stored as hidden Constant nodes (prefixed _const_) connected via edges. A new apply_node_values() helper creates/wires these after a node is added to the workflow. Values are read back by inspecting connected constant nodes or recipe defaults.
  • Node construction — replaced NodeClass(label=...) with atomictype2node(func, label). Import paths now come from node.recipe.fully_qualified_name.
  • Edges — replaced wf.graph_as_dict["edges"]["data"] with wf.edges (list of EdgeTuple(source, target) with .node/.port fields). Node connections use wf.connect(out_port, in_port) instead of inp.connect(out).
  • Workflow mutationwf.childrenwf.nodes, add_child/remove_childadd_node/remove_node, wf.disconnect(node) replaces per-port disconnect.
  • Run statusnode.failed/node.running replaced by inspecting wf.last_run.steps per node label. Output values read from wf.last_run.result.nodes[label].output_ports.

File-by-file

  • themes.py — imports and isinstance checks updated to Atomic, Macro, Workflow, Constant; removed node.color fallback.
  • wf_extensions.py — rewrote get_nodes, get_edges, get_node_dict, dict_to_node, dict_to_edge, get_import_path; added apply_node_values; all channel_dict references replaced with direct dict iteration.
  • reactflow.py — updated imports, add_node, get_workflow, get_selected_workflow; SAVE/LOAD/DELETE stubs with informative messages (API removed upstream); removed ReadinessError/ChannelConnectionError handlers; default wf parameter moved out of signature (new API rejects keyword label=).
  • pyproject.tomlpyiron_workflow pinned to 0.19.2.

Example: creating and running a workflow

import flowrep as fr
from pyiron_workflow import Workflow
from pyiron_workflow.constructors import atomictype2node

@fr.atomic
def add(x: float, y: float) -> float:
    return x + y

wf = Workflow("demo")
n = atomictype2node(add, "n1")
wf.add_node(n)
# Values supplied via hidden constant nodes automatically managed by pyironFlow

Co-authored-by: samwaseda <37879103+samwaseda@users.noreply.github.com>
…9 API

Co-authored-by: samwaseda <37879103+samwaseda@users.noreply.github.com>
Copilot AI requested a review from samwaseda August 21, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants