From a233b8a253fba4625f69fb262d7702c820c975c2 Mon Sep 17 00:00:00 2001 From: David Hoese Date: Tue, 17 Dec 2019 13:19:13 -0600 Subject: [PATCH 1/3] Switch to configuration file for readthedocs --- .readthedocs.yml | 12 ++++++++++++ doc/rtd_environment.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .readthedocs.yml create mode 100644 doc/rtd_environment.yml diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000000..a44ef5570e --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,12 @@ +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details +version: 2 +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: doc/conf.py + +# Optionally build your docs in additional formats such as PDF and ePub +formats: all + +conda: + environment: doc/rtd_environment.yml diff --git a/doc/rtd_environment.yml b/doc/rtd_environment.yml new file mode 100644 index 0000000000..d9a3732a9b --- /dev/null +++ b/doc/rtd_environment.yml @@ -0,0 +1,28 @@ +name: readthedocs +channels: + - conda-forge +dependencies: + - python=3.7 + - pip + - dask + - graphviz + - h5py + - imageio + - imageio-ffmpeg + - matplotlib + - netcdf4 + - numpy + - pillow + - pyorbital + - pyresample + - pyspectral + - rasterio + - setuptools + - setuptools_scm + - setuptools_scm_git_archive + - trollsift + - trollimage + - xarray + - zarr + - pip: + - graphviz From a0ac11138eff79871dacbbd3cf78ba54017979aa Mon Sep 17 00:00:00 2001 From: David Hoese Date: Tue, 17 Dec 2019 13:52:35 -0600 Subject: [PATCH 2/3] Try limiting the number of packages needed by conda --- doc/rtd_environment.yml | 12 +++--------- doc/source/conf.py | 5 ++++- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/doc/rtd_environment.yml b/doc/rtd_environment.yml index d9a3732a9b..97c32d49b6 100644 --- a/doc/rtd_environment.yml +++ b/doc/rtd_environment.yml @@ -6,23 +6,17 @@ dependencies: - pip - dask - graphviz - - h5py - - imageio - - imageio-ffmpeg - - matplotlib - - netcdf4 - numpy - pillow - - pyorbital - pyresample - - pyspectral - - rasterio - setuptools - setuptools_scm - setuptools_scm_git_archive + - sphinx + - sphinx_rtd_theme - trollsift - - trollimage - xarray - zarr - pip: - graphviz + - .. # relative path to the satpy project diff --git a/doc/source/conf.py b/doc/source/conf.py index cdfae3cbd6..ce28c35a5a 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -69,7 +69,10 @@ def __getattr__(cls, name): for mod_name in MOCK_MODULES: sys.modules[mod_name] = Mock() -autodoc_mock_imports = ['h5netcdf', 'pyninjotiff', 'pygac', 'cf', 'glymur', 'pyhdf', 'osgeo', 'mipp'] +autodoc_mock_imports = ['cf', 'glymur', 'h5netcdf', 'imageio', 'mipp', 'netCDF4', + 'pygac', 'pygrib', 'pyhdf', 'pyninjotiff', + 'pyorbital', 'pyspectral', 'rasterio', 'trollimage', + 'zarr'] autoclass_content = 'both' # append class __init__ docstring to the class docstring # -- General configuration ----------------------------------------------------- From d5b7a6a7ff3b47122443787a542541b7e789d005 Mon Sep 17 00:00:00 2001 From: David Hoese Date: Tue, 17 Dec 2019 14:07:31 -0600 Subject: [PATCH 3/3] Fix location of sphinx conf.py in rtd --- .readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index a44ef5570e..1da3abe673 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -3,7 +3,7 @@ version: 2 # Build documentation in the docs/ directory with Sphinx sphinx: - configuration: doc/conf.py + configuration: doc/source/conf.py # Optionally build your docs in additional formats such as PDF and ePub formats: all