From e770c876ea6164021dfb7e89a428e72d668b7c86 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 26 Jun 2026 08:44:37 +0000 Subject: [PATCH] =?UTF-8?q?Map=20mechanical=5Fventilation=5Fkind=20in=20th?= =?UTF-8?q?e=203=20bare-SapVentilation=20RdSAP=20mappers=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- datatypes/epc/domain/mapper.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/datatypes/epc/domain/mapper.py b/datatypes/epc/domain/mapper.py index 51ab939b..8f55db80 100644 --- a/datatypes/epc/domain/mapper.py +++ b/datatypes/epc/domain/mapper.py @@ -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