Skip to content

Commit f06b84e

Browse files
committed
Update of documentation configuration
1 parent d010a17 commit f06b84e

File tree

9 files changed

+177
-135
lines changed

9 files changed

+177
-135
lines changed

doc/conf.py

Lines changed: 101 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -11,62 +11,69 @@
1111
# All configuration values have a default; values that are commented out
1212
# serve to show the default.
1313

14+
import os
15+
import sys
16+
1417
# If extensions (or modules to document with autodoc) are in another directory,
1518
# add these directories to sys.path here. If the directory is relative to the
1619
# documentation root, use os.path.abspath to make it absolute, like shown here.
17-
#
18-
import os
19-
import sys
20-
sys.path.insert(0, os.path.abspath('../'))
20+
sys.path.insert(0, os.path.abspath("../"))
2121

2222
# -- General configuration ------------------------------------------------
2323

2424
# If your documentation needs a minimal Sphinx version, state it here.
25-
#
26-
# needs_sphinx = '1.0'
25+
needs_sphinx = "1.4"
2726

2827
# Add any Sphinx extension module names here, as strings. They can be
2928
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3029
# ones.
3130
extensions = [
32-
'sphinx.ext.autodoc',
33-
'sphinx.ext.todo',
34-
'sphinx.ext.coverage',
35-
'sphinx.ext.mathjax',
36-
'sphinx.ext.viewcode',
37-
'sphinx.ext.githubpages',
38-
'sphinx.ext.napoleon'
31+
"sphinx.ext.autodoc",
32+
"sphinx.ext.autosummary",
33+
"sphinx.ext.coverage",
34+
"sphinx.ext.githubpages",
35+
"sphinx.ext.mathjax",
36+
"sphinx.ext.napoleon",
37+
"sphinx.ext.todo",
38+
"sphinx.ext.viewcode",
3939
]
4040

4141
# Add any paths that contain templates here, relative to this directory.
42-
templates_path = ['_templates']
42+
templates_path = ["_templates"]
4343

4444
# The suffix(es) of source filenames.
4545
# You can specify multiple suffix as a list of string:
4646
#
4747
# source_suffix = ['.rst', '.md']
48-
source_suffix = '.rst'
48+
source_suffix = ".rst"
4949

5050
# The encoding of source files.
5151
#
5252
# source_encoding = 'utf-8-sig'
5353

5454
# The master toctree document.
55-
master_doc = 'index'
55+
master_doc = "index"
5656

5757
# General information about the project.
58-
project = 'Sound Field Analysis toolbox for Python'
59-
copyright = '2016, Christoph Hohnerlein (QU Lab)'
60-
author = 'Christoph Hohnerlein (QU Lab)'
58+
project = "Sound Field Analysis toolbox for Python"
59+
author = (
60+
"Christoph Hohnerlein (QU Labs) \\and "
61+
"Jens Ahrens (Chalmers) \\and "
62+
"Hannes Helmholz (Chalmers)"
63+
)
64+
# noinspection PyShadowingBuiltins
65+
copyright = "2020, Chalmers University of Technology"
6166

6267
# The version info for the project you're documenting, acts as replacement for
6368
# |version| and |release|, also used in various other places throughout the
6469
# built documents.
6570
#
6671
# The short X.Y version.
67-
version = '0.3'
72+
version = (
73+
open("../sound_field_analysis/_version.py").readlines()[-1].split()[-1].strip("\"'")
74+
)
6875
# The full version, including alpha/beta/rc tags.
69-
release = '0.3'
76+
release = version
7077

7178
# The language for content autogenerated by Sphinx. Refer to documentation
7279
# for a list of supported languages.
@@ -87,66 +94,83 @@
8794
# List of patterns, relative to source directory, that match files and
8895
# directories to ignore when looking for source files.
8996
# This patterns also effect to html_static_path and html_extra_path
90-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
97+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
9198

9299
# The reST default role (used for this markup: `text`) to use for all
93100
# documents.
94101
#
95102
# default_role = None
96103

97104
# If true, '()' will be appended to :func: etc. cross-reference text.
98-
#
99-
# add_function_parentheses = True
105+
add_function_parentheses = True
100106

101107
# If true, the current module name will be prepended to all description
102108
# unit titles (such as .. function::).
103-
#
104-
# add_module_names = True
109+
add_module_names = True
105110

