Skip to content

Commit 301c2d6

Browse files
committed
DOC: Restructure "examples" page
* Add symbolic link `examples/` that points to `doc/examples` * Move `.rst` files out of examples directory * Short explanation of Binder links * Python example scripts get their own sub-page (instead of cluttering the main example page)
1 parent a4c7c8c commit 301c2d6

File tree

7 files changed

+33
-29
lines changed

7 files changed

+33
-29
lines changed

doc/conf.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
'sphinx.ext.viewcode',
4040
'sphinx.ext.napoleon', # support for NumPy-style docstrings
4141
'sphinx.ext.intersphinx',
42-
'sphinx.ext.extlinks',
4342
'sphinxcontrib.bibtex',
4443
'matplotlib.sphinxext.plot_directive',
4544
'nbsphinx',
@@ -113,10 +112,6 @@
113112
except Exception:
114113
release = '<unknown>'
115114

116-
binder_base_url = 'https://mybinder.org/v2/gh/sfstoolbox/sfs-python/'
117-
118-
extlinks = {'binder': (binder_base_url + release + '?filepath=%s', 'binder:')}
119-
120115
# The language for content autogenerated by Sphinx. Refer to documentation
121116
# for a list of supported languages.
122117
#language = None

doc/example-python-scripts.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Example Python Scripts
2+
======================
3+
4+
Various example scripts are located in the directory ``doc/examples/``, e.g.
5+
6+
* :download:`examples/sound_field_synthesis.py`: Illustrates the general usage
7+
of the toolbox
8+
* :download:`examples/horizontal_plane_arrays.py`: Computes the sound fields
9+
for various techniques, virtual sources and loudspeaker array configurations
10+
* :download:`examples/soundfigures.py`: Illustrates the synthesis of sound
11+
figures with Wave Field Synthesis

doc/examples.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Examples
2+
========
3+
4+
.. only:: html
5+
6+
You can play with the Jupyter notebooks (without having to install anything)
7+
by clicking |binder logo| on the respective example page.
8+
9+
.. |binder logo| image:: https://mybinder.org/badge_logo.svg
10+
:target: https://mybinder.org/v2/gh/sfstoolbox/sfs-python/master?
11+
filepath=doc/examples
12+
13+
.. toctree::
14+
:maxdepth: 1
15+
16+
examples/modal-room-acoustics
17+
examples/mirror-image-source-model
18+
example-python-scripts

doc/examples/index.rst

Lines changed: 0 additions & 23 deletions
This file was deleted.

doc/examples/ipython_kernel_config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This is a configuration file that's used when opening the Jupyter notebooks
2+
# in this directory.
13
# See https://nbviewer.jupyter.org/github/mgeier/python-audio/blob/master/plotting/matplotlib-inline-defaults.ipynb
24

35
c.InlineBackend.figure_formats = {'svg'}

doc/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
.. toctree::
66

77
installation
8-
examples/index
8+
examples
99
api
1010
references
1111
contributing

examples

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
doc/examples/

0 commit comments

Comments
 (0)