Skip to main content
Version: latest

agrag.common.data_models.candidate_review.SchemaPatch

Bases: BaseModel

A deterministic schema change set and its approved candidate ids.

Attributes:

  • readme (str) – Instructions for applying the patch.
  • patch_format (Literal[1]) – Patch format version.
  • patch_id (str) – Stable identifier derived from the base schema and candidates.
  • created_at (datetime) – Time the patch was planned.
  • base_schema (PatchBase) – Schema identity and fingerprint used for planning.
  • additions (dict[str, list[dict[str, Any]]]) – Entity and relation additions or relation pattern expansions.
  • add_properties (list[PatchProperty]) – Property definitions to add.
  • evidence (dict[str, int]) – Aggregate sightings keyed by planned schema change.
  • candidate_ids (list[UUID]) – Approved candidate ids represented in the patch.

add_properties​

add_properties: list[PatchProperty] = Field(default_factory=list)

additions​

additions: dict[str, list[dict[str, Any]]] = Field(default_factory=lambda: {'entities': [], 'relations': []})

base_schema​

base_schema: PatchBase

candidate_ids​

candidate_ids: list[UUID] = Field(default_factory=list)

created_at​

created_at: datetime

evidence​

evidence: dict[str, int] = Field(default_factory=dict)

patch_format​

patch_format: Literal[1] = PATCH_FORMAT

patch_id​

patch_id: str

readme​

readme: str = PATCH_README