minor exporting data

This commit is contained in:
Khalim Conn-Kowlessar 2026-04-30 09:58:24 +01:00
parent a1b207ba55
commit 87afac8631
2 changed files with 9 additions and 9 deletions

View file

@ -83,7 +83,7 @@ def process_export(
else:
scenario_recs = recommendations_df[
recommendations_df["scenario_id"] == group_key
]
]
if scenario_recs.empty:
logger.info(
@ -140,8 +140,8 @@ def handler(
body_dict = {
"task_id": "test",
"subtask_id": "test",
"portfolio_id": 682,
"scenario_ids": [1210],
"portfolio_id": 632,
"scenario_ids": [1144],
"default_plans_only": False,
}
:param event: Lambda event containing export request details

View file

@ -26,13 +26,13 @@ from backend.app.db.functions.materials_functions import get_materials
from collections import defaultdict
from sqlalchemy import func
PORTFOLIO_ID = 711
SCENARIOS = [1233]
PORTFOLIO_ID = 632
SCENARIOS = [1144]
scenario_names = {
1233: "Reach EPC C",
1144: "EPC C",
}
project_name = "Novus"
project_name = "Calico"
def get_data(portfolio_id, scenario_ids):
@ -230,7 +230,7 @@ for scenario_id in SCENARIOS:
# Get recs for this scenario
recommended_measures_df = recommendations_df[
recommendations_df["scenario_id"] == scenario_id
][["property_id", "measure_type", "estimated_cost", "default"]]
][["property_id", "measure_type", "estimated_cost", "default"]]
recommended_measures_df = recommended_measures_df[
recommended_measures_df["default"]
]
@ -238,7 +238,7 @@ for scenario_id in SCENARIOS:
post_install_sap = recommendations_df[
recommendations_df["scenario_id"] == scenario_id
][["property_id", "default", "sap_points"]]
][["property_id", "default", "sap_points"]]
post_install_sap = post_install_sap[post_install_sap["default"]]
# Sum up the sap points by property id
post_install_sap = (