diff --git a/.helm/values.production.yaml b/.helm/values.production.yaml index e2c39fa8c..041ea45c1 100644 --- a/.helm/values.production.yaml +++ b/.helm/values.production.yaml @@ -6,8 +6,11 @@ djangoMemoryLimit: "2000Mi" celeryReplicas: 10 celeryMemoryRequest: "900Mi" celeryMemoryLimit: "900Mi" -juliaReplicas: 15 +juliaReplicas: 10 juliaCpuRequest: "1000m" juliaCpuLimit: "4000m" juliaMemoryRequest: "8000Mi" juliaMemoryLimit: "8000Mi" +juliaDeploymentStrategy: + rollingUpdate: + maxSurge: "0%" diff --git a/CHANGELOG.md b/CHANGELOG.md index 133f9d65c..7ab57cf83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,10 @@ Classify the change according to the following categories: ##### Removed ### Patches +## v3.12.2 +### Patches +- Enable the downloadable results spreadsheet (`job/generate_results_table` endpoint) to work with previous runs by avoiding errors when trying to do math with values of type None - handle None as zero/0 + ## v3.12.1 ### Minor Updates ### Added diff --git a/reoptjl/custom_table_config.py b/reoptjl/custom_table_config.py index 34131f514..f12854ceb 100644 --- a/reoptjl/custom_table_config.py +++ b/reoptjl/custom_table_config.py @@ -411,14 +411,14 @@ { "label" : "Purchased Electricity Cost ($/yr)", "key" : "purchased_electricity_cost", - "bau_value" : lambda df: safe_get(df, "outputs.ElectricTariff.year_one_bill_before_tax_bau") + safe_get(df, "outputs.CHP.year_one_standby_cost_before_tax_bau") - safe_get(df, "outputs.ElectricTariff.year_one_export_benefit_before_tax_bau"), - "scenario_value": lambda df: safe_get(df, "outputs.ElectricTariff.year_one_bill_before_tax") + safe_get(df, "outputs.CHP.year_one_standby_cost_before_tax") - safe_get(df, "outputs.ElectricTariff.year_one_export_benefit_before_tax") + "bau_value" : lambda df: safe_get(df, "outputs.ElectricTariff.year_one_bill_before_tax_bau") + safe_get(df, "outputs.Financial.year_one_chp_standby_cost_before_tax_bau") - safe_get(df, "outputs.ElectricTariff.year_one_export_benefit_before_tax_bau"), + "scenario_value": lambda df: safe_get(df, "outputs.ElectricTariff.year_one_bill_before_tax") + safe_get(df, "outputs.Financial.year_one_chp_standby_cost_before_tax") - safe_get(df, "outputs.ElectricTariff.year_one_export_benefit_before_tax") }, { "label" : "Purchased Electricity Cost, After Tax ($/yr)", "key" : "purchased_electricity_cost", - "bau_value" : lambda df: safe_get(df, "outputs.ElectricTariff.year_one_bill_after_tax_bau") + safe_get(df, "outputs.CHP.year_one_standby_cost_after_tax_bau") - safe_get(df, "outputs.ElectricTariff.year_one_export_benefit_after_tax_bau"), - "scenario_value": lambda df: safe_get(df, "outputs.ElectricTariff.year_one_bill_after_tax") + safe_get(df, "outputs.CHP.year_one_standby_cost_after_tax") - safe_get(df, "outputs.ElectricTariff.year_one_export_benefit_after_tax") + "bau_value" : lambda df: safe_get(df, "outputs.ElectricTariff.year_one_bill_after_tax_bau") + safe_get(df, "outputs.Financial.year_one_chp_standby_cost_after_tax_bau") - safe_get(df, "outputs.ElectricTariff.year_one_export_benefit_after_tax_bau"), + "scenario_value": lambda df: safe_get(df, "outputs.ElectricTariff.year_one_bill_after_tax") + safe_get(df, "outputs.Financial.year_one_chp_standby_cost_after_tax") - safe_get(df, "outputs.ElectricTariff.year_one_export_benefit_after_tax") }, { "label" : "Electricity Cost Savings ($/yr)", diff --git a/reoptjl/custom_table_helpers.py b/reoptjl/custom_table_helpers.py index a27a3a649..5e56a9ca9 100644 --- a/reoptjl/custom_table_helpers.py +++ b/reoptjl/custom_table_helpers.py @@ -38,4 +38,6 @@ def colnum_string(n: int) -> str: return string def safe_get(df: Dict[str, Any], key: str, default: Any = 0) -> Any: - return df.get(key, default) \ No newline at end of file + """Safely get a value from a dictionary with a default fallback.""" + value = df.get(key, default if default is not None else 0) + return value if value is not None else 0 \ No newline at end of file