diff --git a/etl/customers/immo/pilot/asset_list.py b/etl/customers/immo/pilot/asset_list.py index 269ffe00..7939a555 100644 --- a/etl/customers/immo/pilot/asset_list.py +++ b/etl/customers/immo/pilot/asset_list.py @@ -1,18 +1,7 @@ -import os - import pandas as pd -from tqdm import tqdm - -from dotenv import load_dotenv from utils.s3 import read_excel_from_s3 -from backend.SearchEpc import SearchEpc -from epc_api.client import EpcClient from utils.s3 import save_csv_to_s3 -# Read in the .env file in backend -load_dotenv(dotenv_path="backend/.env") -EPC_AUTH_TOKEN = os.getenv("EPC_AUTH_TOKEN") - USER_ID = 8 PORTFOLIO_ID = 70 @@ -28,6 +17,7 @@ council_tax_bands = [ {'address': '6 Beech Road', 'postcode': 'DY1 4BP', 'band': 'A'}, {'address': '5 Oaklands', 'postcode': 'B62 0JA', 'band': 'A'}, ] +council_tax_bands = pd.DataFrame(council_tax_bands) def app(): @@ -41,7 +31,6 @@ def app(): raw_asset_list["address"] = raw_asset_list["Full Address"].str.split(",").str[0] raw_asset_list["postcode"] = raw_asset_list["Full Address"].str.split(",").str[-1].str.strip() - council_tax_bands = pd.DataFrame(council_tax_bands) asset_list = raw_asset_list.merge(council_tax_bands, how="left", on=["address", "postcode"]) # Store the data in s3 diff --git a/recommendations/optimiser/optimiser_functions.py b/recommendations/optimiser/optimiser_functions.py index 27838d6e..9860c5ea 100644 --- a/recommendations/optimiser/optimiser_functions.py +++ b/recommendations/optimiser/optimiser_functions.py @@ -20,10 +20,6 @@ def prepare_input_measures(property_recommendations, goal, housing_type): if not goal_key: raise NotImplementedError("Not implemented this gain type - investigate me") - # We don't include suspended and solid floor insulation as possible measures in private housing, because - # of the need to decant the tenant - ignored_measures = ["suspended_floor_insulation", "solid_floor_insulation"] if housing_type == "Private" else [] - input_measures = [] for recs in property_recommendations: input_measures.append( @@ -34,7 +30,7 @@ def prepare_input_measures(property_recommendations, goal, housing_type): "gain": rec[goal_key], "type": rec["type"] } - for rec in recs if rec["type"] not in ignored_measures + for rec in recs ] )