Skip to content

Commit a950fcc

Browse files
authored
Merge pull request #3068 from djhoese/ci-workflow-warns
Update sphinx to use new sphinx.ext.apidoc extension
2 parents faec582 + 9b43c72 commit a950fcc

File tree

4 files changed

+25
-17
lines changed

4 files changed

+25
-17
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ jobs:
118118
uses: codecov/codecov-action@v5
119119
with:
120120
flags: unittests
121-
file: ./coverage.xml
121+
files: ./coverage.xml
122122
env_vars: OS,PYTHON_VERSION,UNSTABLE
123123

124124
- name: Coveralls Parallel
@@ -139,7 +139,7 @@ jobs:
139139
uses: codecov/codecov-action@v5
140140
with:
141141
flags: behaviourtests
142-
file: ./coverage.xml
142+
files: ./coverage.xml
143143
env_vars: OS,PYTHON_VERSION,UNSTABLE
144144

145145
coveralls:

doc/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ help:
2929

3030
clean:
3131
-rm -rf $(BUILDDIR)/*
32-
-rm -rf source/api/*.rst
3332

3433
html:
3534
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html

doc/rtd_environment.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ dependencies:
2525
- rioxarray
2626
- setuptools
2727
- setuptools_scm
28-
- sphinx
28+
- sphinx>=8.2.0
2929
- sphinx_rtd_theme
30-
- sphinxcontrib-apidoc
3130
- trollsift
3231
- xarray
3332
- zarr

doc/source/conf.py

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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.
8790
extensions = ["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):
9598
autosectionlabel_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
]
106118
apidoc_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.
112122
templates_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

Comments
 (0)