pydevDAG._display module

pydevDAG._display

Tools to display graphs of various kinds.

class pydevDAG._display.AddedEdgeTransformer

Bases: pydevDAG._display.GraphTransformer

Decorate added edges.

classmethod objects(graph)
static xform_object(graph, obj)
class pydevDAG._display.AddedNodeTransformer

Bases: pydevDAG._display.GraphTransformer

Decorate added nodes.

classmethod objects(graph)
static xform_object(graph, obj)
class pydevDAG._display.CongruenceEdgeTransformer

Bases: pydevDAG._display.GraphTransformer

Make congruence edges dotted.

classmethod objects(graph)
static xform_object(graph, obj)
class pydevDAG._display.GraphTransformer

Bases: object

Abstract superclass of graph transformers.

classmethod objects(graph)

Locate the objects to transform.

Parameters:graph (AGraph) – the graph
Returns:an iterable of objects
Return type:iterable
classmethod xform(graph)

Do the transformation.

Parameters:graph (AGraph) – the graph
static xform_object(graph, obj)

Transform obj.

Parameters:
  • graph (AGraph) – the graph
  • obj – the object to transform
class pydevDAG._display.GraphTransformers

Bases: object

A class that orders and does all graph transformations.

static xform(graph, klasses)

Transform a graph for more helpful viewing.

Parameters:
  • graph (A_Graph) – the networkx graph
  • klasses (list of GraphTransformer) – a list of transformation classes
class pydevDAG._display.HTMLUtils

Bases: object

A class to handle HTML generation for HTML-style labels.

static make_table(rows)

Make an HTML table from a list of rows.

Parameters:rows (list of str) – a list of rows as <td>...</td> strings
Returns:HTML sring designating a table
Return type:str
static set_html_label(node, label)

Set an html label on a node.

Parameters:
  • node (Node) – the node
  • label (str) – the label
class pydevDAG._display.PartitionEdgeTransformer

Bases: pydevDAG._display.GraphTransformer

Make partition edges dashed.

classmethod objects(graph)
static xform_object(graph, obj)
class pydevDAG._display.PartitionTransformer

Bases: pydevDAG._display.GraphTransformer

Transforms nodes that are partitions.

Sets node label to device name rather than device path. Sets node shape to rectangle.

classmethod objects(graph)
static xform_object(graph, obj)
class pydevDAG._display.PartitionedDiskTransformer

Bases: pydevDAG._display.GraphTransformer

Transforms a partitioned disk into a partitioned node.

Does not do anything if the disk has no partitions or if some non-partition edges point to any partitions.

classmethod objects(graph)
static xform_object(graph, obj)
class pydevDAG._display.RemovedEdgeTransformer

Bases: pydevDAG._display.GraphTransformer

Decorate removed edges.

classmethod objects(graph)
static xform_object(graph, obj)
class pydevDAG._display.RemovedNodeTransformer

Bases: pydevDAG._display.GraphTransformer

Decorate removed nodes.

classmethod objects(graph)
static xform_object(graph, obj)
class pydevDAG._display.SpindleTransformer

Bases: pydevDAG._display.GraphTransformer

Make every actual physical spindle an octagon.

classmethod objects(graph)
static xform_object(graph, obj)
class pydevDAG._display.Utils

Bases: object

General utilities for graph transformations.

static copy_attr(attr)

Copy attr object to a dict of keys and values.

Parameters:attr – the attributes oject
Returns:a dict of attributes
Return type:dict
static get_attr(ele, keys)

Resolve the value of keys on ele.

Since any nested values end up as simple strings, need to evaluate the resulting string to get an actual dict.

Parameters:
  • ele (a Node or Edge) – a graph element
  • keys (list of str) – a list of keys
Returns:

the result of reading from the nested dicts or None

Return type:

str or NoneType

static is_diff_status(ele, diff_status)

Whether ele has diff status diff_status.

Parameters:ele – the graph element
Returns:True if ele has status diff_status, otherwise False
Return type:bool
static is_edge_type(edge, edge_type)

Whether edge has type edge_type.

Parameters:
  • edge (agraph.Edge) – the edge
  • edge_type (EdgeType) – an edge type
Returns:

True if edge has type edge_type, otherwise False

Return type:

bool

static is_node_type(node, node_type)

Whether node has type node_type.

Parameters:
  • node (agraph.Edge) – the node
  • node_type (EdgeType) – an node type
Returns:

True if node has type node_type, otherwise False

Return type:

bool

Table Of Contents

Previous topic

pydevDAG._compare module

Next topic

pydevDAG._graphs module

This Page