Model/datatypes/epc/domain
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 Merge pull request #1507 from Hestia-Homes/worktree-rdsap-glazing-cascade-fix 2026-07-08 15:27:18 +01:00
__init__.py fix broken imports and rename mapper class 2026-04-13 16:36:13 +00:00
epc.py feat(modelling): Epc.sap_lower_bound() — band → minimum SAP (#1160) 2026-06-03 12:50:40 +00:00
epc_codes.csv slice 8a: window physics and orientation aggregates 2026-05-16 15:32:45 +00:00
epc_property_data.py rename mains_gas to gas_connection_available 2026-07-01 10:50:58 +00:00
field_mappings.py Gate community-heated dwellings from HHRSH recommendation 🟥 2026-07-01 14:13:57 +00:00
historic_epc.py demo generated for use in address2uprn 2026-05-08 14:48:15 +00:00
historic_epc_matching.py Map shard rows to HistoricEpc field-by-field so every column is pyright-checked 🟩 2026-07-04 14:58:09 +00:00
mapper.py Make RdSapSchema21_0_1.built_form optional — some real certs omit it entirely 2026-07-09 11:24:43 +00:00