106111
# If true, sectionauthor and moduleauthor directives will be shown in the
107112
# output. They are ignored by default.
108113
#
109114
# show_authors = False
110115

111116
# The name of the Pygments (syntax highlighting) style to use.
112-
pygments_style = 'sphinx'
117+
pygments_style = "sphinx"
113118

114119
# A list of ignored prefixes for module index sorting.
115-
# modindex_common_prefix = []
120+
modindex_common_prefix = ["sound_field_analysis."]
116121

117122
# If true, keep warnings as "system message" paragraphs in the built documents.
123+
#
118124
# keep_warnings = False
119125

126+
# A list of warning types to suppress arbitrary warning messages.
127+
#
128+
# suppress_warnings = ["image.not_readable"]
129+
130+
# This value selects if automatically documented members are sorted alphabetical
131+
# (value 'alphabetical'), by member type (value 'groupwise') or by source order
132+
# (value 'bysource'). The default is alphabetical.
133+
autodoc_member_order = "bysource"
134+
120135
# If true, `todo` and `todoList` produce output, else they produce nothing.
121136
todo_include_todos = True
122137

123138
# -- Napoleon settings ----------------------------------------------
124139
napoleon_google_docstring = False
125140
napoleon_numpy_docstring = True
141+
napoleon_include_init_with_doc = True
126142
napoleon_include_private_with_doc = False
127143
napoleon_include_special_with_doc = True
128-
napoleon_use_admonition_for_examples = False
129-
napoleon_use_admonition_for_notes = False
130-
napoleon_use_admonition_for_references = False
144+
napoleon_use_admonition_for_examples = True
145+
napoleon_use_admonition_for_notes = True
146+
napoleon_use_admonition_for_references = True
131147
napoleon_use_ivar = False
132-
napoleon_use_param = True
133-
napoleon_use_rtype = True
148+
napoleon_use_param = False
149+
napoleon_use_rtype = False
134150

135151
# -- Options for HTML output ----------------------------------------------
136152

137153
# The theme to use for HTML and HTML Help pages. See the documentation for
138154
# a list of builtin themes.
139155
#
140-
html_theme = 'sphinx_rtd_theme'
156+
html_theme = "sphinx_rtd_theme"
141157

142158
# Theme options are theme-specific and customize the look and feel of a theme
143159
# further. For a list of options available for each theme, see the
144160
# documentation.
145-
#
146-
# html_theme_options = {}
161+
html_theme_options = { # Toc options
162+
"display_version": True,
163+
"collapse_navigation": False,
164+
"sticky_navigation": True,
165+
"navigation_depth": -1,
166+
"includehidden": True,
167+
"titles_only": False,
168+
}
147169

148170
# Add any paths that contain custom themes here, relative to this directory.
149-
html_theme_path = ["_themes", ]
171+
html_theme_path = [
172+
"_themes",
173+
]
150174

151175
# The name for this set of Sphinx documents.
152176
# "<project> v<release> documentation" by default.
@@ -171,7 +195,8 @@
171195
# Add any paths that contain custom static files (such as style sheets) here,
172196
# relative to this directory. They are copied after the builtin static files,
173197
# so a file named "default.css" will overwrite the builtin "default.css".
174-
html_static_path = ['_static']
198+
#
199+
# html_static_path = ["_static"]
175200

176201
# Add any extra paths that contain custom files (such as robots.txt or
177202
# .htaccess) here, relative to this directory. These files are copied
@@ -236,8 +261,7 @@
236261
# Sphinx supports the following languages:
237262
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
238263
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'
239-
#
240-
# html_search_language = 'en'
264+
html_search_language = "en"
241265

242266
# A dictionary with options for the search language support, empty by default.
243267
# 'ja' uses this config value.
@@ -256,34 +280,35 @@
256280
# -- Options for LaTeX output ---------------------------------------------
257281

