Domain

Domain Model

The domain model is a conceptual model of the domain that incorporates both behavior and data.

We use it to define the core data classes that are used throughout the project.

Graph

class Graph(edges: Set[codoc.domain.model.Dependency], nodes: Set[codoc.domain.model.Node])

A Graph is the base element of the system. It contains both edges (Dependencies) as well as nodes (classes, functions, etc).

It supports a variety of operators.

edges: Set[codoc.domain.model.Dependency]
nodes: Set[codoc.domain.model.Node]

Node

class Node(identifier: str, name: str, of_type: codoc.domain.model.NodeType, path: Optional[str], args: Optional[Tuple[str, ]], lines: Optional[Tuple[int, int]], external: bool = True, description: Optional[str] = None, parent_identifier: Optional[str] = None)

Nodes represents a given source code item, i.e a class, function or module.

It contains all the meta data as well as the code that defined the node in question.

Node Type

class NodeType(value)

An enumeration.

Dependency

class Dependency(from_node: str, to_node: str)

A Dependency shows that one node depends on another. Currently it doesn’t specify the type of dependency.