mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
42 lines
1.1 KiB
Python
42 lines
1.1 KiB
Python
"""
|
|
This script will create an input csv for the recommendation engine and upload it to S3, which can be used for
|
|
testing
|
|
"""
|
|
import pandas as pd
|
|
from utils.s3 import save_csv_to_s3
|
|
|
|
USER_ID = 8
|
|
PORTFOLIO_ID = 57
|
|
|
|
|
|
def app():
|
|
"""
|
|
This portfolio is for testing windows recommendations
|
|
:return:
|
|
"""
|
|
|
|
test_file = pd.DataFrame(
|
|
[
|
|
{"address": "21 Butler House", "postcode": "E2 0PN", "Notes": None},
|
|
{"address": "22 Butler House", "postcode": "E2 0PN", "Notes": None},
|
|
{"address": "23 Butler House", "postcode": "E2 0PN", "Notes": None},
|
|
{"address": "24 Butler House", "postcode": "E2 0PN", "Notes": None},
|
|
]
|
|
)
|
|
|
|
# Store the data in s3
|
|
filename = f"{USER_ID}/{PORTFOLIO_ID}/no_epc.csv"
|
|
save_csv_to_s3(
|
|
dataframe=test_file,
|
|
bucket_name="retrofit-plan-inputs-dev",
|
|
file_name=filename
|
|
)
|
|
|
|
body = {
|
|
"portfolio_id": str(PORTFOLIO_ID),
|
|
"housing_type": "Social",
|
|
"goal": "Increase EPC",
|
|
"goal_value": "A",
|
|
"trigger_file_path": filename
|
|
}
|
|
print(body)
|