Skip to content

Commit

Permalink
Merge pull request #2446 from desihub/update-rtd-config
Browse files Browse the repository at this point in the history
Update RTD configuration
  • Loading branch information
weaverba137 authored Feb 28, 2025
2 parents c717572 + a662faa commit 6986d7d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: python -m pip install --upgrade pip setuptools wheel Sphinx
run: python -m pip install --upgrade pip setuptools wheel Sphinx sphinx-rtd-theme
# run: python -m pip install --upgrade pip wheel docutils\<0.18 Sphinx==3.1.2
- name: Test the documentation
run: sphinx-build -W --keep-going -b html doc doc/_build/html
Expand Down
27 changes: 4 additions & 23 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@
#
# All configuration values have a default; values that are commented out
# serve to show the default.

from __future__ import absolute_import, division, print_function, unicode_literals

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 @@ -27,17 +23,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 @@ -47,7 +32,8 @@
'sphinx.ext.todo',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon'
'sphinx.ext.napoleon',
'sphinx_rtd_theme'
]

# Configuration for intersphinx, copied from astropy.
Expand Down Expand Up @@ -75,7 +61,7 @@

# General information about the project.
project = 'desispec'
copyright = '2014-2016, DESI Collaboration'
copyright = '2014-2025, 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 @@ -148,12 +134,7 @@
# a list of builtin themes.
#html_theme = 'default'
#html_theme = 'haiku'
try:
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
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
6 changes: 2 additions & 4 deletions doc/rtd-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
setuptools>60
Sphinx>6,<7
sphinx-rtd-theme>1
urllib3<2
jinja2>3.1
sphinx-rtd-theme>1.2

0 comments on commit 6986d7d

Please sign in to comment.