diff --git a/docs/_inventories/arviz.inv b/docs/_inventories/arviz.inv new file mode 100644 index 0000000..10d1b98 Binary files /dev/null and b/docs/_inventories/arviz.inv differ diff --git a/docs/_inventories/matplotlib.inv b/docs/_inventories/matplotlib.inv new file mode 100644 index 0000000..fbcc6b8 Binary files /dev/null and b/docs/_inventories/matplotlib.inv differ diff --git a/docs/_inventories/numpy.inv b/docs/_inventories/numpy.inv new file mode 100644 index 0000000..63ee8d9 Binary files /dev/null and b/docs/_inventories/numpy.inv differ diff --git a/docs/_inventories/pandas.inv b/docs/_inventories/pandas.inv new file mode 100644 index 0000000..49bd40b Binary files /dev/null and b/docs/_inventories/pandas.inv differ diff --git a/docs/_inventories/pymc.inv b/docs/_inventories/pymc.inv new file mode 100644 index 0000000..1f5126a Binary files /dev/null and b/docs/_inventories/pymc.inv differ diff --git a/docs/_inventories/python.inv b/docs/_inventories/python.inv new file mode 100644 index 0000000..d060a10 Binary files /dev/null and b/docs/_inventories/python.inv differ diff --git a/docs/conf.py b/docs/conf.py index 1e837ba..a654524 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -115,13 +115,28 @@ codeautolink_autodoc_inject = True # -- Intersphinx ------------------------------------------------------------- +# Each mapping lists two inventory locations: the upstream one (`None` means +# "objects.inv"), then a vendored copy under `_inventories/`. +# intersphinx tries them in order and stops at the first that loads. +# +# The fallback exists because the PR build runs under `-W`, where an unreachable +# inventory is a hard failure: a docs.python.org outage (503 on every URL) once +# failed build-docs on every open PR. The warning carries no type, so +# `suppress_warnings` cannot target it. If some locations fail but one loads, +# intersphinx logs only info, so the vendored copy keeps the build green. +# GPJax does the same (its docs/conf.py has the details). +# +# Cost: the vendored copies go stale, so an object added upstream does not +# resolve on a build where the fetch failed. Refresh them by re-downloading each +# `objects.inv` into docs/_inventories/. +_INV = os.path.join(os.path.dirname(__file__), "_inventories") intersphinx_mapping = { - "python": ("https://docs.python.org/3", None), - "numpy": ("https://numpy.org/doc/stable/", None), - "pandas": ("https://pandas.pydata.org/docs/", None), - "arviz": ("https://python.arviz.org/en/stable/", None), - "pymc": ("https://www.pymc.io/projects/docs/en/stable/", None), - "matplotlib": ("https://matplotlib.org/stable/", None), + "python": ("https://docs.python.org/3", (None, f"{_INV}/python.inv")), + "numpy": ("https://numpy.org/doc/stable/", (None, f"{_INV}/numpy.inv")), + "pandas": ("https://pandas.pydata.org/docs/", (None, f"{_INV}/pandas.inv")), + "arviz": ("https://python.arviz.org/en/stable/", (None, f"{_INV}/arviz.inv")), + "pymc": ("https://www.pymc.io/projects/docs/en/stable/", (None, f"{_INV}/pymc.inv")), + "matplotlib": ("https://matplotlib.org/stable/", (None, f"{_INV}/matplotlib.inv")), } # -- HTML output -------------------------------------------------------------