258282
latex_elements = {
259-
# The paper size ('letterpaper' or 'a4paper').
260-
'papersize': 'a4paper',
261-
262-
# Remove blank pages
263-
'classoptions': ',openany,oneside',
264-
'babel': '\\usepackage[english]{babel}',
265-
266-
# The font size ('10pt', '11pt' or '12pt').
267-
#
268-
# 'pointsize': '10pt',
269-
270-
# Additional stuff for the LaTeX preamble.
271-
#
272-
# 'preamble': '',
273-
274-
# Latex figure (float) alignment
275-
#
276-
# 'figure_align': 'htbp',
283+
# The paper size ('letterpaper' or 'a4paper').
284+
"papersize": "a4paper",
285+
# Remove blank pages
286+
"classoptions": ",openany,oneside",
287+
"babel": "\\usepackage[english]{babel}",
288+
# The font size ('10pt', '11pt' or '12pt').
289+
"pointsize": "10pt",
290+
# Additional stuff for the LaTeX preamble.
291+
# 'preamble': '',
292+
# Latex figure (float) alignment
293+
# 'figure_align': 'htbp',
277294
}
278295

279296
# Grouping the document tree into LaTeX files. List of tuples
280297
# (source start file, target name, title,
281298
# author, documentclass [howto, manual, or own class]).
282299
latex_documents = [
283-
(master_doc, 'sfa_readme.tex', 'Sound Field Analysis Toolbox Readme',
284-
'Christoph Hohnerlein (QU Lab)', 'manual', True),
300+
(
301+
master_doc,
302+
htmlhelp_basename + ".tex",
303+
"Sound Field Analysis toolbox Documentation",
304+
author,
305+
"manual",
306+
True,
307+
),
285308
]
286309

310+
# supported_image_types = ['application/pdf', 'image/png', 'image/jpeg']
311+
287312
# The name of an image file (relative to this directory) to place at the top of
288313
# the title page.
289314
#
@@ -322,8 +347,13 @@
322347
# One entry per manual page. List of tuples
323348
# (source start file, name, description, authors, manual section).
324349
man_pages = [
325-
(master_doc, 'sfa_readme', 'Sound Field Analysis Toolbox Readme',
326-
[author], 1)
350+
(
351+
master_doc,
352+
htmlhelp_basename,
353+
"Sound Field Analysis toolbox Documentation",
354+
[author],
355+
1,
356+
)
327357
]
328358

329359
# If true, show URL addresses after external links.
@@ -337,9 +367,15 @@
337367
# (source start file, target name, title, author,
338368
# dir menu entry, description, category)
339369
texinfo_documents = [
340-
(master_doc, 'sfa_readme', 'Sound Field Analysis Toolbox for Python Readme',
341-
author, 'sfa_readme', 'Analyze, visualize and process sound field data recorded by spherical microphone arrays.',
342-
'Miscellaneous'),
370+
(
371+
master_doc,
372+
htmlhelp_basename,
373+
"Sound Field Analysis toolbox Documentation",
374+
author,
375+
htmlhelp_basename,
376+
"Analyze, visualize and process sound field data recorded by spherical microphone arrays.",
377+
"Miscellaneous",
378+
),
343379
]
344380

345381
# Documents to append as an appendix to all manuals.

doc/generators.rst

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

doc/index.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
1-
Welcome to the Sound Field Analysis toolbox for Python!
2-
=======================================================
3-
4-
Contents:
1+
Sound Field Analysis toolbox Documentation
2+
==========================================
53

64
.. toctree::
75
:maxdepth: 2
6+
:caption: Contents:
87

98
usage
10-
generators
11-
processing
12-
plotting
9+
modules
1310
reference
1411

1512

1613
Indices and tables
1714
==================
1815

1916
* :ref:`genindex`
17+
* :ref:`modindex`
2018
* :ref:`search`

doc/modules.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Modules
2+
=======
3+
4+
Generators
5+
----------
6+
.. automodule:: sound_field_analysis.gen
7+
:noindex:
8+
9+
I/O
10+
---
11+
.. automodule:: sound_field_analysis.io
12+
:noindex:
13+
14+
Lebedev
15+
-------
16+
.. automodule:: sound_field_analysis.lebedev
17+
:noindex:
18+
19+
Plotting
20+
--------
21+
.. automodule:: sound_field_analysis.plot
22+
:noindex:
23+
24+
Processing
25+
----------
26+
.. automodule:: sound_field_analysis.process
27+
:noindex:
28+
29+
Spherical
30+
---------
31+
.. automodule:: sound_field_analysis.sph
32+
:noindex:
33+
34+
Utilities
35+
---------
36+
.. automodule:: sound_field_analysis.utils
37+
:noindex:

doc/plotting.rst

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

doc/processing.rst

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

0 commit comments

Comments
 (0)