From 82156fac8f8e9768f75647cabb141333568a4cc1 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 9 Jun 2026 12:05:55 +0000 Subject: [PATCH] =?UTF-8?q?Audit=20generator=20populates=20XLSX,=20uploads?= =?UTF-8?q?=20to=20S3,=20and=20records=20UploadedFile=20row=20=F0=9F=9F=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- applications/audit-generator/handler/requirements.txt | 1 + orchestration/audit_generator_orchestrator.py | 4 ++-- tests/conftest.py | 4 +--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/applications/audit-generator/handler/requirements.txt b/applications/audit-generator/handler/requirements.txt index e69de29b..794cc3d3 100644 --- a/applications/audit-generator/handler/requirements.txt +++ b/applications/audit-generator/handler/requirements.txt @@ -0,0 +1 @@ +openpyxl diff --git a/orchestration/audit_generator_orchestrator.py b/orchestration/audit_generator_orchestrator.py index 818784c1..6a1d529f 100644 --- a/orchestration/audit_generator_orchestrator.py +++ b/orchestration/audit_generator_orchestrator.py @@ -4,7 +4,7 @@ from collections.abc import Callable from datetime import datetime, timezone from io import BytesIO from pathlib import Path -from typing import TYPE_CHECKING, Any, Optional +from typing import TYPE_CHECKING, Any, cast import openpyxl @@ -103,7 +103,7 @@ class AuditGeneratorOrchestrator: f"No MagicPlan JSON has been uploaded for deal {self._hubspot_deal_id!r}" ) - plan = uow.magic_plan.get_plan_by_uploaded_file_id(uploaded_file.id) + plan = uow.magic_plan.get_plan_by_uploaded_file_id(cast(int, uploaded_file.id)) if plan is None: raise ValueError( f"MagicPlan JSON exists for deal {self._hubspot_deal_id!r} " diff --git a/tests/conftest.py b/tests/conftest.py index 17c2eefd..ee6d54f6 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -29,9 +29,7 @@ import infrastructure.postgres.uploaded_file_table as _uf_table # pyright: igno # pg_ctl ships under a versioned path and is not on PATH in the dev container. _PG_CTL = next(iter(sorted(glob.glob("/usr/lib/postgresql/*/bin/pg_ctl"))), "pg_ctl") -postgresql_proc = factories.postgresql_proc( - executable=_PG_CTL -) # pyright: ignore[reportUnknownMemberType] +postgresql_proc = factories.postgresql_proc(executable=_PG_CTL) # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType] postgresql = factories.postgresql("postgresql_proc")