From ac94a543b1fcbf8f24453caab7261fc8b4876460 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 26 Jun 2026 12:35:01 +0000 Subject: [PATCH] =?UTF-8?q?Set=20main=5Fheating=20on=20the=20test=5Fvalida?= =?UTF-8?q?tion=20partial=20EPC=20builder=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The heating-donor display synthesis reads donor.epc.main_heating, which has no dataclass default — so a partial object.__new__ EpcPropertyData must set it. test_validation's _comparable builder didn't, failing the two leave-one-out scorer tests in CI (the full epc_prediction suite wasn't run pre-push). main_heating_controls / sap_ventilation default to None via class attributes. Co-Authored-By: Claude Opus 4.8 (1M context) --- tests/domain/epc_prediction/test_validation.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/domain/epc_prediction/test_validation.py b/tests/domain/epc_prediction/test_validation.py index 2cdad977..24fa0198 100644 --- a/tests/domain/epc_prediction/test_validation.py +++ b/tests/domain/epc_prediction/test_validation.py @@ -64,6 +64,10 @@ def _comparable( heating.cylinder_insulation_type = 1 heating.secondary_heating_type = None epc.sap_heating = heating + # Display heating rows the heating-donor synthesis carries (ADR-0029 + # follow-up); `main_heating` has no dataclass default, so a partial instance + # must set it. `main_heating_controls` / `sap_ventilation` default to None. + epc.main_heating = [] energy: SapEnergySource = object.__new__(SapEnergySource) energy.photovoltaic_supply = None energy.photovoltaic_arrays = None