dpg.utils#

Functions#

highlight_class_node(dot[, dpg_config])

Highlights nodes in the Graphviz Digraph that contain "Class" in their identifiers by changing their fill color

change_node_color(graph, node_id, new_color)

Changes the fill color of a specified node in the Graphviz Digraph.

delete_folder_contents(folder_path)

Deletes all contents of the specified folder.

Module Contents#

dpg.utils.highlight_class_node(dot, dpg_config=None)[source]#

Highlights nodes in the Graphviz Digraph that contain “Class” in their identifiers by changing their fill color and adding a rounded shape.

Args: dot: A Graphviz Digraph object. dpg_config: Optional DPG config dict (from DecisionPredicateGraph)

Returns: dot: The modified Graphviz Digraph object with the class nodes highlighted.

dpg.utils.change_node_color(graph, node_id, new_color)[source]#

Changes the fill color of a specified node in the Graphviz Digraph.

Args: graph: A Graphviz Digraph object. node_id: The identifier of the node whose color is to be changed. new_color: The new color to be applied to the node.

Returns: None

dpg.utils.delete_folder_contents(folder_path)[source]#

Deletes all contents of the specified folder.

Args: folder_path: The path to the folder whose contents are to be deleted.

Returns: None