diff --git a/cupid/build.py b/cupid/build.py index 741922c..f4956e0 100755 --- a/cupid/build.py +++ b/cupid/build.py @@ -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 diff --git a/examples/external_diag_packages/config.yml b/examples/external_diag_packages/config.yml index 8502f11..6f6db07 100644 --- a/examples/external_diag_packages/config.yml +++ b/examples/external_diag_packages/config.yml @@ -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: