Merge pull request #4948 from Carreau/intersphinx_registry

Use intersphinx-registry to keep intersphinx URLs up to date.
This commit is contained in:
Min RK
2024-11-13 10:28:58 +01:00
committed by GitHub
2 changed files with 11 additions and 6 deletions

View File

@@ -2,6 +2,7 @@
# don't depend on it here, as that often results in a duplicate # don't depend on it here, as that often results in a duplicate
# installation of jupyterhub that's already installed # installation of jupyterhub that's already installed
autodoc-traits autodoc-traits
intersphinx-registry
jupyterhub-sphinx-theme jupyterhub-sphinx-theme
myst-parser>=0.19 myst-parser>=0.19
pre-commit pre-commit

View File

@@ -12,6 +12,7 @@ from pathlib import Path
from urllib.request import urlretrieve from urllib.request import urlretrieve
from docutils import nodes from docutils import nodes
from intersphinx_registry import get_intersphinx_mapping
from ruamel.yaml import YAML from ruamel.yaml import YAML
from sphinx.directives.other import SphinxDirective from sphinx.directives.other import SphinxDirective
from sphinx.util import logging from sphinx.util import logging
@@ -303,12 +304,15 @@ linkcheck_anchors_ignore = [
# -- Intersphinx ------------------------------------------------------------- # -- Intersphinx -------------------------------------------------------------
# ref: https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#configuration # ref: https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#configuration
# #
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None), intersphinx_mapping = get_intersphinx_mapping(
"tornado": ("https://www.tornadoweb.org/en/stable/", None), packages={
"jupyter-server": ("https://jupyter-server.readthedocs.io/en/stable/", None), "python",
"nbgitpuller": ("https://nbgitpuller.readthedocs.io/en/latest", None), "tornado",
} "jupyter-server",
"nbgitpuller",
}
)
# -- Options for the opengraph extension ------------------------------------- # -- Options for the opengraph extension -------------------------------------
# ref: https://github.com/wpilibsuite/sphinxext-opengraph#options # ref: https://github.com/wpilibsuite/sphinxext-opengraph#options