From c4e1cc4229d25575d295c90edf61ae70c4448355 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Mon, 13 Jul 2026 23:09:00 +0000 Subject: [PATCH] =?UTF-8?q?Pivot=20a=20Property's=20measure=20cost=20onto?= =?UTF-8?q?=20its=20scenario-sheet=20column=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- domain/scenario_export/scenario_sheet.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/domain/scenario_export/scenario_sheet.py b/domain/scenario_export/scenario_sheet.py index 9bdb5ff95..7a0ebfb68 100644 --- a/domain/scenario_export/scenario_sheet.py +++ b/domain/scenario_export/scenario_sheet.py @@ -108,4 +108,14 @@ def shape_scenario_sheet( properties: Sequence[PropertyScenarioData], ) -> ExportSheet: """Shape one Scenario's Properties into a wide export sheet (ADR-0065).""" - raise NotImplementedError + columns: tuple[str, ...] = ("property_id", "landlord_property_id") + rows: list[dict[str, Any]] = [] + for prop in properties: + row: dict[str, Any] = { + "property_id": prop.property_id, + "landlord_property_id": prop.landlord_property_id, + } + for measure in prop.measures: + row[measure.measure_type] = measure.estimated_cost + rows.append(row) + return ExportSheet(columns=columns, rows=tuple(rows))