Skip to content

Conversation

@Bill-Becker
Copy link
Collaborator

Enable the downloadable results spreadsheet to work with previous runs by avoiding errors when trying to do math with values of type None - handle None as zero/0:

  • Modified the safe_get function in reoptjl/custom_table_helpers.py to ensure it returns a non-None value by falling back to 0 if both the key lookup and the default value are None. This improves robustness when handling missing or null data.
  • Updated the bau_value and scenario_value lambdas in reoptjl/custom_table_config.py to use outputs.Financial.year_one_chp_standby_cost_* instead of outputs.CHP.year_one_standby_cost_* for robustness because Financial is always included and CHP is not.

@Bill-Becker Bill-Becker requested a review from Copilot April 21, 2025 15:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This hot fix improves backwards compatibility of the downloadable results spreadsheet by ensuring that None values are handled as zeros. The PR updates the safe_get function in custom_table_helpers.py, adjusts financial key references in custom_table_config.py, and revises Julia deployment configurations in the helm values file.

  • Modified safe_get to ensure non-None return values.
  • Replaced outputs.CHP with outputs.Financial keys in lambda expressions.
  • Updated Julia replica count and added a rolling update strategy in the helm configuration.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
reoptjl/custom_table_helpers.py Enhanced safe_get function to return 0 instead of None.
reoptjl/custom_table_config.py Updated standby cost key references to use outputs.Financial values.
.helm/values.production.yaml Adjusted Julia replica count and added a deployment strategy.

Bill-Becker and others added 2 commits April 21, 2025 09:17
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants