diff --git a/domain/scenario_export/scenario_sheet.py b/domain/scenario_export/scenario_sheet.py index 8f7dc681c..5365f7bca 100644 --- a/domain/scenario_export/scenario_sheet.py +++ b/domain/scenario_export/scenario_sheet.py @@ -49,8 +49,30 @@ _BATTERY_MEASURE_COLUMNS: tuple[str, ...] = ("solar_pv_with_battery",) # battery variant. _ALL_MEASURE_COLUMNS: tuple[str, ...] = MEASURE_COLUMNS + _BATTERY_MEASURE_COLUMNS -# Property identity columns, leading every sheet before the measure columns. -_ID_COLUMNS: tuple[str, ...] = ("property_id", "landlord_property_id") +# Property identity and Effective-EPC descriptive columns, leading every sheet +# before the measure columns. The descriptive fields are already override-resolved +# by the repository (property_overrides → lodged EPC → predicted, ADR-0065). +_ID_COLUMNS: tuple[str, ...] = ( + "property_id", + "landlord_property_id", + "uprn", + "address", + "postcode", + "property_type", + "walls", + "roof", + "floor", + "windows", + "heating", + "hot_water", + "lighting", + "total_floor_area", + "number_of_rooms", + "lodgement_date", + "is_expired", + "current_epc_rating", + "current_sap_points", +) # Per-Property roll-ups of the selected measures' attributed impact, trailing the # measure columns (ADR-0065). @@ -173,7 +195,24 @@ def shape_scenario_sheet( for prop in properties: row: dict[str, Any] = { "property_id": prop.property_id, - "landlord_property_id": prop.landlord_property_id, + "landlord_property_id": _blank(prop.landlord_property_id), + "uprn": _blank(prop.uprn), + "address": _blank(prop.address), + "postcode": _blank(prop.postcode), + "property_type": _blank(prop.property_type), + "walls": _blank(prop.walls), + "roof": _blank(prop.roof), + "floor": _blank(prop.floor), + "windows": _blank(prop.windows), + "heating": _blank(prop.heating), + "hot_water": _blank(prop.hot_water), + "lighting": _blank(prop.lighting), + "total_floor_area": _blank(prop.total_floor_area), + "number_of_rooms": _blank(prop.number_of_rooms), + "lodgement_date": _blank(prop.lodgement_date), + "is_expired": _blank(prop.is_expired), + "current_epc_rating": _blank(prop.current_epc_rating), + "current_sap_points": _blank(prop.current_sap_points), } # Every measure column is present, blank unless this Property has it, so # all scenario sheets share one contract (ADR-0065).