Adding return for HA25

This commit is contained in:
Khalim Conn-Kowlessar 2024-03-07 12:58:29 +00:00
parent b09bd63b53
commit 961b53d523

View file

@ -479,7 +479,7 @@ class DataLoader:
# lists, and so
# we can return the asset list now
if ha_name in ["HA1"]:
return asset_list, pd.DataFrame(), pd.DataFrame()
return asset_list, pd.DataFrame(), pd.DataFrame(), pd.DataFrame()
# If we have ECO3 surveys, we need to match them, because any properties treated under ECO3 won't be
# suitable under ECO4, since their walls will be filled
@ -504,6 +504,10 @@ class DataLoader:
# Perform the eco3 merge
eco3_list = self.merge_eco3_to_assets(asset_list, eco3_list, ha_name)
if ha_name in ["HA25"]:
# Accomodate ha25 unique structure
return asset_list, pd.DataFrame(), pd.DataFrame(), eco3_list
# We check if there is a survey list
survey_sheetname = self.get_survey_sheetname(workbook)
survey_sheet = workbook[survey_sheetname]
@ -1592,7 +1596,7 @@ class DataLoader:
# Merge onto eco3 list
eco3_list = eco3_list.merge(matching_lookup, how="left", on="eco3_list_row_id")
asset_list = asset_list.drop(columns=["matching_address_no_punctuation"])
asset_list.drop(columns=["matching_address_no_punctuation"], inplace=True)
return eco3_list
@ -1756,7 +1760,7 @@ class DataLoader:
continue
# Load asset list
logger.info("Loading data for {}".format(ha_name))
asset_list, survey_list, ciga_list = self.load_asset_list(
asset_list, survey_list, ciga_list, eco3_list = self.load_asset_list(
filepath=filepath,
ha_name=ha_name,
)
@ -1764,7 +1768,8 @@ class DataLoader:
data[ha_name] = {
"asset_list": asset_list,
"survey_list": survey_list,
"ciga_list": ciga_list
"ciga_list": ciga_list,
"eco3_list": eco3_list
}
self.data = data