mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
The modelling_e2e cohort skipped ~35 real RdSAP-Schema-21.0.0 certs with "SapWindow: missing required field 'frame_factor'" (and a cascade of wet_rooms_count, the mechanical-vent duct block, wind_turbine_details, &c.). These are complete certs — the `RdSapSchema21_0_0` dataclass was simply modelled stricter than `RdSapSchema21_0_1`, which already treats every one of these fields as optional. This aligns 21.0.0's optionality with 21.0.1 (the proven path) so the certs map into the prediction donor pool instead of being dropped: - SapWindow: pvc_frame / glazing_gap / frame_factor / window_transmission_details → Optional (calc already falls back: Table 6c frame factor, SAP10 glazing lookup, type-only U). - 20 nested fields across Addendum / MainHeatingDetail / PhotovoltaicSupply / PvBatteries / SapBuildingPart / SapEnergySource → Optional, mirroring 21.0.1 verbatim (classes made kw_only so defaults sit in place; parsed only via from_dict, keyword construction). - from_rdsap_schema_21_0_0: guard the window_transmission_details dereference for None (mirrors the 21.0.1 `_api_sap_window` guard). Existing 21.0.0 certs are unaffected (relaxing optionality does not change parsing of certs that carry the fields); mapper-corpus + accuracy gates green. Verified end-to-end against real cohort cert 2205-3036-3484-0400-5718: maps + calculates (SAP 68). Regression test added. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| epc | ||
| __init__.py | ||
| datatypes.py | ||
| enums.py | ||