mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-27 23:35:01 +00:00
20 lines
784 B
Python
20 lines
784 B
Python
"""Renders the Scenario Export workbook (ADR-0065).
|
|
|
|
One ``.xlsx`` with one sheet per Scenario (model A2), each sheet's rows shaped by
|
|
``domain.scenario_export`` and painted with the Monday-style branding in
|
|
``infrastructure.xlsx.branding``. Programmatic openpyxl (no template) so a
|
|
dynamic number of scenario sheets is handled natively.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Sequence
|
|
|
|
from domain.scenario_export.scenario_sheet import ExportSheet
|
|
|
|
|
|
def render_workbook(sheets: Sequence[tuple[str, ExportSheet]]) -> bytes:
|
|
"""Render the scenario sheets into a single branded ``.xlsx`` as bytes. Each
|
|
tuple is a Scenario name and its shaped sheet; sheet order follows the input
|
|
(the requested ``scenario_ids`` order)."""
|
|
raise NotImplementedError
|