Skip to content

Commit

Permalink
Merge pull request OpenMDAO#67 from hschilling/I65-check-for-final-case
Browse files Browse the repository at this point in the history
Handle the situation where the final case was never recorded
  • Loading branch information
crecine authored Jan 17, 2024
2 parents 0d674b4 + dd86b24 commit 910878f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions aviary/visualization/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ def create_aviary_variables_table_data_nested(script_name, recorder_file):
"""
cr = om.CaseReader(recorder_file)
if 'final' not in cr.list_cases():
return None

case = cr.get_case('final')
outputs = case.list_outputs(explicit=True, implicit=True, val=True,
residuals=True, residuals_tol=None,
Expand Down Expand Up @@ -412,12 +415,13 @@ def dashboard(script_name, problem_recorder, driver_recorder, port):
# copy script.js file to reports/script_name/aviary_vars/index.html.
# mod the script.js file to point at the json file
# create the json file and put it in reports/script_name/aviary_vars/aviary_vars.json
create_aviary_variables_table_data_nested(
script_name, problem_recorder) # create the json file
aviary_vars_pane = create_report_frame('html',
f'{reports_dir}/aviary_vars/index.html')
table_data_nested = create_aviary_variables_table_data_nested(
script_name, problem_recorder)
if table_data_nested:
aviary_vars_pane = create_report_frame('html',
f'{reports_dir}/aviary_vars/index.html')

results_tabs_list.append(('Aviary Variables', aviary_vars_pane))
results_tabs_list.append(('Aviary Variables', aviary_vars_pane))

####### Subsystems Tab #######
subsystem_tabs_list = []
Expand Down

0 comments on commit 910878f

Please sign in to comment.