From d2d225672dc7eae18075383b2d5e7fabfc595558 Mon Sep 17 00:00:00 2001 From: Jiwoo Lee Date: Tue, 20 Jun 2023 17:08:09 -0700 Subject: [PATCH 1/4] Create readthedocs.yml --- conda-env/conda-env/readthedocs.yml | 53 +++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 conda-env/conda-env/readthedocs.yml diff --git a/conda-env/conda-env/readthedocs.yml b/conda-env/conda-env/readthedocs.yml new file mode 100644 index 000000000..97c8f02bc --- /dev/null +++ b/conda-env/conda-env/readthedocs.yml @@ -0,0 +1,53 @@ +name: pcmdi_metrics_rtd +channels: + - conda-forge + - defaults +dependencies: + # ================== + # Base + # ================== + # NOTE: If versions are updated, also `additional_dependencies` list for mypy in `.pre-commit-config.yaml` + - python=3.10.10 + - pip=23.1.2 + - numpy=1.23.5 + - cartopy=0.21.1 + - matplotlib=3.7.1 + - cdat_info=8.2.1 + - cdms2=3.1.5 + - genutil=8.2.1 + - cdutil=8.2.1 + - cdp=1.7.0 + - eofs=1.4.0 + - seaborn=0.12.2 + - enso_metrics=1.1.1 + - xcdat=0.5.0 + - xmltodict=0.13.0 + - setuptools=67.7.2 + - netcdf4=1.6.3 + - regionmask=0.9.0 + - rasterio=1.3.6 + - shapely=2.0.1 + # ================== + # Testing + # ================== + - pre_commit=3.2.2 + - pytest=7.3.1 + - pytest-cov=4.0.0 + # ================== + # Developer Tools + # ================== + - jupyterlab=3.6.3 + - nb_conda=2.2.1 + - nb_conda_kernels=2.3.1 + # ================== + # Documentation + # ================== + - sphinx=5.3.0 + - sphinx-autosummary-accessors=2022.4.0 + - sphinx-book-theme=1.0.1 + - sphinx-copybutton=0.5.1 + - nbsphinx=0.9.1 + - pandoc=3.1.1 + - ipython=8.11.0 # Required for nbsphinx syntax highlighting + +prefix: /opt/miniconda3/envs/pcmdi_metrics_rtd From bba25ee1a1b40d2183c079e6663e465f258b785a Mon Sep 17 00:00:00 2001 From: Jiwoo Lee Date: Tue, 20 Jun 2023 17:08:58 -0700 Subject: [PATCH 2/4] Update dev.yml --- conda-env/dev.yml | 72 +++++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/conda-env/dev.yml b/conda-env/dev.yml index 3e7007965..4860c4fc9 100644 --- a/conda-env/dev.yml +++ b/conda-env/dev.yml @@ -1,40 +1,44 @@ # Conda pcmdi_metrics development environment name: pcmdi_metrics_dev channels: - - conda-forge - - defaults + - conda-forge + - defaults dependencies: - # Base - # ================== - - python=3.10.10 - - pip=23.1.2 - - numpy=1.23.5 - - cartopy=0.21.1 - - matplotlib=3.7.1 - - cdat_info=8.2.1 - - cdms2=3.1.5 - - genutil=8.2.1 - - cdutil=8.2.1 - - cdp=1.7.0 - - eofs=1.4.0 - - seaborn=0.12.2 - - enso_metrics=1.1.1 - - xcdat=0.5.0 - - xmltodict=0.13.0 - - setuptools=67.7.2 - - netcdf4=1.6.3 - - regionmask=0.9.0 - - rasterio=1.3.6 - - shapely=2.0.1 - # Testing - # ================== - - pre_commit=3.2.2 - - pytest=7.3.1 - - pytest-cov=4.0.0 - # Developer Tools - # ================== - - jupyterlab=3.6.3 - - nb_conda=2.2.1 - - nb_conda_kernels=2.3.1 + # ================== + # Base + # ================== + # NOTE: If versions are updated, also `additional_dependencies` list for mypy in `.pre-commit-config.yaml` + - python=3.10.10 + - pip=23.1.2 + - numpy=1.23.5 + - cartopy=0.21.1 + - matplotlib=3.7.1 + - cdat_info=8.2.1 + - cdms2=3.1.5 + - genutil=8.2.1 + - cdutil=8.2.1 + - cdp=1.7.0 + - eofs=1.4.0 + - seaborn=0.12.2 + - enso_metrics=1.1.1 + - xcdat=0.5.0 + - xmltodict=0.13.0 + - setuptools=67.7.2 + - netcdf4=1.6.3 + - regionmask=0.9.0 + - rasterio=1.3.6 + - shapely=2.0.1 + # ================== + # Testing + # ================== + - pre_commit=3.2.2 + - pytest=7.3.1 + - pytest-cov=4.0.0 + # ================== + # Developer Tools + # ================== + - jupyterlab=3.6.3 + - nb_conda=2.2.1 + - nb_conda_kernels=2.3.1 prefix: /opt/miniconda3/envs/pmcdi_metrics_dev From fd22735a82ea42d1d635331fdfca3baee4478ead Mon Sep 17 00:00:00 2001 From: Jiwoo Lee Date: Tue, 20 Jun 2023 17:10:45 -0700 Subject: [PATCH 3/4] pre-commit clean up --- conda-env/dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda-env/dev.yml b/conda-env/dev.yml index 4860c4fc9..0cd7518c9 100644 --- a/conda-env/dev.yml +++ b/conda-env/dev.yml @@ -39,6 +39,6 @@ dependencies: # ================== - jupyterlab=3.6.3 - nb_conda=2.2.1 - - nb_conda_kernels=2.3.1 + - nb_conda_kernels=2.3.1 prefix: /opt/miniconda3/envs/pmcdi_metrics_dev From f839fdd722e5b16e55c0e6d599d2ff66d061d883 Mon Sep 17 00:00:00 2001 From: Jiwoo Lee Date: Tue, 20 Jun 2023 17:19:35 -0700 Subject: [PATCH 4/4] clean up and update --- conda-env/{conda-env => }/readthedocs.yml | 0 docs/README.md | 8 +++++++- 2 files changed, 7 insertions(+), 1 deletion(-) rename conda-env/{conda-env => }/readthedocs.yml (100%) diff --git a/conda-env/conda-env/readthedocs.yml b/conda-env/readthedocs.yml similarity index 100% rename from conda-env/conda-env/readthedocs.yml rename to conda-env/readthedocs.yml diff --git a/docs/README.md b/docs/README.md index 381f9b38c..797b5bdbf 100755 --- a/docs/README.md +++ b/docs/README.md @@ -5,7 +5,13 @@ This branch hosts the online documentation for the PCMDI Metrics packages. Provi Checking out and making changes to the docs branch: --------------------------------------------------- -You must be in a conda environment with "sphinx" and "sphinx_rtd_theme" installed +You must be in a conda environment with "sphinx", "sphinx_rtd_theme", and other sphinx-related libraries listed in `conda-env/readthedocs.yml` installed. Otherwise, create your env following below +``` +cd pcmdi_metrics +conda env create -n -f conda-env/readthedocs.yml +conda activate +``` +Once your environment is ready ``` git pull origin main (optional, grab latest updates) git checkout -b