Module graph

Module graph 

Source
Expand description

Graph Schema Definitions for Code Graph Model v2

This module defines the schema for the Container/Callable/Data node model with declarative tag-based categorization and semantic metadata.

Schema Version: 2.0

This module provides the PetCodeGraph implementation using petgraph for efficient traversal and graph algorithms.

Structs§

Edge
An edge in the code graph representing a relationship between nodes.
EdgeData
Edge data stored as edge weights in petgraph.
Node
A node in the code graph representing a code entity.
NodeMetadata
Optional metadata for code entities.
PetCodeGraph
A petgraph-based code graph for efficient traversal and graph algorithms.

Enums§

CallableKind
Kinds of Callable nodes - executable code entities.
ContainerKind
Kinds of Container nodes - structural organization entities.
DataKind
Kinds of Data nodes - state and value entities.
EdgeType
Types of relationships between code entities.
NodeKind
Unified kind enum that can represent any node kind.
NodeType
High-level node type classification.

Constants§

GRAPH_SCHEMA_VERSION
Schema version constant

Functions§

get_node_type_from_kind
Determine the node type from a kind value.
parse_callable_kind
Parse a kind string into CallableKind
parse_container_kind
Parse a kind string into the appropriate Kind enum
parse_data_kind
Parse a kind string into DataKind
validate_node_kind
Validate that a kind value is valid for the given node type.