From f3b08b395a8dbc528a8a5a21f90a1cacd13f925b Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Thu, 19 Aug 2021 20:13:25 -0400 Subject: [PATCH] add sphinx plugins `viewcode` and `intersphinx` (#997) --- doc/conf.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index 9d84763d40..0dfac83f24 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -156,6 +156,8 @@ def setup(app): "sphinx_rtd_theme", 'myst_parser', 'sphinx.ext.autosummary', + 'sphinx.ext.viewcode', + 'sphinx.ext.intersphinx', 'breathe', 'exhale' ] @@ -198,6 +200,14 @@ def setup(app): # This pattern also affects html_static_path and html_extra_path. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] +intersphinx_mapping = { + "numpy": ("https://docs.scipy.org/doc/numpy/", None), + "python": ("https://docs.python.org/", None), + "tensorflow": ( + "https://www.tensorflow.org/api_docs/python", + "https://github.com/mr-ubik/tensorflow-intersphinx/raw/master/tf2_py_objects.inv", + ), +} # -- Options for HTML output -------------------------------------------------