Model/datatypes/epc/schema
Jun-te Kim 4f9bec7a4a Derive has_hot_water_cylinder from cylinder_size when the 16.x-family cert omits it
Task b9fcd354-2a33-4fc4-a64e-388c060a055c (portfolio 824 / scenario 1278)
also failed property_id 749229 (UPRN 100010349400) with "RdSapSchema17_1:
missing required field 'has_hot_water_cylinder'". Cert
9568-3034-6211-6089-5960 (SAP-Schema-15.0) lodges `sap_heating.cylinder_size`
but omits the separate top-level `has_hot_water_cylinder` boolean
RdSapSchema17_1 also requires.

Unlike `multiple_glazed_proportion` (deliberately left un-defaulted a few
lines above — a prior guessed default regressed the accuracy gate),
`cylinder_size` isn't a proxy needing inference: RdSAP 10 Table 28 defines
code 1 as "no cylinder" — literally the same fact `has_hot_water_cylinder`
encodes. Confirmed 1:1 across every real 15.0/16.x fixture that lodges both
fields (cylinder_size == 1 <-> false, every other code <-> true).

Added to the shared `_normalize_sap_schema_16_x`, so it covers the whole
15.0/16.0/16.1/16.2/16.3 reduced-field family, not just 15.0.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-10 11:48:12 +00:00
..
tests Derive has_hot_water_cylinder from cylinder_size when the 16.x-family cert omits it 2026-07-10 11:48:12 +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