Merge pull request #1147 from Hestia-Homes/feature/landlord_data

address2uprn was missing a dependency
This commit is contained in:
Jun-te Kim 2026-06-02 11:50:42 +01:00 committed by GitHub
commit a3c80b6691
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View file

@ -120,8 +120,9 @@ def handler(
) -> dict[str, int]:
trigger = LandlordDescriptionOverridesTriggerBody.model_validate(body)
# The classifier reads the ORIGINAL upload (raw landlord headers), so the S3
# bucket comes from the trigger URI rather than a fixed env var.
# The classifier reads a dedicated CSV of the classifier columns (raw
# landlord headers preserved), converted from the upload by the frontend, so
# the S3 bucket comes from the trigger URI rather than a fixed env var.
bucket, _key = parse_s3_uri(trigger.s3_uri)
# boto3.client is overloaded per-service in the installed stubs; cast to Any
@ -136,7 +137,7 @@ def handler(
csv_client, bucket
)
# Raw rows, not load_batch: the original upload carries the description
# Raw rows, not load_batch: the classifier CSV carries the description
# columns but not the canonical address/postcode columns load_batch requires.
rows = csv_client.read_rows(trigger.s3_uri)

View file

@ -32,6 +32,9 @@ RUN pip install --no-cache-dir -r requirements.txt
COPY utils/ utils/
COPY backend/ backend/
COPY datatypes/ datatypes/
# main.py imports infrastructure.epc_client.epc_client_service (EpcClientService);
# without this the lambda fails at init with "No module named 'infrastructure'".
COPY infrastructure/ infrastructure/
# Copy the handler
COPY backend/address2UPRN/main.py .