Skip to content

Commit

Permalink
DOC: enable the sphinx_codeautolink extension (+ intersphinx)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier committed Dec 17, 2021
1 parent 01cc76e commit 948ec64
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 20 deletions.
22 changes: 2 additions & 20 deletions doc/allow-errors.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,6 @@
"42 / 0"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"print 'Hello, world!'"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"6 ~ 7"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -106,12 +88,12 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.7"
"version": "3.9.7"
},
"nbsphinx": {
"allow_errors": true
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
11 changes: 11 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,19 @@
'sphinxcontrib.rsvgconverter', # for SVG->PDF conversion in LaTeX output
'sphinx_gallery.load_style', # load CSS for gallery (needs SG >= 0.6)
'sphinx_last_updated_by_git', # get "last updated" from Git
'sphinx_codeautolink', # automatic links from code to documentation
'sphinx.ext.intersphinx', # links to other Sphinx projects (e.g. NumPy)
]

# These projects are also used for the sphinx_codeautolink extension:
intersphinx_mapping = {
'IPython': ('https://ipython.readthedocs.io/en/stable/', None),
'matplotlib': ('https://matplotlib.org/', None),
'numpy': ('https://docs.scipy.org/doc/numpy/', None),
'pandas': ('https://pandas.pydata.org/docs/', None),
'python': ('https://docs.python.org/3/', None),
}

# Don't add .txt suffix to source files:
html_sourcelink_suffix = ''

Expand Down
1 change: 1 addition & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ ipywidgets
sphinx-gallery
jupytext
sphinx-last-updated-by-git
sphinx-codeautolink

0 comments on commit 948ec64

Please sign in to comment.