Skip to content

Commit 1a95cd6

Browse files
committed
Add Sphinx-based documentation
1 parent 251b280 commit 1a95cd6

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

doc/conf.py

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
from subprocess import check_output
2+
3+
needs_sphinx = '1.3' # for sphinx.ext.napoleon
4+
5+
extensions = [
6+
'sphinx.ext.autodoc',
7+
'sphinx.ext.intersphinx',
8+
'sphinx.ext.viewcode',
9+
'sphinx.ext.napoleon', # support for NumPy-style docstrings
10+
]
11+
12+
autoclass_content = 'init'
13+
autodoc_member_order = 'bysource'
14+
15+
napoleon_google_docstring = False
16+
napoleon_numpy_docstring = True
17+
napoleon_include_private_with_doc = False
18+
napoleon_include_special_with_doc = False
19+
napoleon_use_admonition_for_examples = False
20+
napoleon_use_admonition_for_notes = False
21+
napoleon_use_admonition_for_references = False
22+
napoleon_use_ivar = False
23+
napoleon_use_param = False
24+
napoleon_use_rtype = False
25+
26+
intersphinx_mapping = {
27+
'python': ('https://docs.python.org/3/', None),
28+
'numpy': ('https://docs.scipy.org/doc/numpy/', None),
29+
'sounddevice': ('http://python-sounddevice.readthedocs.io/en/latest/',
30+
None),
31+
}
32+
33+
source_suffix = '.rst'
34+
master_doc = 'index'
35+
36+
authors = 'Matthias Geier'
37+
project = 'python-rtmixer'
38+
copyright = '2017, ' + authors
39+
40+
try:
41+
release = check_output(['git', 'describe', '--tags', '--always'])
42+
release = release.decode().strip()
43+
except Exception:
44+
release = '<unknown>'
45+
46+
pygments_style = 'sphinx'
47+
html_theme = 'sphinx_rtd_theme'
48+
html_domain_indices = False
49+
50+
latex_elements = {
51+
'papersize': 'a4paper',
52+
'printindex': '',
53+
}
54+
latex_documents = [('index', 'python-rtmixer.tex', project, authors, 'howto')]

doc/index.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.. default-role:: py:obj
2+
3+
.. include:: ../README.rst
4+
5+
.. default-role:: any
6+
7+
API Documentation
8+
-----------------
9+
10+
.. automodule:: rtmixer
11+
:members:
12+
:undoc-members:
13+
14+
.. only:: html
15+
16+
Index
17+
-----
18+
19+
:ref:`genindex`

0 commit comments

Comments
 (0)