Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update doc configuration #214

Merged
merged 1 commit into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading