Skip to content

Graph

opulse.analysis.graph

Expose registry dependencies for inspection without changing evaluation order.

Edges point from a caller to the operator it uses. Recursive self-calls are shown explicitly, while layer ordering ignores those intentional self-loops.

dependency_graph

dependency_graph(registry: OperatorRegistry) -> dict

Return JSON-compatible nodes and edges, rejecting missing IDs and cycles.

topological_layers

topological_layers(graph: dict) -> list[list[str]]

Group IDs by dependency depth, with callees in earlier groups.

to_dot

to_dot(graph: dict) -> str

Render clustered Graphviz DOT with safely quoted labels and IDs.