Map mechanical_ventilation_kind in the 3 bare-SapVentilation RdSAP mappers 🟩

17.1/18.0/20.0.0 built SapVentilation(sheltered_sides=…) and dropped the cert's
mechanical_ventilation, mis-scoring MEV/MVHR dwellings as natural. Mirror 21.0.1's
_api_mechanical_ventilation_kind. Natural certs (code 0/5 → None) unchanged
(corpus 73.3%/0.774, mapper corpus green, 726605 SAP 68.058 unchanged).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-06-26 08:44:37 +00:00
parent debbbb84f2
commit e770c876ea

View file

@ -1094,6 +1094,9 @@ class EpcPropertyDataMapper:
# ADR-0028: sheltered_sides from built_form, else the calculator
# assumes mid-terrace (2) for every dwelling.
sap_ventilation=SapVentilation(
mechanical_ventilation_kind=_api_mechanical_ventilation_kind(
schema.mechanical_ventilation
),
sheltered_sides=_api_sheltered_sides(schema.built_form),
),
# ADR-0028: total + low-energy OUTLET counts, not a bulb split.
@ -1292,6 +1295,9 @@ class EpcPropertyDataMapper:
# ADR-0028: sheltered_sides must come from built_form, else the
# calculator assumes mid-terrace (2) for every dwelling.
sap_ventilation=SapVentilation(
mechanical_ventilation_kind=_api_mechanical_ventilation_kind(
schema.mechanical_ventilation
),
sheltered_sides=_api_sheltered_sides(schema.built_form),
),
# ADR-0028: 18.0 gives total + low-energy OUTLET counts, not an
@ -1746,6 +1752,9 @@ class EpcPropertyDataMapper:
# them via RdSAP Table 5), but sheltered_sides must come from
# built_form — else the calculator assumes mid-terrace (2) for all.
sap_ventilation=SapVentilation(
mechanical_ventilation_kind=_api_mechanical_ventilation_kind(
schema.mechanical_ventilation
),
sheltered_sides=_api_sheltered_sides(schema.built_form),
),
# ADR-0027: 20.0.0 gives total + low-energy OUTLET counts, not an