Skip to content

Conversation

@gellwood
Copy link
Collaborator

@gellwood gellwood commented Dec 2, 2025

  • CHANGELOG.md is updated
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Any new Django model inputs have also been added to job/test/posts/all_inputs_test.json

What kind of change does this PR introduce?

This pull request introduces a new feature for generating downloadable timeseries results tables, along with several improvements to load metrics handling and data consistency. It also increases the allowed range for monthly energy totals and adds supporting utilities for timeseries table generation.

New timeseries table feature and utilities:

  • Added the /job/get_timeseries_table endpoint, enabling users to download a spreadsheet of timeseries results for a list of run_uuids. This includes a new custom table option, custom_timeseries_energy_demand, for that endpoint. [1] [2]
  • Introduced reoptjl/custom_timeseries_table_config.py and reoptjl/custom_timeseries_table_helpers.py, which provide configuration and helper functions for building timeseries Excel tables, including column definitions, formatting, and safe data extraction. [1] [2]

Load metrics consistency and improvements:

  • Updated the /get_load_metrics endpoint to rename response fields for electric load metrics (annual_kwh, max_kw, monthly_totals_kwh, and monthly_peaks_kw) to match those from /simulated_load, improving API consistency. [1] [2] [3]

Data model and validation changes:

  • Increased the maximum allowed value for monthly_totals_kwh in ElectricLoadInputs from 1.0e8 to 1.0e9, including a Django migration to support this change. [1] [2] [3]

Other minor changes:

  • Added necessary import for datetime in reoptjl/views.py to support new functionality.### Please check if the PR fulfills these requirements

What is the current behavior?

(You can also link to an open issue here)

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change?

(What changes might users need to make in their application due to this PR?)

Other information:

gellwood and others added 9 commits November 21, 2025 11:59
Introduces a new endpoint `/job/hourly_rate_table` that generates an Excel file with hourly rate data for one or more scenarios. Adds `hourly_rate_helpers.py` with utility functions for datetime generation and safe dictionary access, and implements the `hourly_rate_table` view to assemble and return the Excel file based on scenario data.
Enhanced the Excel export in hourly_rate_table by adding specific formats for datetime, integers, and energy rates. Rate headers now use the rate name from urdb_metadata for clarity. Data columns for load and peak load use integer formatting, and datetime strings are written as Excel datetimes for better compatibility.
Renamed hourly_rate_helpers.py to timeseries_table_helpers.py and updated all references accordingly. Added (but not currently used) custom_timeseries_table_config.py to define flexible timeseries table configurations. Refactored the hourly_rate_table view and URL to get_timeseries_table, enhanced Excel formatting with colored headers, and improved code organization for future extensibility.
…ures easily

Moved and expanded timeseries table configuration to support column formatting, worksheet naming, and Excel output customization. Renamed and enhanced helper functions for safer data extraction. Updated the view to dynamically use the new configuration structure, allowing selection of table layouts and improved formatting for Excel exports.
Documented new /job/get_timeseries_table endpoint, custom_timeseries_energy_demand table option, and increased monthly_totals_kwh max value. Prepares changelog for v3.17.1 minor updates.
@gellwood gellwood requested a review from Bill-Becker December 2, 2025 17:13
@gellwood gellwood changed the title Merge Changes in Develop into Master v3.17.2 Added Timeseries Table Download Endpoint and Minor Updates Dec 2, 2025
@gellwood gellwood marked this pull request as ready for review December 2, 2025 17:28
@Bill-Becker Bill-Becker merged commit b11108b into master Dec 2, 2025
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.

3 participants