Skip to content

Commit

Permalink
Change endpoint name to generate_results_table
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill-Becker committed Sep 27, 2024
1 parent e5e53d2 commit 3d623a4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Classify the change according to the following categories:
- Added new model **ASHPWaterHeaterOutputs**
- Added new model **ASHPSpaceHeaterInputs**
- Added new model **ASHPSpaceHeaterOutputs**
- Added /job/generate_results_table endpoint which takes a list of run_uuid's and creates a results table spreadsheet to download in response

## v3.9.4
### Minor Updates
Expand Down
2 changes: 1 addition & 1 deletion reoptjl/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
re_path(r'^invalid_urdb/?$', reoviews.invalid_urdb),
re_path(r'^schedule_stats/?$', reoviews.schedule_stats),
re_path(r'^get_existing_chiller_default_cop/?$', views.get_existing_chiller_default_cop),
re_path(r'^job/generate_custom_comparison_table/?$', views.generate_custom_comparison_table),
re_path(r'^job/generate_results_table/?$', views.generate_results_table),
re_path(r'^get_ashp_defaults/?$', views.get_ashp_defaults),
re_path(r'^summary_by_runuuids/?$', views.summary_by_runuuids),
re_path(r'^link_run_to_portfolios/?$', views.link_run_uuids_to_portfolio_uuid)
Expand Down
4 changes: 2 additions & 2 deletions reoptjl/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,7 @@ def process_scenarios(scenarios: List[Dict[str, Any]], reopt_data_config: List[D
except Exception:
log_and_raise_error('process_scenarios')

def generate_custom_comparison_table(request: Any) -> HttpResponse:
def generate_results_table(request: Any) -> HttpResponse:
if request.method != 'GET':
return JsonResponse({"Error": "Method not allowed. This endpoint only supports GET requests."}, status=405)

Expand Down Expand Up @@ -1696,7 +1696,7 @@ def generate_custom_comparison_table(request: Any) -> HttpResponse:
except CustomTableError as e:
return JsonResponse({"Error": str(e)}, status=500)
except Exception as e:
log.error(f"Unexpected error in generate_custom_comparison_table: {e}")
log.error(f"Unexpected error in generate_results_table: {e}")
return JsonResponse({"Error": "An unexpected error occurred. Please try again later."}, status=500)

def generate_excel_workbook(df: pd.DataFrame, custom_table: List[Dict[str, Any]], output: io.BytesIO) -> None:
Expand Down

0 comments on commit 3d623a4

Please sign in to comment.