mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Move the EpcClientService package (client + _retry + exceptions + tests) from the dying backend/ tree to infrastructure/epc_client/ as the New-EPC-API Fetcher; update the two callers (address2UPRN, a script). All 14 client tests pass. Add SolarRepository port + SolarPostgresRepository persisting Google Solar building insights as JSONB (solar_building_insights table), one row per Property. The EPC repo half of this slice already landed in #1129. pyright strict clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
19 lines
624 B
Python
19 lines
624 B
Python
from __future__ import annotations
|
|
|
|
from abc import ABC, abstractmethod
|
|
from typing import Any, Optional
|
|
|
|
|
|
class SolarRepository(ABC):
|
|
"""Persists and loads a Property'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).
|
|
"""
|
|
|
|
@abstractmethod
|
|
def save(self, property_id: int, insights: dict[str, Any]) -> None: ...
|
|
|
|
@abstractmethod
|
|
def get(self, property_id: int) -> Optional[dict[str, Any]]: ...
|