From e01b7225bbd62d501faeb85982ad873c6b26eedd Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Tue, 24 Mar 2026 13:01:56 +0000 Subject: [PATCH] save --- asset_list/app.py | 19 +++++++++---------- backend/address2UPRN/README.md | 15 ++++++++------- .../scripts/combine_address2uprn_outputs.py | 12 ++++++------ sfr/principal_pitch/2_export_data.py | 6 +++--- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/asset_list/app.py b/asset_list/app.py index 7858146d..02c94f10 100644 --- a/asset_list/app.py +++ b/asset_list/app.py @@ -74,24 +74,23 @@ def app(): """ data_folder = "/workspaces/model/asset_list" - # data_filename = "For Modelling - Final - reviewed.xlsx" - data_filename = "assests.xlsx" - sheet_name = "Sheet1" - postcode_column = "POSTCODE" - address1_column = "ADDRESS" + data_filename = "Calico ARA Upload Review.xlsx" + sheet_name = "Upload to Ara - Needs Sign Off" + postcode_column = "Postcode" + address1_column = "Address 1" address1_method = None - fulladdress_column = "ADDRESS" + fulladdress_column = "Address 1" address_cols_to_concat = [] missing_postcodes_method = None landlord_year_built = None - landlord_os_uprn = None - landlord_property_type = None - landlord_built_form = None + landlord_os_uprn = "ara_found_uprn" + landlord_property_type = "Property Type" + landlord_built_form = "Property Type" landlord_wall_construction = None landlord_roof_construction = None landlord_heating_system = None landlord_existing_pv = None - landlord_property_id = "UPRN" + landlord_property_id = "Asset Reference" landlord_sap = None outcomes_filename = None outcomes_sheetname = None diff --git a/backend/address2UPRN/README.md b/backend/address2UPRN/README.md index e34e45f6..646fec01 100644 --- a/backend/address2UPRN/README.md +++ b/backend/address2UPRN/README.md @@ -9,7 +9,7 @@ I believe lower and upper case matter: * Address 1 * Address 2 * Address 3 -* Postcode +* postcode And save it as a .csv file @@ -24,18 +24,19 @@ For this example I'll be using "s3://retrofit-data-dev/ara_raw_inputs/calico/Cal Go to Ara DB and make a new task_id with a randomly generated uuid as the primarily key -task_id = 169ea9b0-01b5-48dc-9f90-ae1989491d09 -sub_task_id = e5704f9e-29fe-43c8-8913-05be09f2440f -s3 => s3://retrofit-data-dev/ara_raw_inputs/calico/Calico UPRN Matching Rerun After Address Fix.csv +task_id = ea615ac3-ac28-46c4-8bff-2431c5b9c13d +sub_task_id = 85a23b67-8f18-4299-9bf0-69bfb87adbc7 +s3 => s3://retrofit-data-dev/ara_raw_inputs/eon/North Tyneside Council.csv Step 3) Alright, now lets make the input for postcode-splitter sqs to get the ball rolling postcode-splitter-sqs => https://eu-west-2.console.aws.amazon.com/sqs/v3/home?region=eu-west-2#/queues/https%3A%2F%2Fsqs.eu-west-2.amazonaws.com%2F337213553626%2Fpostcode-splitter-queue-dev { - "task_id": "169ea9b0-01b5-48dc-9f90-ae1989491d09", - "sub_task_id": "e5704f9e-29fe-43c8-8913-05be09f2440f", - "s3_uri": "s3://retrofit-data-dev/ara_raw_inputs/calico/Calico UPRN Matching (1)(Sheet1).csv" + "task_id": "ea615ac3-ac28-46c4-8bff-2431c5b9c13d", + "sub_task_id": "85a23b67-8f18-4299-9bf0-69bfb87adbc7", + "s3_uri": "s3://retrofit-data-dev/ara_raw_inputs/eon/eon(Sheet1).csv" } + Each batch of csv should be saved in retrofit-data-dev/ara_postcode_splitter_batches///.csv outputs of address2uprn ( which is automatically triggered on postcodesplitter) will be saved on retrofit-data-dev/ara_raw_outputs///.csv diff --git a/backend/scripts/combine_address2uprn_outputs.py b/backend/scripts/combine_address2uprn_outputs.py index be17f610..f065c676 100644 --- a/backend/scripts/combine_address2uprn_outputs.py +++ b/backend/scripts/combine_address2uprn_outputs.py @@ -55,11 +55,11 @@ def main(task_id, output): print(f"Total rows: {len(combined)}") -if __name__ == "__main__": - parser = argparse.ArgumentParser() - parser.add_argument("task_id", help="Task ID folder in S3") - parser.add_argument("--output", default="combined.csv") +# if __name__ == "__main__": +# parser = argparse.ArgumentParser() +# parser.add_argument("task_id", help="Task ID folder in S3") +# parser.add_argument("--output", default="combined.csv") - args = parser.parse_args() +# args = parser.parse_args() - main(args.task_id, args.output) +# main(args.task_id, args.output) diff --git a/sfr/principal_pitch/2_export_data.py b/sfr/principal_pitch/2_export_data.py index 519636be..df54749e 100644 --- a/sfr/principal_pitch/2_export_data.py +++ b/sfr/principal_pitch/2_export_data.py @@ -28,10 +28,10 @@ from sqlalchemy import func # PORTFOLIO_ID = 206 # SCENARIOS = [389] -PORTFOLIO_ID = 581 -SCENARIOS = [1124] +PORTFOLIO_ID = 633 +SCENARIOS = [1146] scenario_names = { - 1124: "EPC C - Solar Focused", + 1146: "Most Economic", } project_name = "WCHG EPC D rated properties"