import pandas as pd
from utils.s3 import save_csv_to_s3

USER_ID = 8
PORTFOLIO_ID = 81


def app():
    asset_list = [
        {
            'uprn': 10070868263,
            "address": "Apartment 307, Flint Glass Wharf",
            "postcode": "M4 6AD",
        },
        {
            'uprn': 10070868244,
            "address": "Apartment 106, Flint Glass Wharf",
            "postcode": "M4 6AD",
        }
    ]

    asset_list = pd.DataFrame(asset_list)

    # Store the asset list in s3
    filename = f"{USER_ID}/{PORTFOLIO_ID}/pilot.csv"
    save_csv_to_s3(
        dataframe=asset_list,
        bucket_name="retrofit-plan-inputs-dev",
        file_name=filename
    )

    body = {
        "portfolio_id": str(PORTFOLIO_ID),
        "housing_type": "Private",
        "goal": "Increase EPC",
        "goal_value": "B",
        "trigger_file_path": filename,
        "already_installed_file_path": "",
        "patches_file_path": "",
        "non_invasive_recommendations_file_path": "",
        "budget": None,
    }
    print(body)
