From 7c3e0dd6275c2604c63e2926b6f3cb8e6d10f323 Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Mon, 20 Nov 2023 13:23:08 -0500 Subject: [PATCH 1/4] address several documentation warnings --- CHANGELOG.rst | 8 ++++---- HOWTORELEASE.rst | 5 ++--- docs/source/alignment.ipynb | 2 +- docs/source/api.rst | 6 +++--- .../api/climpred.bootstrap.bootstrap_compute.rst | 2 -- .../api/climpred.prediction.compute_hindcast.rst | 2 -- docs/source/conf.py | 12 +++++------- 7 files changed, 15 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e85868941..c662ce2d2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -658,7 +658,7 @@ Internals/Minor Fixes (:issue:`402`, :pr:`403`) `Aaron Spring`_. - ``dim`` is expected to be a list of strings in :py:func:`~climpred.prediction.compute_perfect_model` and - :py:func:`~climpred.prediction.compute_hindcast`. + `~climpred.prediction.compute_hindcast`. (:issue:`282`, :pr:`407`) `Aaron Spring`_. - Update ``cartopy`` requirement to 0.0.18 or greater to release lock on ``matplotlib`` version. Update ``xskillscore`` requirement to 0.0.18 to @@ -747,7 +747,7 @@ Internals/Minor Fixes (:pr:`330`) `Aaron Spring`_. - Remove ``member`` coords for ``m2c`` comparison for probabilistic metrics. (:pr:`330`) `Aaron Spring`_. -- Refactored :py:func:`~climpred.prediction.compute_hindcast` and +- Refactored ``~climpred.prediction.compute_hindcast`` and :py:func:`~climpred.prediction.compute_perfect_model`. (:pr:`330`) `Aaron Spring`_. - Changed lead0 coordinate modifications to be compliant with ``xarray=0.15.1`` in :py:func:`~climpred.reference.compute_persistence`. (:pr:`348`) `Aaron Spring`_. @@ -763,8 +763,8 @@ Internals/Minor Fixes - Require ``cftime v1.1.2``, which modifies their object handling to create 200-400x speedups in some basic operations. (:pr:`356`) `Riley X. Brady`_. - Resample first and then calculate skill in - :py:func:`~climpred.bootstrap.bootstrap_perfect_model` and - :py:func:`~climpred.bootstrap.bootstrap_hindcast` (:pr:`355`) `Aaron Spring`_. + `~climpred.bootstrap.bootstrap_perfect_model` and + `~climpred.bootstrap.bootstrap_hindcast` (:pr:`355`) `Aaron Spring`_. Documentation ------------- diff --git a/HOWTORELEASE.rst b/HOWTORELEASE.rst index 37dcf8156..bc8de9c88 100644 --- a/HOWTORELEASE.rst +++ b/HOWTORELEASE.rst @@ -18,14 +18,13 @@ changes, a minor version adds functionality, and a patch covers bug fixes. $ git tag -a v1.0.0 -m "Version 1.0.0" $ git push upstream main --tags -#. We use Github Actions to automate the new release being published to TestPyPI (staging) and PyPI (production). - When a tag is pushed to the repository, the following happens: +#. We use Github Actions to automate the new release being published to TestPyPI (staging) and PyPI (production). When a tag is pushed to the repository, the following happens: - A new release is drafted on Github - The library is built and a workflow is staged for publishing to TestPyPI - A maintainer must manually approve the workflow to publish to TestPyPI - If everything clears, maintainers can then finalize the release on GitHub, triggering an upload to PyPI - If you wish to circumvent the GitHub Actions for whatever reason, you can manually do it by running the following:: + If you wish to circumvent the GitHub Actions for whatever reason, you can manually do it by running the following:: $ git clean -xfd # remove any files not checked into git $ python -m build # build package diff --git a/docs/source/alignment.ipynb b/docs/source/alignment.ipynb index 278f2a1f8..bcb91356c 100644 --- a/docs/source/alignment.ipynb +++ b/docs/source/alignment.ipynb @@ -11,7 +11,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "#### Verification Alignment\n", + "# Verification Alignment\n", "\n", "A forecast is verified by comparing a set of initializations at a given lead to\n", "observations over some window of time. However, there are a few ways to decide *which*\n", diff --git a/docs/source/api.rst b/docs/source/api.rst index f5bb7ce30..26990a06e 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -220,9 +220,9 @@ Bootstrap bootstrap_uninit_pm_ensemble_from_control_cftime bootstrap_uninitialized_ensemble - resample_skill_exclude_resample_dim_from_dim, - resample_skill_loop, - resample_skill_resample_before, + resample_skill_exclude_resample_dim_from_dim + resample_skill_loop + resample_skill_resample_before dpp_threshold varweighted_mean_period_threshold diff --git a/docs/source/api/climpred.bootstrap.bootstrap_compute.rst b/docs/source/api/climpred.bootstrap.bootstrap_compute.rst index 5b0233334..4c173832d 100644 --- a/docs/source/api/climpred.bootstrap.bootstrap_compute.rst +++ b/docs/source/api/climpred.bootstrap.bootstrap_compute.rst @@ -2,5 +2,3 @@ climpred.bootstrap.bootstrap\_compute ===================================== .. currentmodule:: climpred.bootstrap - -.. autofunction:: bootstrap_compute diff --git a/docs/source/api/climpred.prediction.compute_hindcast.rst b/docs/source/api/climpred.prediction.compute_hindcast.rst index d440fbf42..59cd8344f 100644 --- a/docs/source/api/climpred.prediction.compute_hindcast.rst +++ b/docs/source/api/climpred.prediction.compute_hindcast.rst @@ -2,5 +2,3 @@ climpred.prediction.compute\_hindcast ===================================== .. currentmodule:: climpred.prediction - -.. autofunction:: compute_hindcast diff --git a/docs/source/conf.py b/docs/source/conf.py index d5722a520..49c5fbfc4 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -125,7 +125,6 @@ html_theme_options = { "repository_url": "https://github.com/pangeo-data/climpred", "use_edit_page_button": True, - "navbar_end": "search-field.html", "repository_branch": "main", "path_to_docs": "docs/source", "use_edit_page_button": True, @@ -151,12 +150,12 @@ intersphinx_mapping = { "python": ("https://docs.python.org/3/", None), - "xarray": ("https://xarray.pydata.org/en/stable/", None), + "esmtools": ("https://esmtools.readthedocs.io/en/latest", None), + "numpy": ("https://numpy.org/doc/stable", None), "pandas": ("https://pandas.pydata.org/pandas-docs/stable", None), - "numpy": ("https://docs.scipy.org/doc/numpy/", None), + "xarray": ("https://docs.xarray.dev/en/stable", None), + "xclim": ("https://xclim.readthedocs.io/en/latest", None), "xskillscore": ("https://xskillscore.readthedocs.io/en/stable", None), - "xclim": ("https://xclim.readthedocs.io/en/latest/", None), - "esmtools": ("https://esmtools.readthedocs.io/en/latest/", None), } # Should only be uncommented when testing page development while notebooks @@ -165,8 +164,7 @@ nbsphinx_allow_errors = True nbsphinx_timeout = 600 nbsphinx_execute = "auto" # "never" "always" -jupyter_execute_notebooks = "auto" - +nb_execution_mode = "auto" # Napoleon configurations napoleon_google_docstring = True From bdc3bdd8907a2c7dd43d8bbdd0c7c21866d07199 Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Mon, 20 Nov 2023 13:33:41 -0500 Subject: [PATCH 2/4] pin sphinx-book-theme --- ci/requirements/docs.yml | 6 +++--- setup.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ci/requirements/docs.yml b/ci/requirements/docs.yml index 633f629a2..e39a1c9a1 100644 --- a/ci/requirements/docs.yml +++ b/ci/requirements/docs.yml @@ -16,7 +16,7 @@ dependencies: - myst-nb - nbstripout - sphinx - - sphinx-book-theme + - sphinx-book-theme >=0.3.3 - sphinx-copybutton - sphinxcontrib-bibtex - sphinxcontrib-napoleon @@ -26,8 +26,8 @@ dependencies: - bias_correction - esmpy=*=mpi* # Ensures MPI works with version of esmpy. - esmtools - - nc-time-axis>=1.4.0 - - numba>=0.52 + - nc-time-axis >=1.4.0 + - numba >=0.52 - xclim - xesmf - xrft diff --git a/setup.py b/setup.py index 493834f6e..b386a2e60 100644 --- a/setup.py +++ b/setup.py @@ -54,7 +54,7 @@ "myst_nb", "sphinx", "sphinx-copybutton", - "sphinx_book_theme", + "sphinx-book-theme>=0.3.3", "sphinxcontrib-bibtex", "sphinxcontrib-napoleon", ] From 77943c3dbf7c347187ed802895966cdf75f8a4d0 Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Mon, 20 Nov 2023 15:20:23 -0500 Subject: [PATCH 3/4] remove deprecated function references --- CHANGELOG.rst | 4 ++-- docs/source/api/climpred.bootstrap.bootstrap_hindcast.rst | 2 -- .../source/api/climpred.bootstrap.bootstrap_perfect_model.rst | 2 -- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c662ce2d2..6658304ef 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -721,8 +721,8 @@ The major change for this release is a dramatic speedup in bootstrapping functio - Bootstrapping uninitialized skill in the perfect model framework is now sped up significantly for annual lead resolution. (:pr:`332`) `Aaron Spring`_. -- General speedup in :py:func:`~climpred.bootstrap.bootstrap_hindcast` and - :py:func:`~climpred.bootstrap.bootstrap_perfect_model`: (:pr:`285`) `Aaron Spring`_. +- General speedup in ``~climpred.bootstrap.bootstrap_hindcast`` and + ``~climpred.bootstrap.bootstrap_perfect_model``: (:pr:`285`) `Aaron Spring`_. * Properly implemented handling for lazy results when inputs are chunked. diff --git a/docs/source/api/climpred.bootstrap.bootstrap_hindcast.rst b/docs/source/api/climpred.bootstrap.bootstrap_hindcast.rst index f4e9e3046..47ea87424 100644 --- a/docs/source/api/climpred.bootstrap.bootstrap_hindcast.rst +++ b/docs/source/api/climpred.bootstrap.bootstrap_hindcast.rst @@ -2,5 +2,3 @@ climpred.bootstrap.bootstrap\_hindcast ====================================== .. currentmodule:: climpred.bootstrap - -.. autofunction:: bootstrap_hindcast diff --git a/docs/source/api/climpred.bootstrap.bootstrap_perfect_model.rst b/docs/source/api/climpred.bootstrap.bootstrap_perfect_model.rst index c608c49e6..b0948df82 100644 --- a/docs/source/api/climpred.bootstrap.bootstrap_perfect_model.rst +++ b/docs/source/api/climpred.bootstrap.bootstrap_perfect_model.rst @@ -2,5 +2,3 @@ climpred.bootstrap.bootstrap\_perfect\_model ============================================ .. currentmodule:: climpred.bootstrap - -.. autofunction:: bootstrap_perfect_model From a5cb6d53320533e28ed4801d6551a55e01a33453 Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Mon, 20 Nov 2023 15:32:53 -0500 Subject: [PATCH 4/4] update CHANGELOG.rst --- CHANGELOG.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6658304ef..41ba11f19 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,12 @@ What's New # cut border when saving (for maps) mpl.rcParams["savefig.bbox"] = "tight" +climpred v2.5.0 (unreleased) +============================ + +Internals/Minor Fixes +--------------------- +- Fixed some issues with the documentation build to address rendering errors and reduce the number of warnings on ReadTheDocs. (pr:`843`) `Trevor James Smith`_ climpred v2.4.0 (2023-11-09) ============================