Skip to content

Commit 42f1337

Browse files
authored
Merge branch 'develop' into get-timeseries-table-generalize
2 parents 5399131 + a8f8895 commit 42f1337

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,17 @@ Classify the change according to the following categories:
2626
##### Removed
2727
### Patches
2828

29-
## v3.17.1
29+
## v3.17.2
3030
### Minor Updates
3131
##### Added
3232
- Added `/job/get_timeseries_table` endpoint which takes a list of run_uuid's and creates a timeseries results table spreadsheet to download in response
3333
- New custom table option `custom_timeseries_energy_demand` for endpoint `/job/get_timeseries_table`.
3434
##### Changed
3535
- Increased `monthly_totals_kwh` maximum value to 1.0e9.
3636

37+
## v3.17.1
38+
##### Changed
39+
- For the `/get_load_metrics` endpoint, update response field names to be consistent with `/simulated_load` for `load_type=electric`: `annual_kwh`, `max_kw` (annual peak load), `monthly_totals_kwh`, and `monthly_peaks_kw`. In a future update, this endpoint will take `load_type` as an input and return the load metrics with consistent units as `/simulated_load` for heating and cooling `load_type`s, such as `monthly_mmbtu` for the heating load types.
3740

3841
## v3.17.0
3942
### Minor Updates

julia_src/http.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,16 @@ function get_load_metrics(req::HTTP.Request)
600600
load_profile = pop!(d, "load_profile")
601601
other_kwargs = reoptjl.dictkeys_tosymbols(d)
602602
data = reoptjl.get_load_metrics(load_profile; other_kwargs...)
603+
rename_map = Dict("annual_peak" => "max_kw",
604+
"annual_energy" => "annual_kwh",
605+
"monthly_energy" => "monthly_totals_kwh",
606+
"monthly_peaks" => "monthly_peaks_kw")
607+
for (old_key, new_key) in rename_map
608+
if haskey(data, old_key)
609+
data[new_key] = data[old_key]
610+
delete!(data, old_key)
611+
end
612+
end
603613
catch e
604614
@error "Something went wrong in the get_load_metrics" exception=(e, catch_backtrace())
605615
error_response["error"] = sprint(showerror, e)

reoptjl/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1675,7 +1675,7 @@ def get_load_metrics(request):
16751675
try:
16761676
if request.method == "POST":
16771677
post_body = json.loads(request.body)
1678-
load_profile = list(post_body.get("load_profile"))
1678+
load_profile = list(post_body["load_profile"])
16791679

16801680
inputs = {
16811681
"load_profile": load_profile

0 commit comments

Comments
 (0)