Model/repositories/scenario_export
Khalim Conn-Kowlessar b79d16913e plan_name column sources the source Scenario name, not plan.name
`plan.name` is a freeform, user-entered label that is unset on
modelling-generated Plans (0/205 populated on a real portfolio). The meaningful
"name of the plan chosen" is the Scenario the home's default Plan came from, so
`plan_name` now reads `scenario.name` via `plan.scenario_id` (LEFT JOIN scenario)
on both export selections. On the default-plan export this labels each home with
its source scenario (e.g. "Fabric Only" / "ASHP + PV"); on the scenario export it
equals that sheet's scenario.

Repository test seeds scenarios and asserts the source-scenario name; 62 tests
pass, pyright --strict clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 09:35:57 +00:00
..
__init__.py Read a scenario's default-plan properties as export rows 🟥 2026-07-13 23:26:17 +00:00
scenario_export_postgres_repository.py plan_name column sources the source Scenario name, not plan.name 2026-07-22 09:35:57 +00:00
scenario_export_repository.py Add default-plan export selection + plan_name column (ADR-0065) 2026-07-22 09:21:38 +00:00
scenario_names_postgres_repository.py Address review: stream workbook to /tmp, repo the scenario-name SQL 2026-07-18 19:51:51 +00:00