@@ -82,11 +82,14 @@ def __getattr__(cls, name):
8282
8383# -- General configuration -----------------------------------------------------
8484
85+ # sphinxcontrib.apidoc was added to sphinx in 8.2.0 as sphinx.etx.apidoc
86+ needs_sphinx = "8.2.0"
87+
8588# Add any Sphinx extension module names here, as strings. They can be extensions
8689# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
8790extensions = ["sphinx.ext.autodoc" , "sphinx.ext.intersphinx" , "sphinx.ext.todo" , "sphinx.ext.coverage" ,
8891 "sphinx.ext.doctest" , "sphinx.ext.napoleon" , "sphinx.ext.autosummary" , "sphinx.ext.autosectionlabel" ,
89- "doi_role" , "sphinx.ext.viewcode" , "sphinxcontrib .apidoc" ,
92+ "doi_role" , "sphinx.ext.viewcode" , "sphinx.ext .apidoc" ,
9093 "sphinx.ext.mathjax" ]
9194
9295# Autosectionlabel
@@ -95,18 +98,25 @@ def __getattr__(cls, name):
9598autosectionlabel_maxdepth = 3
9699
97100# API docs
98- apidoc_module_dir = "../../satpy"
99- apidoc_output_dir = "api"
100- apidoc_excluded_paths = [
101- "readers/caliop_l2_cloud.py" ,
102- "readers/ghrsst_l3c_sst.py" ,
103- "readers/li_l2.py" ,
104- "readers/scatsat1_l2b.py" ,
101+ apidoc_modules = [
102+ {
103+ "path" : "../../satpy" ,
104+ "destination" : "api/" ,
105+ "exclude_patterns" : [
106+ "../../satpy/readers/caliop_l2_cloud.py" ,
107+ "../../satpy/readers/ghrsst_l3c_sst.py" ,
108+ "../../satpy/readers/scatsat1_l2b.py" ,
109+ # Prefer to not document test modules. Most users will look at
110+ # source code if needed and we want to avoid documentation builds
111+ # suffering from import-time test data creation. We want to keep
112+ # things contributors might be interested in like satpy.tests.utils.
113+ "../../satpy/tests/test_*.py" ,
114+ "../../satpy/tests/**/test_*.py" ,
115+ ],
116+ },
105117]
106118apidoc_separate_modules = True
107- apidoc_extra_args = [
108- "--private" ,
109- ]
119+ apidoc_include_private = True
110120
111121# Add any paths that contain templates here, relative to this directory.
112122templates_path = ["_templates" ]
@@ -297,7 +307,7 @@ def __getattr__(cls, name):
297307 "scipy" : ("https://scipy.github.io/devdocs" , None ),
298308 "trollimage" : ("https://trollimage.readthedocs.io/en/stable" , None ),
299309 "trollsift" : ("https://trollsift.readthedocs.io/en/stable" , None ),
300- "xarray" : ("https://xarray.pydata.org /en/stable" , None ),
310+ "xarray" : ("https://docs. xarray.dev /en/stable" , None ),
301311 "rasterio" : ("https://rasterio.readthedocs.io/en/latest" , None ),
302312 "donfig" : ("https://donfig.readthedocs.io/en/latest" , None ),
303313 "pooch" : ("https://www.fatiando.org/pooch/latest/" , None ),
0 commit comments