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.
- Edge
Data - Edge data stored as edge weights in petgraph.
- Node
- A node in the code graph representing a code entity.
- Node
Metadata - Optional metadata for code entities.
- PetCode
Graph - A petgraph-based code graph for efficient traversal and graph algorithms.
Enums§
- Callable
Kind - Kinds of Callable nodes - executable code entities.
- Container
Kind - Kinds of Container nodes - structural organization entities.
- Data
Kind - Kinds of Data nodes - state and value entities.
- Edge
Type - Types of relationships between code entities.
- Node
Kind - Unified kind enum that can represent any node kind.
- Node
Type - 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.