Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .helm/values.production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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%"
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions reoptjl/custom_table_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down
4 changes: 3 additions & 1 deletion reoptjl/custom_table_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
"""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