diff --git a/contributors.md b/Contributors.md similarity index 100% rename from contributors.md rename to Contributors.md diff --git a/NCAR_tips.md b/NCARtips.md similarity index 100% rename from NCAR_tips.md rename to NCARtips.md diff --git a/README.md b/README.md index 7832710..f97321a 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ If you do not have `mamba` installed, you can still use `conda`... it will just $ pip install -e . # installs cupid ``` -1. Run `pre-commit install` to configure `git` to automatically run `pre-commit` checks when you try to commit changes; the commit will only proceed if all checks pass. Note that CUPiD uses `pre-commit` to ensure code formatting guidelines are followed, and pull requests will not be accepted if they fail the `pre-commit`-based Github Action. +1. In the `cupid-dev` environment, run `pre-commit install` to configure `git` to automatically run `pre-commit` checks when you try to commit changes from the `cupid-dev` environment; the commit will only proceed if all checks pass. Note that CUPiD uses `pre-commit` to ensure code formatting guidelines are followed, and pull requests will not be accepted if they fail the `pre-commit`-based Github Action. 1. If you plan on contributing code to CUPiD, whether developing CUPiD itself or providing notebooks for CUPiD to run, please see the [Contributor's Guide](https://ncar.github.io/CUPiD/ContributorsGuide.html). diff --git a/docs/Contributors_Guide.md b/docs/ContributorsGuide.md similarity index 95% rename from docs/Contributors_Guide.md rename to docs/ContributorsGuide.md index 9761c34..188f623 100644 --- a/docs/Contributors_Guide.md +++ b/docs/ContributorsGuide.md @@ -11,7 +11,7 @@ In order to contribute code to this repository, we recommend that you get starte 4. [Install CUPiD](https://ncar.github.io/CUPiD/index.html#installing), relevant environments, and setup `pre-commit`. 5. Make your edits and add your name to our `contributors.md` file to make sure we recognize your contributions 6. Merge in recent changes from master -7. Ensure that `pre-commit` checks all pass +7. Ensure that `pre-commit` checks all pass from the `cupid-dev` environment 8. IF updating `github.io` pages, test with the steps listed below, otherwise proceed to #9: - Create the environment necessary for building documentation with `$ conda env create -f environments/docs.yml` - Activate the docs environment: `$ conda activate cupid-docs` diff --git a/docs/NCARtips.rst b/docs/NCARtips.rst deleted file mode 100644 index 8020125..0000000 --- a/docs/NCARtips.rst +++ /dev/null @@ -1,2 +0,0 @@ -.. include:: NCAR_tips.md - :parser: myst diff --git a/docs/addingnotebookstocollection.md b/docs/addingnotebookstocollection.md index c091115..84d01b2 100644 --- a/docs/addingnotebookstocollection.md +++ b/docs/addingnotebookstocollection.md @@ -41,9 +41,9 @@ Generally, a good fit for a diagnostic notebook is one that reads in CESM output 7. Update your parameters. Parameters that are specific to just this notebook should go under `parameter_groups` in the notebook's entry under `compute_notebooks`. Global parameters that you want passed in to every notebook in the collection should go under `global_params`. When `CUPiD` executes your notebook, all of these parameters will get put in a new cell below the cell tagged `parameters` that you added in step 3. This means they will supercede the values of the parameters that you put in the cell above---the names, notation, etc. should match to make sure your notebook is able to find the variables it needs. -8. Your collection can now be run and built with `cupid-run` and `cupid-build` as usual. +8. Your collection can now be run with `cupid-run`, and then the website can be built with `cupid-build`. 9. If you're happy with your notebook and want to add it to the CUPiD repository, there are a few formatting items that we would like contributors to follow: * Title your notebook something descriptive. A recommended format is `___.ipynb`; for instance, this might look like `Global_PSL_NMSE_compare_obs_lens.ipynb` or `Greenland_SMB_visual_compare_obs.ipynb`. * Add a [cell tag](https://jupyterbook.org/en/stable/content/metadata.html#jupyter-cell-tags) `hide-input` for cells which output plots, and add the tag `hide-cell` for cells that do not contain plots (this will hide both the input and output). Do this through JupyterHub when editing your notebook: click `View --> Cell Toolbar --> Tags` and add either `hide-input` or `hide-cell`. This makes it easier to glance at the plots once the webpage is built and not need to scroll through code cells. - * Set up `pre-commit` to ensure that your code is properly formatted and linted. Running `pre-commit install` will configure `git` to automatically run the `pre-commit` checks when you try to commit changes; the commit will only proceed if all the checks pass. + * Set up `pre-commit` in the `cupid-dev` environment to ensure that your code is properly formatted and linted. Running `pre-commit install` will configure `git` to automatically run the `pre-commit` checks when you try to commit changes; the commit will only proceed if all the checks pass. diff --git a/docs/conf.py b/docs/conf.py index 7f2aa5a..b1585b3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,12 +18,12 @@ print("sys.path:", sys.path) -# Copy README, NCAR_tips, and contributors, and Contributors_Guide into docs +# Copy README, NCAR_tips, and Contributors into docs # This block allows us to remove the header image from any md files # without affecting the original version, but still pull the source # into the docs build fresh each time. -for file in ["README.md", "NCAR_tips.md", "contributors.md", "Contributors_Guide.md"]: +for file in ["README.md", "NCARtips.md", "Contributors.md"]: os.system(f"cp ../{file} ./") # Remove any images from the first line of the file diff --git a/docs/ContributorsGuide.rst b/docs/contributors_guide.rst similarity index 100% rename from docs/ContributorsGuide.rst rename to docs/contributors_guide.rst diff --git a/docs/contributors_to_cupid.rst b/docs/contributors_to_cupid.rst index 7274658..387d893 100644 --- a/docs/contributors_to_cupid.rst +++ b/docs/contributors_to_cupid.rst @@ -1,2 +1,2 @@ -.. include:: contributors.md +.. include:: Contributors.md :parser: myst diff --git a/docs/index.rst b/docs/index.rst index 6af8528..e636b49 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -5,10 +5,10 @@ CUPiD Documentation :maxdepth: 2 :hidden: - Contributor's Guide + Contributor's Guide Adding Notebooks Configuration File - Tips and Tricks for NCAR Machines + Tips and Tricks for NCAR Machines Contributors .. include:: README.md diff --git a/docs/ncar_tips.rst b/docs/ncar_tips.rst new file mode 100644 index 0000000..3bd2869 --- /dev/null +++ b/docs/ncar_tips.rst @@ -0,0 +1,2 @@ +.. include:: NCARtips.md + :parser: myst diff --git a/examples/key_metrics/config.yml b/examples/key_metrics/config.yml index e559ee7..17a0b9e 100644 --- a/examples/key_metrics/config.yml +++ b/examples/key_metrics/config.yml @@ -114,7 +114,7 @@ compute_notebooks: none: {} atm: - nmse_PSL: + Global_PSL_NMSE_compare_obs_lens: parameter_groups: none: regridded_output: False # it looks like output is already on f09 grid, didn't need to regrid time-series file @@ -122,7 +122,7 @@ compute_notebooks: validation_path: '/glade/campaign/cesm/development/cross-wg/diagnostic_framework/nmse_validation/fv0.9x1.25' glc: - LIWG_SMB_diagnostic: + Greenland_SMB_visual_compare_obs: parameter_groups: none: obs_path: '/glade/u/home/gunterl/obs_diagnostic_cesm/' @@ -191,7 +191,7 @@ book_toc: - caption: Atmosphere chapters: - - file: atm/nmse_PSL + - file: atm/Global_PSL_NMSE_compare_obs_lens # - caption: Ocean # chapters: @@ -207,7 +207,7 @@ book_toc: - caption: Land Ice chapters: - - file: glc/LIWG_SMB_diagnostic + - file: glc/Greenland_SMB_visual_compare_obs ##################################### # Keys for Jupyter Book _config.yml # diff --git a/examples/nblibrary/atm/nmse_PSL.ipynb b/examples/nblibrary/atm/Global_PSL_NMSE_compare_obs_lens.ipynb similarity index 100% rename from examples/nblibrary/atm/nmse_PSL.ipynb rename to examples/nblibrary/atm/Global_PSL_NMSE_compare_obs_lens.ipynb diff --git a/examples/nblibrary/glc/LIWG_SMB_diagnostic.ipynb b/examples/nblibrary/glc/Greenland_SMB_visual_compare_obs.ipynb similarity index 100% rename from examples/nblibrary/glc/LIWG_SMB_diagnostic.ipynb rename to examples/nblibrary/glc/Greenland_SMB_visual_compare_obs.ipynb