Package epydoc :: Package docwriter :: Module dotgraph
[hide private]
[frames] | no frames]

Module dotgraph

source code

Render Graphviz directed graphs as images. Below are some examples.

Import Graph
Import Graph

Class Hierarchy for apidoc.APIDoc
Class Hierarchy for apidoc.APIDoc

Package Tree for epydoc
Package Tree for epydoc




See Also: The Graphviz Homepage

Classes [hide private]
    Dot Graphs
  DotGraph
A dot directed graph.
  DotGraphNode
  DotGraphEdge
    Specialized Nodes for UML Graphs
  DotGraphUmlClassNode
A specialized dot graph node used to display ClassDocs using UML notation.
  DotGraphUmlModuleNode
A specialized dot grah node used to display ModuleDocs using UML notation.
Functions [hide private]
    Graph Generation Functions
 
package_tree_graph(packages, linker, context=True, **options)
Return a DotGraph that graphically displays the package hierarchies for the given packages.
source code
call graph 
 
uml_package_tree_graph(packages, linker, context=True, **options)
Return a DotGraph that graphically displays the package hierarchies for the given packages as a nested set of UML symbols.
source code
call graph 
 
class_tree_graph(bases, linker, context=True, **options)
Return a DotGraph that graphically displays the package hierarchies for the given packages.
source code
call graph 
 
uml_class_tree_graph(class_doc, linker, context=True, **options)
Return a DotGraph that graphically displays the class hierarchy for the given class, using UML notation.
source code
call graph 
 
import_graph(modules, docindex, linker, context=True, **options) source code
call graph 
 
call_graph(api_docs, docindex, linker, context=True, **options) source code
    Dot Version
 
get_dot_version() source code
call graph 
    Helper Functions
 
add_valdoc_nodes(graph, val_docs, linker, context) source code
call graph 
 
specialize_valdoc_node(node, val_doc, context, url)
Update the style attributes of node to reflext its type and context.
source code
call graph 
 
name_list(api_docs, context=True) source code
call graph 
Variables [hide private]
  MODULE_BG = '#d8e8ff'
  CLASS_BG = '#d8ffe8'
  SELECTED_BG = '#ffd0d0'
  BASECLASS_BG = '#e0b0a0'
  SUBCLASS_BG = '#e0b0a0'
  ROUTINE_BG = '#e8d0b0'
  INH_LINK_COLOR = '#800000'
    Dot Graphs
  DOT_COMMAND = 'dot'
The command that should be used to spawn dot
    Dot Version
  _dot_version = True
  _DOT_VERSION_RE = re.compile(r'dot version ([\d\.]+)')
    Helper Functions
  NOOP_URL = 'javascript: void(0);'
  MODULE_NODE_HTML = '<TABLE BORDER="0" CELLBORDER="0" CELLSPACI...
Function Details [hide private]

uml_class_tree_graph(class_doc, linker, context=True, **options)

source code 
call graph 

Return a DotGraph that graphically displays the class hierarchy for the given class, using UML notation. Options:

  • max_attributes
  • max_operations
  • show_private_vars
  • show_magic_vars
  • link_attributes

call_graph(api_docs, docindex, linker, context=True, **options)

source code 
Parameters:
  • options -
    • dir: rankdir for the graph. (default=LR)
    • add_callers: also include callers for any of the routines in api_docs. (default=False)
    • add_callees: also include callees for any of the routines in api_docs. (default=False)

To Do: Add an exclude option?

add_valdoc_nodes(graph, val_docs, linker, context)

source code 
call graph 

To Do: Use different node styles for different subclasses of APIDoc


Variables Details [hide private]

MODULE_NODE_HTML

Value:
'''<TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0"
         CELLPADDING="0" PORT="table" ALIGN="LEFT">
  <TR><TD ALIGN="LEFT" VALIGN="BOTTOM" HEIGHT="8" WIDTH="16" FIXEDSIZE\
="true"
          BGCOLOR="%s" BORDER="1" PORT="tab"></TD></TR>
  <TR><TD ALIGN="LEFT" VALIGN="TOP" BGCOLOR="%s" BORDER="1"
          PORT="body" HREF="%s" TOOLTIP="%s">%s</TD></TR>
  </TABLE>'''