From ffc6f434d5aef7cfdfd4a58f1731d5665308c4b6 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Sat, 9 Aug 2025 19:26:44 +0100 Subject: [PATCH] handle b30k boiler --- backend/Funding.py | 11 ++++------- backend/tests/test_funding.py | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/backend/Funding.py b/backend/Funding.py index 8ae82d48..71499b4d 100644 --- a/backend/Funding.py +++ b/backend/Funding.py @@ -363,13 +363,10 @@ class Funding: # Doesnt have radiators return 'Gas Fire with Back Boiler' - if mainheating["has_boiler"] and (main_fuel["fuel_type"] == "oil") and ( - mainheat_energy_eff in ["Good", "Very Good"] - ): - return 'Condensing Oil Boiler' - if mainheating["has_boiler"] and (main_fuel["fuel_type"] == "oil") and ( - mainheat_energy_eff in ["Average", "Very Poor", "Poor"] - ): + if mainheating["has_boiler"] and (main_fuel["fuel_type"] in ["oil", "b30k"]): + # b30k - kerosene + if mainheat_energy_eff in ["Good", "Very Good"]: + return 'Condensing Oil Boiler' return 'Non Condensing Oil Boiler' if mainheating["has_boiler"] and (main_fuel["fuel_type"] == "lpg") and ( diff --git a/backend/tests/test_funding.py b/backend/tests/test_funding.py index f64089f7..4cfe3b5e 100644 --- a/backend/tests/test_funding.py +++ b/backend/tests/test_funding.py @@ -1076,7 +1076,7 @@ for _, x in tqdm(epc_df.iterrows(), total=len(epc_df)): errored_epcs = epc_df[epc_df["LMK_KEY"].isin(errors)] unique_combs = errored_epcs[["MAINHEAT_ENERGY_EFF", "MAINHEAT_DESCRIPTION", "MAIN_FUEL"]].drop_duplicates() -i = 0 +i = 1 x = errored_epcs[ (errored_epcs["MAINHEAT_ENERGY_EFF"] == unique_combs["MAINHEAT_ENERGY_EFF"].values[i]) & (errored_epcs["MAINHEAT_DESCRIPTION"] == unique_combs["MAINHEAT_DESCRIPTION"].values[i]) &