From c5ab795f851402145bc7ed65e3b17a10cd8cd494 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Thu, 21 May 2026 09:46:47 +0000 Subject: [PATCH] redeploy old postcode splitter --- .github/workflows/deploy_terraform.yml | 4 +++- asset_list/app.py | 13 ++++++----- .../terraform/lambda/postcodeSplitter/main.tf | 22 +++++++++++++++++-- 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy_terraform.yml b/.github/workflows/deploy_terraform.yml index 8ba473ca..1af90291 100644 --- a/.github/workflows/deploy_terraform.yml +++ b/.github/workflows/deploy_terraform.yml @@ -169,7 +169,9 @@ jobs: uses: ./.github/workflows/_build_image.yml with: ecr_repo: postcode_splitter-${{ needs.determine_stage.outputs.stage }} - dockerfile_path: applications/postcode_splitter/Dockerfile + # dockerfile_path: applications/postcode_splitter/Dockerfile + # Switch back to the old postcode_splitter due to hyde priority - interface for the new one isn't working atm + dockerfile_path: backend/postcode_splitter/handler/Dockerfile build_context: . build_args: | DEV_DB_HOST=$DEV_DB_HOST diff --git a/asset_list/app.py b/asset_list/app.py index 9b10d7f3..424f4df6 100644 --- a/asset_list/app.py +++ b/asset_list/app.py @@ -79,23 +79,23 @@ def app(): """ data_folder = "/workspaces/model/asset_list" - data_filename = "lincs_address_list.xlsx" - sheet_name = "Sheet1" + data_filename = "hyde.xlsx" + sheet_name = "AddressProfilingResults" postcode_column = "Postcode" - address1_column = "Deal Name" + address1_column = "Address" address1_method = None - fulladdress_column = "Deal Name" + fulladdress_column = "Postcode" address_cols_to_concat = [] missing_postcodes_method = None landlord_year_built = None landlord_os_uprn = None - landlord_property_type = None # Good to include if landlord gave + landlord_property_type = "Property Type" # Good to include if landlord gave landlord_built_form = None # Good to include if landlord gave landlord_wall_construction = None landlord_roof_construction = None landlord_heating_system = None landlord_existing_pv = None - landlord_property_id = "landlord_id" + landlord_property_id = "Organisation Reference" landlord_sap = None outcomes_filename = None outcomes_sheetname = None @@ -468,3 +468,4 @@ def app(): asset_list.duplicated_addresses.to_excel( writer, sheet_name="Duplicate Properties", index=False ) + diff --git a/deployment/terraform/lambda/postcodeSplitter/main.tf b/deployment/terraform/lambda/postcodeSplitter/main.tf index 721cb2ea..e04ae00f 100644 --- a/deployment/terraform/lambda/postcodeSplitter/main.tf +++ b/deployment/terraform/lambda/postcodeSplitter/main.tf @@ -38,8 +38,26 @@ module "lambda" { { STAGE = var.stage LOG_LEVEL = "info" - POSTGRES_USERNAME = local.db_credentials.db_assessment_model_username - POSTGRES_PASSWORD = local.db_credentials.db_assessment_model_password + # POSTGRES_USERNAME = local.db_credentials.db_assessment_model_username + # POSTGRES_PASSWORD = local.db_credentials.db_assessment_model_password + # Switch back to the old postcode_splitter due to hyde priority - interface for the new one isn't working atm + DB_USERNAME = local.db_credentials.db_assessment_model_username + DB_PASSWORD = local.db_credentials.db_assessment_model_password + # Placeholder values so backend/app/config.py Settings doesn't fall back to "changeme" + GOOGLE_SOLAR_API_KEY = "test" + SAP_PREDICTIONS_BUCKET = "test" + CARBON_PREDICTIONS_BUCKET = "test" + HEAT_PREDICTIONS_BUCKET = "test" + HEATING_KWH_PREDICTIONS_BUCKET = "test" + HOTWATER_KWH_PREDICTIONS_BUCKET = "test" + API_KEY = "test" + ENVIRONMENT = "test" + SECRET_KEY = "test" + PLAN_TRIGGER_BUCKET = "test" + DATA_BUCKET = "test" + EPC_AUTH_TOKEN = "test" + ENGINE_SQS_URL = "test" + ENERGY_ASSESSMENTS_BUCKET = "test" ADDRESS2UPRN_QUEUE_URL = data.terraform_remote_state.address2uprn.outputs.address2uprn_queue_url S3_BUCKET_NAME = data.terraform_remote_state.shared.outputs.retrofit_sap_data_bucket_name },