""" This script will create an input csv for the recommendation engine and upload it to S3, which can be used for testing """ import os import pandas as pd from utils.s3 import save_csv_to_s3 EPC_AUTH_TOKEN = os.getenv("EPC_AUTH_TOKEN", None) USER_ID = 8 PORTFOLIO_ID = 61 def app(): pilot_file = pd.DataFrame( [ {"address": "42, Foxes Field", "postcode": "TR18 3RJ", "Notes": None}, {"address": "11, Cranley Gardens", "postcode": "TQ13 8UT", "Notes": None}, ] ) # Store the data in s3 filename = f"{USER_ID}/{PORTFOLIO_ID}/livewest_pilot_file.csv" save_csv_to_s3( dataframe=pilot_file, bucket_name="retrofit-plan-inputs-dev", file_name=filename ) body = { "portfolio_id": str(PORTFOLIO_ID), "housing_type": "Social", "goal": "Increase EPC", "goal_value": "C", "trigger_file_path": filename } print(body)