Model/datatypes/epc/schema
Jun-te Kim c9fc2c6baf Map SAP-Schema-15.0 certs (LIG-lodged, 2011-era reduced-field RdSAP shape)
Task a40e71c4-fd56-4a33-8677-e8643e6a5bb4 (portfolio 824, scenario 1278)
failed 2 of 29 properties with "Unsupported EPC schema: 'SAP-Schema-15.0'"
(property_id 748445/748451). Traced to two real 2011 lodgements
(schema_version "LIG-15.0", assessment_type "RdSAP") for UPRNs
100010359769/100010359788 — structurally the same reduced-field RdSAP-17.1
shape as the already-handled SAP-Schema-16.x family, one revision older.

from_sap_schema_15_0 reuses _normalize_sap_schema_16_x and adds three
schema-wide defaults this older generation never lodges at all (confirmed
absent on both real certs, not just sparse on one):
  - door_count=1 (single external door, standard RdSAP assumption)
  - instantaneous_wwhrs=0/0/0 and has_fghrs="N" (predates WWHRS/FGHRS
    lodging — absence-means-none-fitted, same convention used elsewhere)
  - percent_draughtproofed=0 (mirrors the existing has_draught_lobby
    "assume none if unknown" convention in cert_to_inputs.py)
  - energy_rating_average=60 (inert metadata, never read by the calculator)

Both real certs now map and run end-to-end through the SAP-10 engine,
matching (or within 1 point of) their lodged SAP score.
2026-07-09 18:30:08 +00:00
..
tests Map SAP-Schema-15.0 certs (LIG-lodged, 2011-era reduced-field RdSAP shape) 2026-07-09 18:30:08 +00:00
__init__.py first draft dataclasses with loading tests 2026-04-10 11:33:17 +00:00
common.py first draft dataclasses with loading tests 2026-04-10 11:33:17 +00:00
helpers.py slice 10.5: PhotovoltaicArray on SAP10 schema + EpcPropertyData 2026-05-16 16:00:25 +00:00
rdsap_schema_17_0.py Make nested SapHeating.has_fixed_air_conditioning optional across all RdSAP schemas 2026-07-03 13:09:17 +00:00
rdsap_schema_17_1.py Make nested SapHeating.has_fixed_air_conditioning optional across all RdSAP schemas 2026-07-03 13:09:17 +00:00
rdsap_schema_18_0.py Make nested SapHeating.has_fixed_air_conditioning optional across all RdSAP schemas 2026-07-03 13:09:17 +00:00
rdsap_schema_19_0.py Make nested SapHeating.has_fixed_air_conditioning optional across all RdSAP schemas 2026-07-03 13:09:17 +00:00
rdsap_schema_20_0_0.py Make nested SapHeating.has_fixed_air_conditioning optional across all RdSAP schemas 2026-07-03 13:09:17 +00:00
rdsap_schema_21_0_0.py Make nested SapHeating.has_fixed_air_conditioning optional across all RdSAP schemas 2026-07-03 13:09:17 +00:00
rdsap_schema_21_0_1.py Make RdSapSchema21_0_1.built_form optional — some real certs omit it entirely 2026-07-09 11:24:43 +00:00
sap_schema_17_1.py Full-SAP certs carry their lodged PV export-capability flag 🟩 2026-07-03 12:09:04 +00:00