hydra.graphviz.coder module
Functions for converting Hydra terms to Graphviz DOT graphs.
- hydra.graphviz.coder.graph_to_subterm_dot_graph(graph: Graph) Graph
Convert a typed graph to a subterm-style (link-view) DOT graph.
- hydra.graphviz.coder.graph_to_subterm_dot_stmts(namespaces: Mapping[ModuleName, str], graph: Graph) Sequence[Stmt]
Convert a typed graph to subterm-style (link-view) DOT statements.
- hydra.graphviz.coder.label_attr(lab: str) EqualityPair
Create a DOT label attribute.
- hydra.graphviz.coder.label_attrs(style: str, lab: str) AttrList
Create DOT label attributes with a node style.
- hydra.graphviz.coder.term_label(compact: bool, namespaces: Mapping[ModuleName, str], term: Term) tuple[str, str]
Compute a label and node style for a term.
- hydra.graphviz.coder.term_to_dot_stmts(namespaces: Mapping[ModuleName, str], term: Term) Sequence[Stmt]
Convert a term to full DOT statements showing term structure.
- hydra.graphviz.coder.to_node_or_subgraph(i: Id) NodeOrSubgraph
Create a DOT NodeOrSubgraph from an Id.