From 042fbea083d727109152465f2d80be4789c2c01a Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Wed, 11 Oct 2023 20:55:36 +0800 Subject: [PATCH] added some restrictions on creation of file input --- etl/testing_data/engine_inputs.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/etl/testing_data/engine_inputs.py b/etl/testing_data/engine_inputs.py index 8331a90b..416247d3 100644 --- a/etl/testing_data/engine_inputs.py +++ b/etl/testing_data/engine_inputs.py @@ -9,10 +9,10 @@ import pandas as pd from epc_api.client import EpcClient from utils.s3 import save_csv_to_s3 -FILE_SIZE = 100 +FILE_SIZE = 250 EPC_AUTH_TOKEN = os.getenv("EPC_AUTH_TOKEN", None) -USER_ID = 2 -PORTFOLIO_ID = 47 +USER_ID = 8 +PORTFOLIO_ID = 48 def app(): @@ -48,6 +48,14 @@ def app(): + a_data["rows"] ) + # TODO: We also take homes with just a specific type of wall + + final_data = [ + x for x in final_data if ("cavity wall" in x["walls-description"].lower()) or ( + "solid brick" in x["walls-description"].lower() + ) or ("average thermal transmittance" in x["walls-description"].lower()) + ] + # TODO: For the moment, don't use park homes final_csv_data = pd.DataFrame( [{"address": x["address"], "postcode": x["postcode"], "Notes": None} for x