diff --git a/.gitignore b/.gitignore index fef09c5..c59ca1e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,11 @@ -# nbscuid-built files +# cupid-built files **/computed_notebooks/** **/cache_data_path/** **/cache_metadata_path/** **/temp_data/** **/ncfiles/** **/test_product.txt -nbscuid.egg-info +cupid.egg-info **/.ipynb_checkpoints **/__pycache__ diff --git a/README.md b/README.md index 10c0bcd..2939a5c 100644 --- a/README.md +++ b/README.md @@ -30,21 +30,21 @@ $ ./manage_externals/checkout_externals Then build the necessary conda environments with ``` -$ conda env create -f nbscuid/dev-environment.yml -$ conda activate nbscuid-dev -$ which nbscuid-run -$ conda env create -f mom6-environment.yml +$ conda env create -f cupid/dev-environment.yml +$ conda activate cupid-dev +$ which cupid-run +$ conda env create -f cupid-analysis.yml ``` Notes: -1. `conda` now defaults to using `mamba` to solve environments; the `mom6-environment.yml` environment is complicated, so older versions of `conda` should be updated (`conda update -n base conda`) or you should use `mamba` instead. +1. `conda` now defaults to using `mamba` to solve environments; the `cupid-analysis.yml` environment is complicated, so older versions of `conda` should be updated (`conda update -n base conda`) or you should use `mamba` instead. 1. If `./manage_externals/checkout_externals` is not found, run `git submodule update --init` to clone the submodule. -1. If `which nbscuid-run` returned the error `which: no nbscuid-run in ($PATH)`, then please run the following: +1. If `which cupid-run` returned the error `which: no cupid-run in ($PATH)`, then please run the following: ``` -$ conda activate nbscuid-dev -$ pip install -e . # installs nbscuid +$ conda activate cupid-dev +$ pip install -e . # installs cupid ``` ## Running @@ -53,10 +53,10 @@ CUPiD currently provides two examples for generating diagnostics. To test the package out, try to run `examples/adf-mom6`: ``` -$ conda activate nbscuid-dev +$ conda activate cupid-dev $ cd examples/adf-mom6 -$ nbscuid-run config.yml -$ nbscuid-build config.yml # Will build HTML from Jupyter Book +$ cupid-run config.yml +$ cupid-build config.yml # Will build HTML from Jupyter Book ``` After the last step is finished, you can use Jupyter to view generated notebooks in `${CUPID_ROOT}/examples/adf-mom6/computed_notebooks/adf-quick-run` diff --git a/mom6-environment.yml b/cupid-analysis.yml similarity index 93% rename from mom6-environment.yml rename to cupid-analysis.yml index 12caaf5..1df4aab 100644 --- a/mom6-environment.yml +++ b/cupid-analysis.yml @@ -1,4 +1,4 @@ -name: mom6-tools-nbscuid +name: cupid-analysis channels: - conda-forge - nodefaults diff --git a/nbscuid/__init__.py b/cupid/__init__.py similarity index 100% rename from nbscuid/__init__.py rename to cupid/__init__.py diff --git a/nbscuid/_jupyter-book-config-defaults.yml b/cupid/_jupyter-book-config-defaults.yml similarity index 93% rename from nbscuid/_jupyter-book-config-defaults.yml rename to cupid/_jupyter-book-config-defaults.yml index 5415bec..98d316c 100644 --- a/nbscuid/_jupyter-book-config-defaults.yml +++ b/cupid/_jupyter-book-config-defaults.yml @@ -5,7 +5,7 @@ ####################################################################################### # Book settings -title: nbscuid default book +title: cupid default book author: none copyright: '2023' @@ -18,7 +18,7 @@ execute: latex: latex_engine: pdflatex latex_documents: - targetname: nbscuid-default.tex + targetname: cupid-default.tex # Add a bibtex file so that we can create citations # bibtex_bibfiles: @@ -31,7 +31,7 @@ sphinx: # Information about where the book exists on the web # repository: -# url: https://github.com/rmshkv/nbscuid +# url: https://github.com/rmshkv/cupid # path_to_book: notebooks # branch: main diff --git a/nbscuid/build.py b/cupid/build.py similarity index 98% rename from nbscuid/build.py rename to cupid/build.py index a0277b1..7c67d09 100755 --- a/nbscuid/build.py +++ b/cupid/build.py @@ -7,7 +7,7 @@ def build(): """ - Build a Jupyter book based on the TOC in config.yml. Called by `nbscuid-build`. + Build a Jupyter book based on the TOC in config.yml. Called by `cupid-build`. Args: none diff --git a/nbscuid/dev-environment.yml b/cupid/dev-environment.yml similarity index 63% rename from nbscuid/dev-environment.yml rename to cupid/dev-environment.yml index 0f1516c..a821d37 100644 --- a/nbscuid/dev-environment.yml +++ b/cupid/dev-environment.yml @@ -1,6 +1,6 @@ -name: nbscuid-dev +name: cupid-dev dependencies: - python==3.11.4 - pip - pip: - - -e ../ \ No newline at end of file + - -e ../ diff --git a/nbscuid/quickstart.py b/cupid/quickstart.py similarity index 100% rename from nbscuid/quickstart.py rename to cupid/quickstart.py diff --git a/nbscuid/read.py b/cupid/read.py similarity index 100% rename from nbscuid/read.py rename to cupid/read.py diff --git a/nbscuid/run.py b/cupid/run.py similarity index 82% rename from nbscuid/run.py rename to cupid/run.py index d4a1290..3c7fb43 100755 --- a/nbscuid/run.py +++ b/cupid/run.py @@ -4,7 +4,7 @@ from glob import glob import papermill as pm import intake -import nbscuid.util +import cupid.util import sys from dask.distributed import Client import dask @@ -13,7 +13,7 @@ def run(): """ - Main engine to set up running all the notebooks. Called by `nbscuid-run`. + Main engine to set up running all the notebooks. Called by `cupid-run`. Args: none @@ -24,8 +24,8 @@ def run(): # Get control structure config_path = str(sys.argv[1]) - control = nbscuid.util.get_control_dict(config_path) - nbscuid.util.setup_book(config_path) + control = cupid.util.get_control_dict(config_path) + cupid.util.setup_book(config_path) # Grab paths @@ -88,10 +88,10 @@ def run(): for nb, info in all_nbs.items(): if "dependency" in info: - nbscuid.util.create_ploomber_nb_task(nb, info, cat_path, nb_path_root, output_dir, global_params, dag, dependency = info["dependency"]) + cupid.util.create_ploomber_nb_task(nb, info, cat_path, nb_path_root, output_dir, global_params, dag, dependency = info["dependency"]) else: - nbscuid.util.create_ploomber_nb_task(nb, info, cat_path, nb_path_root, output_dir, global_params, dag) + cupid.util.create_ploomber_nb_task(nb, info, cat_path, nb_path_root, output_dir, global_params, dag) ##################################################################### # Organizing scripts @@ -109,14 +109,14 @@ def run(): for script, info in all_scripts.items(): if "dependency" in info: - nbscuid.util.create_ploomber_script_task(script, info, cat_path, nb_path_root, global_params, dag, dependency = info["dependency"]) + cupid.util.create_ploomber_script_task(script, info, cat_path, nb_path_root, global_params, dag, dependency = info["dependency"]) else: - nbscuid.util.create_ploomber_script_task(script, info, cat_path, nb_path_root, global_params, dag) + cupid.util.create_ploomber_script_task(script, info, cat_path, nb_path_root, global_params, dag) # Run the full DAG dag.build() return None - \ No newline at end of file + diff --git a/nbscuid/util.py b/cupid/util.py similarity index 100% rename from nbscuid/util.py rename to cupid/util.py diff --git a/examples/adf-mom6/config.yml b/examples/adf-mom6/config.yml index a292329..347435c 100644 --- a/examples/adf-mom6/config.yml +++ b/examples/adf-mom6/config.yml @@ -15,7 +15,7 @@ data_sources: ### to be created in run_dir: . - # nb_path_root is the path to the folder that nbscuid will + # nb_path_root is the path to the folder that cupid will ### look for your template notebooks in. It doesn't have to ### be inside run_dir, or be specific to this project, as ### long as the notebooks are there @@ -33,7 +33,7 @@ computation_config: ### specify a different environment than the default for any ### notebook in NOTEBOOK CONFIG - default_kernel_name: mom6-tools-nbscuid + default_kernel_name: cupid-analysis ############# NOTEBOOK CONFIG ############# diff --git a/examples/adf-only/config-adf-only.yml b/examples/adf-only/config-adf-only.yml index 9033c6a..4bfce06 100644 --- a/examples/adf-only/config-adf-only.yml +++ b/examples/adf-only/config-adf-only.yml @@ -15,7 +15,7 @@ data_sources: ### to be created in run_dir: . - # nb_path_root is the path to the folder that nbscuid will + # nb_path_root is the path to the folder that cupid will ### look for your template notebooks in. It doesn't have to ### be inside run_dir, or be specific to this project, as ### long as the notebooks are there diff --git a/examples/nblibrary/config_f.cam6_3_119.FLTHIST_ne30.r328_gamma0.33_soae.001.yaml b/examples/nblibrary/config_f.cam6_3_119.FLTHIST_ne30.r328_gamma0.33_soae.001.yaml index e6b7113..f865586 100644 --- a/examples/nblibrary/config_f.cam6_3_119.FLTHIST_ne30.r328_gamma0.33_soae.001.yaml +++ b/examples/nblibrary/config_f.cam6_3_119.FLTHIST_ne30.r328_gamma0.33_soae.001.yaml @@ -199,7 +199,7 @@ diag_cam_baseline_climo: #Location of baseline CAM climatologies: - cam_climo_loc: /glade/scratch/richling/adf-output/ADF-data/climos/${diag_cam_baseline_climo.cam_case_name}/${diag_cam_baseline_climo.yrs}/ + cam_climo_loc: /glade/campaign/cesm/development/cross-wg/diagnostic_framework/ADF-data/climos/${diag_cam_baseline_climo.cam_case_name}/${diag_cam_baseline_climo.yrs}/ #model year when time series files should start: #Note: Leaving this entry blank will make time series @@ -226,7 +226,7 @@ diag_cam_baseline_climo: cam_overwrite_ts: false #Location where time series files are (or will be) stored: - cam_ts_loc: /glade/scratch/richling/adf-output/ADF-data/timeseries/${diag_cam_baseline_climo.cam_case_name}/${diag_cam_baseline_climo.yrs}/ + cam_ts_loc: /glade/campaign/cesm/development/cross-wg/diagnostic_framework/ADF-data/timeseries/${diag_cam_baseline_climo.cam_case_name}/${diag_cam_baseline_climo.yrs}/ case_nickname: ${diag_cam_baseline_climo.cam_case_name} @@ -368,4 +368,4 @@ tem_info: overwrite_tem_case: false overwrite_tem_base: false -#END OF FILE \ No newline at end of file +#END OF FILE diff --git a/pyproject.toml b/pyproject.toml index b17e29b..1ef665a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,14 +3,16 @@ requires = ["setuptools>=61.0", "setuptools_scm[toml]>=6.2"] build-backend = "setuptools.build_meta" [tool.setuptools] -packages = ["nbscuid"] +packages = ["cupid"] [project] -name = "nbscuid" -version = "0.0.10" +name = "cupid" +version = "0.0.1" authors = [ - { name="Elena Romashkova", email="eromashkova@ucar.edu" }, + { name="Lev Romashkov", email="eromashkova@ucar.edu" }, + { name="Teagan King", email="tking@ucar.edu" }, + { name="Michael Levy", email="mlevy@ucar.edu" }, ] description = "Notebook-Based, Super CUstomizable Infrastructure for Diagnostics" readme = "README.md" @@ -36,10 +38,10 @@ dependencies = [ ] [project.urls] -repository = "https://github.com/rmshkv/nbscuid" +repository = "https://github.com/NCAR/CUPiD" documentation = "https://nbscuid.readthedocs.io" [project.scripts] -nbscuid-run = "nbscuid.run:run" -nbscuid-build = "nbscuid.build:build" +cupid-run = "cupid.run:run" +cupid-build = "cupid.build:build"