Allow newer Sphinx version and fix docbuild warnings (#3571)

This commit is contained in:
Paul Romano 2025-09-18 23:27:41 -05:00 committed by GitHub
parent 607f6babe5
commit 007ac8148b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 14 additions and 13 deletions

View file

@ -121,9 +121,7 @@ pygments_style = 'tango'
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_baseurl = "https://docs.openmc.org/en/stable/"
html_logo = '_images/openmc_logo.png'

View file

@ -12,6 +12,7 @@ from copy import deepcopy
from inspect import signature
from numbers import Real, Integral
from pathlib import Path
from textwrap import dedent
import time
from typing import Optional, Union, Sequence
from warnings import warn
@ -526,7 +527,7 @@ class Integrator(ABC):
r"""Abstract class for solving the time-integration for depletion
"""
_params = r"""
_params = dedent(r"""
Parameters
----------
operator : openmc.deplete.abc.TransportOperator
@ -617,7 +618,7 @@ class Integrator(ABC):
.. versionadded:: 0.15.3
"""
""")
def __init__(
self,
@ -1020,7 +1021,7 @@ class SIIntegrator(Integrator):
the number of particles used in initial transport calculation
"""
_params = r"""
_params = dedent(r"""
Parameters
----------
operator : openmc.deplete.abc.TransportOperator
@ -1108,7 +1109,7 @@ class SIIntegrator(Integrator):
.. versionadded:: 0.12
"""
""")
def __init__(
self,

View file

@ -22,7 +22,6 @@ class PredictorIntegrator(Integrator):
.. math::
\mathbf{n}_{i+1} = \exp\left(h\mathbf{A}(\mathbf{n}_i) \right) \mathbf{n}_i
"""
_num_stages = 1

View file

@ -2,6 +2,7 @@ import copy
from numbers import Integral
import os
import warnings
from textwrap import dedent
import h5py
import numpy as np
@ -164,7 +165,7 @@ class MGXS:
"""
_params = """
_params = dedent("""
Parameters
----------
domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.RegularMesh
@ -251,7 +252,7 @@ class MGXS:
.. versionadded:: 0.13.1
"""
""")
# Store whether or not the number density should be removed for microscopic
# values of this data

View file

@ -1,6 +1,7 @@
from collections.abc import Iterable, Mapping
from numbers import Integral, Real
from pathlib import Path
from textwrap import dedent
import h5py
import lxml.etree as ET
@ -167,7 +168,8 @@ _SVG_COLORS = {
'yellowgreen': (154, 205, 50)
}
_PLOT_PARAMS = """
_PLOT_PARAMS = dedent("""\
Parameters
----------
origin : iterable of float
@ -249,7 +251,7 @@ _PLOT_PARAMS = """
-------
matplotlib.axes.Axes
Axes containing resulting image
"""
""")
# Decorator for consistently adding plot parameters to docstrings (Model.plot,

View file

@ -41,12 +41,12 @@ dependencies = [
[project.optional-dependencies]
depletion-mpi = ["mpi4py"]
docs = [
"sphinx==5.0.2",
"sphinx",
"sphinxcontrib-katex",
"sphinx-numfig",
"jupyter",
"sphinxcontrib-svg2pdfconverter",
"sphinx-rtd-theme==1.0.0"
"sphinx-rtd-theme"
]
test = ["packaging", "pytest", "pytest-cov", "colorama", "openpyxl"]
ci = ["cpp-coveralls", "coveralls"]