mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
created test file for no epc
This commit is contained in:
parent
d1c40ff7dc
commit
bb9b8308be
1 changed files with 42 additions and 0 deletions
42
etl/testing_data/no_epc_input.py
Normal file
42
etl/testing_data/no_epc_input.py
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
"""
|
||||
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)
|
||||
Loading…
Add table
Reference in a new issue