Skip to content

Commit 007ac81

Browse files
authored
Allow newer Sphinx version and fix docbuild warnings (#3571)
1 parent 607f6ba commit 007ac81

6 files changed

Lines changed: 14 additions & 13 deletions

File tree

docs/source/conf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,7 @@
121121
# -- Options for HTML output ---------------------------------------------------
122122

123123
# The theme to use for HTML and HTML Help pages
124-
import sphinx_rtd_theme
125124
html_theme = 'sphinx_rtd_theme'
126-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
127125
html_baseurl = "https://docs.openmc.org/en/stable/"
128126

129127
html_logo = '_images/openmc_logo.png'

openmc/deplete/abc.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from inspect import signature
1313
from numbers import Real, Integral
1414
from pathlib import Path
15+
from textwrap import dedent
1516
import time
1617
from typing import Optional, Union, Sequence
1718
from warnings import warn
@@ -526,7 +527,7 @@ class Integrator(ABC):
526527
r"""Abstract class for solving the time-integration for depletion
527528
"""
528529

529-
_params = r"""
530+
_params = dedent(r"""
530531
Parameters
531532
----------
532533
operator : openmc.deplete.abc.TransportOperator
@@ -617,7 +618,7 @@ class Integrator(ABC):
617618
618619
.. versionadded:: 0.15.3
619620
620-
"""
621+
""")
621622

622623
def __init__(
623624
self,
@@ -1020,7 +1021,7 @@ class SIIntegrator(Integrator):
10201021
the number of particles used in initial transport calculation
10211022
"""
10221023

1023-
_params = r"""
1024+
_params = dedent(r"""
10241025
Parameters
10251026
----------
10261027
operator : openmc.deplete.abc.TransportOperator
@@ -1108,7 +1109,7 @@ class SIIntegrator(Integrator):
11081109
11091110
.. versionadded:: 0.12
11101111
1111-
"""
1112+
""")
11121113

11131114
def __init__(
11141115
self,

openmc/deplete/integrators.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class PredictorIntegrator(Integrator):
2222
2323
.. math::
2424
\mathbf{n}_{i+1} = \exp\left(h\mathbf{A}(\mathbf{n}_i) \right) \mathbf{n}_i
25-
2625
"""
2726
_num_stages = 1
2827

openmc/mgxs/mgxs.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from numbers import Integral
33
import os
44
import warnings
5+
from textwrap import dedent
56

67
import h5py
78
import numpy as np
@@ -164,7 +165,7 @@ class MGXS:
164165
165166
"""
166167

167-
_params = """
168+
_params = dedent("""
168169
Parameters
169170
----------
170171
domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.RegularMesh
@@ -251,7 +252,7 @@ class MGXS:
251252
252253
.. versionadded:: 0.13.1
253254
254-
"""
255+
""")
255256

256257
# Store whether or not the number density should be removed for microscopic
257258
# values of this data

openmc/plots.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from collections.abc import Iterable, Mapping
22
from numbers import Integral, Real
33
from pathlib import Path
4+
from textwrap import dedent
45

56
import h5py
67
import lxml.etree as ET
@@ -167,7 +168,8 @@
167168
'yellowgreen': (154, 205, 50)
168169
}
169170

170-
_PLOT_PARAMS = """
171+
_PLOT_PARAMS = dedent("""\
172+
171173
Parameters
172174
----------
173175
origin : iterable of float
@@ -249,7 +251,7 @@
249251
-------
250252
matplotlib.axes.Axes
251253
Axes containing resulting image
252-
"""
254+
""")
253255

254256

255257
# Decorator for consistently adding plot parameters to docstrings (Model.plot,

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ dependencies = [
4141
[project.optional-dependencies]
4242
depletion-mpi = ["mpi4py"]
4343
docs = [
44-
"sphinx==5.0.2",
44+
"sphinx",
4545
"sphinxcontrib-katex",
4646
"sphinx-numfig",
4747
"jupyter",
4848
"sphinxcontrib-svg2pdfconverter",
49-
"sphinx-rtd-theme==1.0.0"
49+
"sphinx-rtd-theme"
5050
]
5151
test = ["packaging", "pytest", "pytest-cov", "colorama", "openpyxl"]
5252
ci = ["cpp-coveralls", "coveralls"]

0 commit comments

Comments
 (0)