Skip to content

Commit

Permalink
use adf flag
Browse files Browse the repository at this point in the history
  • Loading branch information
TeaganKing committed Nov 8, 2024
1 parent ce10c84 commit 152ce31
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
13 changes: 8 additions & 5 deletions cupid/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,17 @@ def build(config_path):
run_dir = control["data_sources"]["run_dir"]

subprocess.run(["jupyter-book", "clean", f"{run_dir}/computed_notebooks/{sname}"])
# TODO : add flag if ADF exists
subprocess.run(
["jupyter-book", "build", f"{run_dir}/computed_notebooks/{sname}", "--all"],
)
shutil.copytree(
f"{run_dir}/ADF",
f"{run_dir}/computed_notebooks/{sname}/_build/html/ADF",
)
adf_run = control["compute_notebooks"]["atm"]["link_to_ADF"]["parameter_groups"][
"none"
]["adf_run"]
if adf_run:
shutil.copytree(
f"{run_dir}/ADF",
f"{run_dir}/computed_notebooks/{sname}/_build/html/ADF",
)

# Originally used this code to copy jupyter book HTML to a location to host it online

Expand Down
1 change: 1 addition & 0 deletions examples/external_diag_packages/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ compute_notebooks:
adf_root: ../../external_diag_packages/ADF/
case_year_range: "1_100"
base_case_year_range: "1995_2006"
adf_run: True

# glc:
# LIWG_SMB_diagnostic:
Expand Down

0 comments on commit 152ce31

Please sign in to comment.