graph
— The graph
subcommand
Module for the graph
subcommand.
- class valjean.cambronne.commands.graph.GraphCommand[source]
Command class for the
build
subcommand.- static merge_graph_str(solid_graph, dashed_graph)[source]
Merge two strings representing graphviz graphs into one graph. The graphs are merged in such a way that the edges of solid_graph and dashed_graph are respectively represented as solid and dashed.
For example:
>>> print(solid_graph) digraph { node1 -> node2; node2 -> node3; } >>> print(dashed_graph) digraph { node1 -> node3; } >>> print(GraphCommand.merge_graph_str(solid_graph, dashed_graph)) digraph { subgraph G1 { node1 -> node2; node2 -> node3; } subgraph G2 { edge [style=dashed]; node1 -> node3; } }
- Parameters:
solid_graph (str) – a graph, as produced by
to_graphviz
.dashed_graph (str) – another graph, as produced by
to_graphviz
.
- Returns:
the merged graph.
- Return type: