• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

run-llama / workflows-py / 20882219852

10 Jan 2026 06:01PM UTC coverage: 87.949% (+0.2%) from 87.777%
20882219852

push

github

web-flow
Add resource nodes to workflow graph export (#269)

* feat: add resource nodes to workflow graph export

Add support for visualizing resource dependencies in workflow graphs:

- Enhanced _Resource class with source location metadata (file, line,
  docstring, unique hash for deduplication)
- Added ResourceDefinition.type_annotation to capture the type from
  Annotated[T, Resource(...)]
- Added WorkflowGraphResourceNode protocol model with full metadata
- Added DrawWorkflowResourceNode class for intermediate representation
- Updated DrawWorkflowEdge to support edge labels (variable names)
- Modified extract_workflow_structure to extract and deduplicate
  resource nodes, connecting them to steps with labeled edges
- Updated Pyvis and Mermaid renderers to display resource nodes
  (hexagon shape, plum color) with metadata tooltips

* test: add tests and example for resource nodes visualization

- Add tests for resource node extraction in test_representation_utils.py
- Add tests for resource rendering in test_drawing.py (Mermaid + Pyvis)
- Add workflow_with_resources fixture with multiple resources
- Add runnable example (examples/visualization/resource_nodes_example.py)
  that generates both Mermaid and Pyvis output with resource nodes

* chore: add changeset for resource nodes feature

* fix: reverse resource edge direction to step -> resource

* refactor: unify DrawWorkflowNode and DrawWorkflowResourceNode

- Merge resource-specific fields into DrawWorkflowNode
- Add to_resource_response_model() for resource serialization
- Keep DrawWorkflowResourceNode as backwards compat alias
- Simplify type annotations in rendering code (remove unions)
- Remove isinstance checks since all nodes are now DrawWorkflowNode

* refactor: simplify _get_clean_node_id to use node_type prefix

* refactor: merge resource_nodes into nodes list

Unify resource nodes with the main nodes list instead of a separate
resource_nodes field. This simplifies the API and rendering code whi... (continued)

97 of 147 new or added lines in 4 files covered. (65.99%)

151 existing lines in 7 files now uncovered.

9677 of 11003 relevant lines covered (87.95%)

0.88 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.91
/src/workflows/server/server.py


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc