Skip to content
conf.py 1.54 KiB
Newer Older
Alexandru Fikl's avatar
Alexandru Fikl committed
import sys
from importlib import metadata
from urllib.request import urlopen
_conf_url = \
        "https://raw.githubusercontent.com/inducer/sphinxconfig/main/sphinxconfig.py"
with urlopen(_conf_url) as _inf:
    exec(compile(_inf.read(), _conf_url, "exec"), globals())
Alexandru Fikl's avatar
Alexandru Fikl committed
copyright = "2013-21, Andreas Kloeckner"
Alexandru Fikl's avatar
Alexandru Fikl committed
release = metadata.version("boxtree")
version = ".".join(release.split(".")[:2])

intersphinx_mapping = {
    "arraycontext": ("https://documen.tician.de/arraycontext", None),
    "meshmode": ("https://documen.tician.de/meshmode", None),
    "numpy": ("https://numpy.org/doc/stable", None),
    "pyopencl": ("https://documen.tician.de/pyopencl", None),
    "pytential": ("https://documen.tician.de/pytential", None),
    "python": ("https://docs.python.org/3", None),
}
xywei's avatar
xywei committed

nitpick_ignore_regex = [
    ["py:class", r"numpy._?typing._generic_alias.ScalarType"],
]

# Some modules need to import things just so that sphinx can resolve symbols in
# type annotations. Often, we do not want these imports (e.g. of PyOpenCL) when
# in normal use (because they would introduce unintended side effects or hard
# dependencies). This flag exists so that these imports only occur during doc
# build. Since sphinx appears to resolve type hints lexically (as it should),
# this needs to be cross-module (since, e.g. an inherited arraycontext
# docstring can be read by sphinx when building meshmode, a dependent package),
# this needs a setting of the same name across all packages involved, that's
# why this name is as global-sounding as it is.
sys._BUILDING_SPHINX_DOCS = True