wf reorg 4 demo workflow in example
This commit is contained in:
@@ -64,8 +64,6 @@ raising at the first failure.
|
|||||||
|
|
||||||
## What This Cleanup Does Not Solve Yet
|
## What This Cleanup Does Not Solve Yet
|
||||||
|
|
||||||
- `demo_workflow.py` is still large because it is a fixture/demo, not core
|
|
||||||
runtime. If it becomes a permanent example suite, move it out of `wf_core`.
|
|
||||||
- Foreach is still serial-only. Parallel foreach needs an explicit scheduling
|
- Foreach is still serial-only. Parallel foreach needs an explicit scheduling
|
||||||
model, not just `asyncio.gather`.
|
model, not just `asyncio.gather`.
|
||||||
- Interrupt lifecycle is still node-level and run-state-level. Long-lived
|
- Interrupt lifecycle is still node-level and run-state-level. Long-lived
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
"""Runnable workflow examples for local development and tests."""
|
||||||
@@ -3,9 +3,7 @@ from __future__ import annotations
|
|||||||
from collections.abc import Callable
|
from collections.abc import Callable
|
||||||
from typing import cast
|
from typing import cast
|
||||||
|
|
||||||
from .models import Workflow
|
from wf_core import END, RuntimeContext, Workflow
|
||||||
from .run_state import RuntimeContext
|
|
||||||
from .tokens import END
|
|
||||||
|
|
||||||
DemoHandler = Callable[[dict[str, object], RuntimeContext], dict[str, object]]
|
DemoHandler = Callable[[dict[str, object], RuntimeContext], dict[str, object]]
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@ import json
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
from wf_core import RunState, execute_workflow, resume_workflow
|
from wf_core import RunState, execute_workflow, resume_workflow
|
||||||
from wf_core.demo_workflow import build_demo_registry, build_demo_workflow
|
from examples.demo_workflow import build_demo_registry, build_demo_workflow
|
||||||
|
|
||||||
|
|
||||||
def print_run(label: str, run: RunState) -> None:
|
def print_run(label: str, run: RunState) -> None:
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ from wf_core import (
|
|||||||
resume_workflow,
|
resume_workflow,
|
||||||
step_workflow,
|
step_workflow,
|
||||||
)
|
)
|
||||||
from wf_core.demo_workflow import build_demo_registry, build_demo_workflow
|
|
||||||
from wf_core.runtime.ops.runs import create_run_state
|
from wf_core.runtime.ops.runs import create_run_state
|
||||||
|
from examples.demo_workflow import build_demo_registry, build_demo_workflow
|
||||||
from wf_authoring import (
|
from wf_authoring import (
|
||||||
NodeReturn,
|
NodeReturn,
|
||||||
WorkflowBuilder,
|
WorkflowBuilder,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from pydantic import BaseModel
|
|||||||
|
|
||||||
from wf_authoring import build_registry, subgraph_node
|
from wf_authoring import build_registry, subgraph_node
|
||||||
from wf_core import RuntimeContext
|
from wf_core import RuntimeContext
|
||||||
from wf_core.demo_workflow import build_demo_registry, build_demo_workflow
|
from examples.demo_workflow import build_demo_registry, build_demo_workflow
|
||||||
|
|
||||||
|
|
||||||
def test_subgraph_node_wraps_compiled_workflow() -> None:
|
def test_subgraph_node_wraps_compiled_workflow() -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user