Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Use intersphinx_registry to keep intersphinx urls up to date #2559

Merged
merged 3 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from pathlib import Path

import jupytext
from intersphinx_registry import get_intersphinx_mapping

sys.path.insert(0, str(Path('./exts').resolve()))

Expand Down Expand Up @@ -80,15 +81,17 @@ def setup(app):
# external links
xref_links = {"arXiv:1007.1727": ("[1007.1727]", "https://arxiv.org/abs/1007.1727")}

intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
'numpy': ('https://numpy.org/doc/stable/', None),
'scipy': ('https://docs.scipy.org/doc/scipy/', None),
'matplotlib': ('https://matplotlib.org/stable/', None),
'iminuit': ('https://iminuit.readthedocs.io/en/stable/', None),
'uproot': ('https://uproot.readthedocs.io/en/latest/', None),
'jsonpatch': ('https://python-json-patch.readthedocs.io/en/latest/', None),
}
intersphinx_mapping = get_intersphinx_mapping(
packages={
'python',
'numpy',
'scipy',
'matplotlib',
'iminuit',
'uproot',
'jsonpatch',
}
)

# GitHub repo
issues_github_path = 'scikit-hep/pyhf'
Expand Down
1 change: 1 addition & 0 deletions docs/contributors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ Contributors include:
- Jonas Rembser
- Lorenz Gaertner
- Melissa Weber Mendonça
- Matthias Bussonnier
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ docs = [
"pydata-sphinx-theme>=0.15.3",
"nbsphinx!=0.8.8", # c.f. https://github.com/spatialaudio/nbsphinx/issues/620
"ipywidgets",
"intersphinx_registry>=0.2411.17",
"sphinx-issues",
"sphinx-copybutton>=0.3.2,!=0.5.1",
"jupyterlite-sphinx>=0.13.1", # c.f. https://github.com/scikit-hep/pyhf/pull/2458
Expand Down
Loading