Skip to content

Commit 5c5341d

Browse files
committed
Support linking to pandas, neo4j and co in sphinx
works out of the box with autodoc.
1 parent cb245f5 commit 5c5341d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

doc/sphinx/source/conf.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
extensions = [
2525
"sphinx.ext.autodoc", # include docs from docstrings
26+
"sphinx.ext.intersphinx", # link to other projects' documentation such as neo4j driver or pyArrow
2627
"enum_tools.autoenum", # specialised autoclass for enums
2728
"sphinx.ext.napoleon", # Support for NumPy and Google style docstrings
2829
"sphinxcontrib.autodoc_pydantic", # Support for Pydantic models
@@ -60,6 +61,17 @@ def setup(app): # type: ignore
6061
app.add_js_file("js/deprecated.js", loading_method="defer")
6162

6263

64+
intersphinx_mapping = {
65+
"python": ("https://docs.python.org/3", None),
66+
"neo4j": ("https://neo4j.com/docs/api/python-driver/current/", None),
67+
"dateutil": ("https://dateutil.readthedocs.io/en/stable/", None),
68+
"numpy": ("https://numpy.org/doc/stable/", None),
69+
"pandas": ("https://pandas.pydata.org/docs/", None),
70+
"pyarrow": ("https://arrow.apache.org/docs/", None),
71+
"networkx": ("https://networkx.org/documentation/stable/", None),
72+
"nx": ("https://networkx.org/documentation/stable/", None),
73+
}
74+
6375
rst_epilog = """
6476
.. |api-version| replace:: {versionnum}
6577
""".format(

0 commit comments

Comments
 (0)