Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

docs: fall back to vendored intersphinx inventories when a docs site is down (#5284)

Dmytro Mishkin744026518b18
diff --git a/docs/source/_intersphinx/numpy.inv b/docs/source/_intersphinx/numpy.inv
new file mode 100644
index 000000000..63ee8d9cd
Binary files /dev/null and b/docs/source/_intersphinx/numpy.inv differ
diff --git a/docs/source/_intersphinx/python.inv b/docs/source/_intersphinx/python.inv
new file mode 100644
index 000000000..83e6e3982
Binary files /dev/null and b/docs/source/_intersphinx/python.inv differ
diff --git a/docs/source/_intersphinx/torch.inv b/docs/source/_intersphinx/torch.inv
new file mode 100644
index 000000000..c2b62008f
Binary files /dev/null and b/docs/source/_intersphinx/torch.inv differ
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 7f01442d1..28b929ba2 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -521,11 +521,14 @@ texinfo_documents = [
)
]
-# Example configuration for intersphinx: refer to the Python standard library.
+# Cross-references into the Python, NumPy and PyTorch docs. Each project is fetched from its live site first; the copy
+# in _intersphinx/ is used only when that fetch fails, so an outage of one of those sites does not fail the -W build.
+# The links still point at the live site. Refresh a copy with
+# `curl -fsSLo docs/source/_intersphinx/<name>.inv <site>objects.inv`.
intersphinx_mapping = {
- "python": ("https://docs.python.org/3/", None),
- "numpy": ("https://numpy.org/doc/stable/", None),
- "torch": ("https://pytorch.org/docs/stable/", None),
+ "python": ("https://docs.python.org/3/", (None, "_intersphinx/python.inv")),
+ "numpy": ("https://numpy.org/doc/stable/", (None, "_intersphinx/numpy.inv")),
+ "torch": ("https://pytorch.org/docs/stable/", (None, "_intersphinx/torch.inv")),
}
# Optional third-party modules that autodoc must not try to import. Empty: the packages the documented