From 63983c462adfa82a715c99423c9f146f495c9e0a Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Wed, 30 Sep 2026 05:50:58 -0700 Subject: [PATCH] fix(rtd): install docs dependency group in RTD build #2809 moved the docs requirements from the `doc` extra to a `docs` dependency group, but .readthedocs.yml still installed `.[doc]`. The extra no longer exists, so RTD installed bare flopy and the build failed importing yaml in conf.py (and got unpinned sphinx). Override the install job to install the `docs` group (needs pip >= 25.1). Co-Authored-By: Claude Opus 5.5 --- .readthedocs.yml | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 43dde5ed0a..1cff00629b 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -10,16 +10,19 @@ build: os: ubuntu-22.04 tools: python: "3.11" - # todo: uncomment below if notebooks are to be executed in RTD build - # instead of in CI as currently, requires runtime reduction <15 mins - # jobs: - # post_create_environment: - # # install MODFLOW6 and related executables (notebooks need them) - # - get-modflow :python - # # swap default vtk for vtk-osmesa (avoid PyVista openGL errors) - # # https://github.com/pyvista/pyvista/blob/main/.github/workflows/vtk-pre-test.yml#L53 - # - pip uninstall -y vtk - # - pip install --extra-index-url https://wheels.vtk.org trame vtk-osmesa + jobs: + install: + - pip install --upgrade "pip>=25.1" + - pip install --group docs . + # todo: uncomment below if notebooks are to be executed in RTD build + # instead of in CI as currently, requires runtime reduction <15 mins + # post_install: + # # install MODFLOW6 and related executables (notebooks need them) + # - get-modflow :python + # # swap default vtk for vtk-osmesa (avoid PyVista openGL errors) + # # https://github.com/pyvista/pyvista/blob/main/.github/workflows/vtk-pre-test.yml#L53 + # - pip uninstall -y vtk + # - pip install --extra-index-url https://wheels.vtk.org trame vtk-osmesa # Build documentation in the docs/ directory with Sphinx sphinx: @@ -28,11 +31,3 @@ sphinx: # Build only html and htmlzip (skip others, including PDF and EPUB) formats: - htmlzip - -# Set the Python version and requirements -python: - install: - - method: pip - path: . - extra_requirements: - - doc