mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
backend was missing a dependency
This commit is contained in:
parent
f3ad339cf5
commit
144233a5f3
2 changed files with 7 additions and 3 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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 .
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue