Skip to content

Commit

Permalink
MNT: Fix doc build with Sphinx
Browse files Browse the repository at this point in the history
Instead of using the sphinx-autogen script, we can now, as of Sphinx
2.1, just set a couple variables in conf.py. This is good, because
running the script seems completely broken with 2.3.
  • Loading branch information
dopplershift committed Dec 21, 2019
1 parent 526db68 commit dd998a0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
3 changes: 0 additions & 3 deletions docs/Makefile
Expand Up @@ -4,7 +4,6 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXAUTOGEN = sphinx-autogen
SPHINXPROJ = MetPy
SOURCEDIR = .
BUILDDIR = build
Expand All @@ -28,6 +27,4 @@ overridecheck:
# Manual autogen needed so we can specify the -i option so that imported names
# are included in generation
%: Makefile
echo Running sphinx-autogen
@$(SPHINXAUTOGEN) -i -t $(SOURCEDIR)/_templates -o $(SOURCEDIR)/api/generated $(SOURCEDIR)/api/*.rst
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
6 changes: 5 additions & 1 deletion docs/conf.py
Expand Up @@ -25,7 +25,7 @@
# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = '1.8'
needs_sphinx = '2.1'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Expand Down Expand Up @@ -82,6 +82,10 @@
# The suffix of source filenames.
source_suffix = ['.rst', '.md']

# Controlling automatically generating summary tables in the docs
autosummary_generate = True
autosummary_imported_members = True

# The encoding of source files.
# source_encoding = 'utf-8-sig'

Expand Down
2 changes: 1 addition & 1 deletion docs/infrastructureguide.rst
Expand Up @@ -31,7 +31,7 @@ This will also create a new stable set of documentation.
Documentation
-------------

MetPy's documentation is built using sphinx >= 1.8. API documentation is automatically
MetPy's documentation is built using sphinx >= 2.1. API documentation is automatically
generated from docstrings, written using the
`NumPy docstring standard <https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt>`_.
There are also example scripts in the ``examples`` directory. Using the ``sphinx-gallery``
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -52,7 +52,7 @@ where = src

[options.extras_require]
dev = ipython[all]>=3.1
doc = sphinx>=1.8; sphinx-gallery>=0.4; doc8; m2r; netCDF4
doc = sphinx>=2.1; sphinx-gallery>=0.4; doc8; m2r; netCDF4
examples = cartopy>=0.13.1; matplotlib>=2.2.0; pyproj>=1.9.4,!=2.0.0
test = pytest>=2.4; pytest-mpl; pytest-flake8; cartopy>=0.16.0; flake8>3.2.0; flake8-builtins!=1.4.0; flake8-comprehensions; flake8-copyright; flake8-docstrings; flake8-import-order; flake8-mutable; flake8-pep3101; flake8-print; flake8-quotes; flake8-rst-docstrings; pep8-naming; netCDF4; pyproj>=1.9.4,!=2.0.0

Expand Down

0 comments on commit dd998a0

Please sign in to comment.