Skip to content

Add workflow visualization utility#755

Draft
SimonHeybrock wants to merge 2 commits intomainfrom
worktree-visualize-workflows
Draft

Add workflow visualization utility#755
SimonHeybrock wants to merge 2 commits intomainfrom
worktree-visualize-workflows

Conversation

@SimonHeybrock
Copy link
Member

Summary

  • Expose StreamProcessor.visualize() through StreamProcessorWorkflow so callers don't need to reach through private attributes
  • Add visualize_workflows(instrument) utility that iterates all registered workflow specs, instantiates each with default params, and collects graphviz diagrams from those backed by a StreamProcessor
  • Gracefully skips workflows that don't support visualization (timeseries, area detector) or fail to instantiate (missing NeXus files)

Motivation

ess.reduce.streaming.StreamProcessor has a visualize() method that produces color-coded dependency graphs showing dynamic keys, accumulators, static nodes, and targets. This was not accessible through our wrapper layers. Having a utility to auto-generate these for all registered workflows is useful for documentation and could later be wired into the dashboard UI (e.g., backend renders SVG, displayed via pn.pane.SVG on demand).

Test plan

  • Unit tests pass
  • Render for DREAM: visualize_workflows(instrument, output_dir=..., format='png') produces 6 workflow graphs

🤖 Generated with Claude Code

Expose StreamProcessor.visualize() through StreamProcessorWorkflow
and add a utility function to auto-generate graph visualizations for
all registered workflows of an instrument.
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.

1 participant