from __future__ import annotations from abc import ABC, abstractmethod from typing import Any, Optional class SolarRepository(ABC): """Persists and loads a UPRN's Google Solar building insights. Thin save/get over the raw fetched insights (a future SolarPotential domain type will derive its fields from these). Written by Ingestion, read by Baseline/Modelling — never re-fetched downstream (ADR-0003). Keyed by ``uprn`` to match the live ``solar`` table; ``longitude``/``latitude`` are the coordinates the fetch was made against (NOT NULL on the live table). """ @abstractmethod def save( self, uprn: int, *, longitude: float, latitude: float, insights: dict[str, Any] ) -> None: ... @abstractmethod def get(self, uprn: int) -> Optional[dict[str, Any]]: ...