Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion tripyview/sub_tripyrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,12 @@ def tripyrun():
webpages["general"] = {}
webpages["general"]["name"] = yaml_settings["tripyrun_name"]
webpages["logo"] = {}
webpages["logo"]["path"] =os.path.join(templates_path, 'fesom2_logo.png')
# Copy logo to output directory and use relative path
logo_src = os.path.join(templates_path, 'fesom2_logo.png')
logo_dst = os.path.join(save_path, 'fesom2_logo.png')
if os.path.exists(logo_src) and not os.path.exists(logo_dst):
shutil.copy(logo_src, logo_dst)
webpages["logo"]["path"] = './fesom2_logo.png'

#___________________________________________________________________________
# loop over available diagnostics and run the one selected in the yaml file
Expand Down
7 changes: 5 additions & 2 deletions tripyview/sub_tripyrundriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,11 @@ def exec_papermill(webpage, cnt, params_vname, exec_template='hslice'):
else : webpage[f"image_{cnt}"]["variable"] = ''
webpage[f"image_{cnt}"]["cnt"] = cnt
webpage[f"image_{cnt}"]["name"] = str_all2
webpage[f"image_{cnt}"]["path"] = os.path.join('./figures/', save_fname)
webpage[f"image_{cnt}"]["path_nb"] = os.path.join('./notebooks/', save_fname_nb)
# Compute relative paths from HTML location (save_path) to figure/notebook directories
fig_relpath = os.path.relpath(params_vname['tripyrun_spath_fig'], params_vname['save_path'])
nb_relpath = os.path.relpath(params_vname['tripyrun_spath_nb'], params_vname['save_path'])
webpage[f"image_{cnt}"]["path"] = os.path.join(f'./{fig_relpath}/', save_fname)
webpage[f"image_{cnt}"]["path_nb"] = os.path.join(f'./{nb_relpath}/', save_fname_nb)
webpage[f"image_{cnt}"]["short_name"] = short_name
cnt += 1

Expand Down