Model/datatypes/epc/schema
Jun-te Kim 460058d970 Make RdSapSchema21_0_1.built_form optional — some real certs omit it entirely
Some gov-API RdSAP-21.0.1 certs (e.g. 2461-5385-9264-6821-5357, property_id=750232,
portfolio 824) omit `built_form` from the response entirely rather than sending a
code. `from_dict` hard-fails any dataclass field with no default that's absent
from the raw dict, so the whole cert failed to parse.

built_form: Optional[int] = None (kw_only, matching the has_fixed_air_conditioning
precedent already on this dataclass) — the downstream SAP-cascade consumer
(_api_sheltered_sides) already treats a non-int built_form as "no lodging" and
falls back to the documented default, so None here is an already-safe
degradation, not a new failure mode. Also guards mapper.py's
`built_form=str(schema.built_form)` against stringifying None into "None".

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 11:24:43 +00:00
..
tests Make RdSapSchema21_0_1.built_form optional — some real certs omit it entirely 2026-07-09 11:24:43 +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