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

Class Hierarchy for apidoc.APIDoc

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=None, **options) Return a DotGraph that graphically displays the package hierarchies for the given packages. | source code call graph

Call Graph

uml_package_tree_graph(packages, linker, context=None, **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

Call Graph

class_tree_graph(bases, linker, context=None, **options) Return a DotGraph that graphically displays the class hierarchy for the given classes. | source code call graph

Call Graph

uml_class_tree_graph(class_doc, linker, context=None, **options) Return a DotGraph that graphically displays the class hierarchy for the given class, using UML notation. | source code call graph

Call Graph

import_graph(modules, docindex, linker, context=None, **options) | source code call graph

Call Graph

call_graph(api_docs, docindex, linker, context=None, **options) | source code

Dot Version

get_dot_version() | source code call graph

Call Graph

Helper Functions

add_valdoc_nodes(graph, val_docs, linker, context) | source code call graph

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

Call Graph

name_list(api_docs, context=None) | source code call graph

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 = `None`
| _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]

### class_tree_graph(bases, linker, context=None, **options)

source code
call graph

Call Graph

Return a DotGraph that graphically displays the class hierarchy for the given classes. Options:

> - exclude
> - dir: LR|RL|BT requests a left-to-right, right-to-left, or bottom-to- top, drawing. (corresponds to the dot option 'rankdir'

### uml_class_tree_graph(class_doc, linker, context=None, **options)

source code
call graph

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=None, **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

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>'''