Resolve a landlord double-glazing override to its glazing code 🟩

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jun-te Kim 2026-06-19 13:19:02 +00:00
parent f1c6825cae
commit 0fb86771dd

View file

@ -14,10 +14,19 @@ from __future__ import annotations
from typing import Optional
from domain.modelling.simulation import EpcSimulation
from domain.modelling.simulation import EpcSimulation, GlazingOverlay
# Canonical glazing description → SAP10 glazing-type code (the Table 24 /
# `u_window` cascade enum, `_GLAZING_CODE_TO_UWINDOW` in heat_transmission).
_GLAZING_CODES: dict[str, int] = {
"Double glazing, 2002 or later": 2,
}
def glazing_overlay_for(
glazing_value: str, building_part: int
) -> Optional[EpcSimulation]:
raise NotImplementedError
code = _GLAZING_CODES.get(glazing_value)
if code is None:
return None
return EpcSimulation(glazing=GlazingOverlay(glazing_type=code))