Skip to content

Commit

Permalink
[Documentation] Make code examples clickable, and update intersphinx …
Browse files Browse the repository at this point in the history
…urls

Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
  • Loading branch information
jeandet committed Jan 27, 2022
1 parent 07cf307 commit 450e6ed
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/PRs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: sudo apt update && sudo apt install -y texlive pandoc && pip install wheel
- name: Test with pytest
run: |
pip install pytest pytest-cov sphinx numpydoc sphinx-rtd-theme sphinx_gallery nbsphinx pandoc
pip install pytest pytest-cov sphinx numpydoc sphinx-rtd-theme sphinx_gallery nbsphinx pandoc sphinx-codeautolink
pytest --cov=./ --cov-report=xml
make doctest
- name: Upload coverage to Codecov
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: sudo apt update && sudo apt install -y texlive pandoc && pip install wheel
- name: Test with pytest
run: |
pip install pytest pytest-cov sphinx numpydoc sphinx-rtd-theme sphinx_gallery nbsphinx pandoc
pip install pytest pytest-cov sphinx numpydoc sphinx-rtd-theme sphinx_gallery nbsphinx pandoc sphinx-codeautolink
pytest --cov=./ --cov-report=xml
make doctest
- name: Upload coverage to Codecov
Expand Down
15 changes: 10 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@
'sphinx.ext.viewcode',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.autosectionlabel',
'sphinx_gallery.load_style',
'sphinx_codeautolink',
'nbsphinx',
'numpydoc']

autosectionlabel_prefix_document = True

nbsphinx_execute_arguments = [
"--InlineBackend.figure_formats={'svg', 'pdf'}",
"--InlineBackend.rc=figure.dpi=96",
Expand Down Expand Up @@ -203,9 +207,10 @@
]


intersphinx_mapping = {'python3': ('http://docs.python.org/3', None),
'numpy': ('http://docs.scipy.org/doc/numpy/', None),
'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None),
'matplotlib': ('http://matplotlib.sourceforge.net/', None),
'astropy': ('http://astropy.readthedocs.org/en/stable/', None),
intersphinx_mapping = {'python3': ('https://docs.python.org/3', None),
'numpy': ('https://numpy.org/doc/stable/', None),
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
'matplotlib': ('https://matplotlib.org/stable/', None),
'seaborn': ('https://seaborn.pydata.org/', None),
'astropy': ('https://docs.astropy.org/en/stable/', None),
}
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ sphinx-gallery
nbsphinx
ipympl
ipywidgets
sphinx-codeautolink

0 comments on commit 450e6ed

Please sign in to comment.