Skip to content

Commit

Permalink
Update doc configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverba137 committed Mar 3, 2025
1 parent bdeb05e commit 541fd5b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: python -m pip install --upgrade pip setuptools wheel Sphinx sphinx-toolbox
run: python -m pip install --upgrade pip setuptools wheel Sphinx sphinx-toolbox sphinx-rtd-theme
- name: Test the documentation
run: sphinx-build -W --keep-going -b html doc doc/_build/html

Expand Down
33 changes: 9 additions & 24 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import sys
import os
import os.path
from importlib import import_module
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand All @@ -23,17 +22,6 @@

# If your documentation needs a minimal Sphinx version, state it here.

try:
import sphinx.ext.napoleon
napoleon_extension = 'sphinx.ext.napoleon'
except ImportError:
try:
import sphinxcontrib.napoleon
napoleon_extension = 'sphinxcontrib.napoleon'
needs_sphinx = '1.2'
except ImportError:
needs_sphinx = '1.3'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
Expand All @@ -44,17 +32,18 @@
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinx_toolbox.collapse',
'sphinx.ext.napoleon'
'sphinx.ext.napoleon',
'sphinx_rtd_theme'
]

# Configuration for intersphinx, copied from astropy.
intersphinx_mapping = {
'python': ('http://docs.python.org/3/', None),
'python': ('https://docs.python.org/3/', None),
'numpy': ('https://numpy.org/doc/stable/', None),
'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None),
'matplotlib': ('http://matplotlib.org/', None),
'astropy': ('http://docs.astropy.org/en/stable/', None),
'h5py': ('http://docs.h5py.org/en/latest/', None),
'scipy': ('https://docs.scipy.org/doc/scipy/', None),
'matplotlib': ('https://matplotlib.org/stable/', None),
'astropy': ('https://docs.astropy.org/en/stable/', None),
'h5py': ('https://docs.h5py.org/en/latest/', None),
'desiutil': ('https://desiutil.readthedocs.io/en/latest/', None),
}

Expand All @@ -72,7 +61,7 @@

# General information about the project.
project = u'fastspecfit'
copyright = u'2019-2024, John Moustakas & the DESI Collaboration'
copyright = u'2019-2025, John Moustakas & the DESI Collaboration'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -147,11 +136,7 @@
# a list of builtin themes.
#html_theme = 'default'
#html_theme = 'haiku'
try:
import sphinx_rtd_theme # pip install sphinx-rtd-theme
html_theme = 'sphinx_rtd_theme'
except ImportError:
pass
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down

0 comments on commit 541fd5b

Please sign in to comment.