debugging heatingsource code

This commit is contained in:
Khalim Conn-Kowlessar 2024-08-05 17:11:53 +01:00
parent 6645218563
commit 3c65d1639a
2 changed files with 3 additions and 3 deletions

View file

@ -1293,7 +1293,7 @@ class Property:
fuel for key, fuel in heating_fuel_mapping.items() if self.main_heating.get(key, False)
]
if len(self.heating_energy_source) == 0 or len(self.heating_energy_source) > 1:
raise Exception("Investigate em")
raise Exception("Investigate me")
self.heating_energy_source = self.heating_energy_source[0]
@ -1301,7 +1301,7 @@ class Property:
self.hot_water_energy_source = heater_type_to_fuel[self.hotwater["heater_type"]]
else:
fuel = system_type_modification[self.hotwater["system_type"]]
if fuel == 'Main System':
if fuel in ['Main System', "Community Scheme"]:
self.hot_water_energy_source = self.heating_energy_source
else:
raise Exception("Investiage me")

View file

@ -452,7 +452,7 @@ async def trigger_plan(body: PlanTriggerRequest):
# We need to prepare the EPC so it's in the same format as the training data
logger.info("Getting spatial data")
for p in input_properties:
for p in tqdm(input_properties):
p.get_components(cleaned=cleaned, energy_consumption_client=energy_consumption_client)
p.get_spatial_data(uprn_filenames)