From 304e8afb001633ed7792eb2f9d697b92bf85397f Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Thu, 25 Jun 2026 20:53:22 +0000 Subject: [PATCH] =?UTF-8?q?Map=20assessment=5Ftype=20on=20full-SAP=20certs?= =?UTF-8?q?=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- datatypes/epc/domain/mapper.py | 1 + datatypes/epc/schema/sap_schema_17_1.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/datatypes/epc/domain/mapper.py b/datatypes/epc/domain/mapper.py index 5f9e7231..97ae3739 100644 --- a/datatypes/epc/domain/mapper.py +++ b/datatypes/epc/domain/mapper.py @@ -734,6 +734,7 @@ class EpcPropertyDataMapper: door_count, insulated_door_u = _sap_door_aggregates(schema) return EpcPropertyData( uprn=schema.uprn, + assessment_type=schema.assessment_type, # SAP 2012 (~9.92) for this family — carried so CalculatorRebaseliner # fires trigger (a) (sap_version < 10.2 → Effective = the SAP-10.2 # calc) instead of keeping the lodged SAP-2012 score (ADR-0037). diff --git a/datatypes/epc/schema/sap_schema_17_1.py b/datatypes/epc/schema/sap_schema_17_1.py index 8a0b2220..5105ec8c 100644 --- a/datatypes/epc/schema/sap_schema_17_1.py +++ b/datatypes/epc/schema/sap_schema_17_1.py @@ -213,6 +213,8 @@ class SapSchema17_1: # cert has no secondary. Read by the calculator's cert_to_inputs — dropping # it under-counts a real secondary heater (ADR-0037). secondary_heating: Optional[EnergyElement] = None + # "SAP" for this family (vs "RdSAP"); carried for provenance / the panel. + assessment_type: Optional[str] = None # measured living-room area (m²); the engine consumes it via a back-solved # habitable_rooms_count (Table 27). Optional — 100% present in the corpus. living_area: Optional[Union[int, float]] = None