Files
defiQUG c052b07662
Some checks failed
Tests / test (3.10) (push) Has been cancelled
Tests / test (3.11) (push) Has been cancelled
Tests / test (3.12) (push) Has been cancelled
Tests / lint (push) Has been cancelled
Tests / docker (push) Has been cancelled
Initial commit: add .gitignore and README
2026-02-09 21:51:42 -08:00

39 lines
1.2 KiB
Python

"""Intent formalization schema: intent graph, requirement types, load cases."""
from enum import Enum
from typing import Any
from pydantic import BaseModel, Field
class RequirementType(str, Enum):
DIMENSIONAL = "dimensional"
LOAD = "load"
ENVIRONMENTAL = "environmental"
PROCESS = "process"
OTHER = "other"
class IntentNode(BaseModel):
node_id: str = Field(..., description="Unique intent node id")
requirement_type: RequirementType = Field(...)
description: str = Field(...)
bounds_ref: str | None = Field(default=None)
load_case_ids: list[str] = Field(default_factory=list)
metadata: dict[str, Any] = Field(default_factory=dict)
class LoadCase(BaseModel):
load_case_id: str = Field(...)
description: str = Field(...)
boundary_conditions_ref: str | None = Field(default=None)
metadata: dict[str, Any] = Field(default_factory=dict)
class EngineeringIntentGraph(BaseModel):
intent_id: str = Field(...)
nodes: list[IntentNode] = Field(default_factory=list)
load_cases: list[LoadCase] = Field(default_factory=list)
environmental_bounds: dict[str, Any] = Field(default_factory=dict)
metadata: dict[str, Any] = Field(default_factory=dict)