Skip to content

Commit

Permalink
Doc update and switch to pip (#8)
Browse files Browse the repository at this point in the history
* DOCS: Introduce autosummary

* Test removing _autosumm folder

* DOC: Move autosummary to init

* DOC: Try to add path

* DOCS: Show path

* Also add spaudiopy folder

* Comment out more

* Docs: Use automodule

* Does this help?

* Minimal

* Add toctree

* Try this

* Try Conda

* Fix conda

* Add requirements file

* Remove plotly

* Try without conda

* RM environment

* Add paths again

* More paths

* Try this

* Bump Sphinx

* Try conda again

* Try latest image

* Cleanup

* Update to conf V2

* Fix conda rtd environment

* Include matplotlib plot to doc

* Fix mpl

* Include precode explicitly

* Add doc to decoders.

* Try to fix mpl

* Restrict matplotlib to <3.1

* Also restrict mpl in setup.py

* Also exclude subversions

* Update default hrir handling and docs

* Fix typo

* Use conext and plot grids

* Restrict quadpy

* Add SH plot

* Show decorated functions

* ignore data folder

* rm from docs deps

* Update reqs

* Use conda defaults

* Use only defaults

* Remove backup lebedev

* Update conf.py

Tryin to fix docs

* Create plot3d.py

* Update readthedocs-environment.yml

* Update readthedocs-environment.yml

* Update readthedocs-environment.yml

* Update .readthedocs.yml

* Use sphinx < 3.0

* Update readthedocs-environment.yml

* Update .gitignore

editor configs

* Switch to pip

* Update requirements.txt

* Update conf.py

* Update conf.py

* Update conf.py

* Delete plot3d.py

* Delete readthedocs-environment.yml

* Revert "DOC: Use (experimental) contrained_layout in plots"

This reverts commit 33c5e36.

* Update conf.py

* Update conf.py

* Update plots.py

* Doc plot updates

* Update process.py

fix

* Update conf.py

* Update grids.py

* Update grids.py

* Update sph.py

See also gain clipping

* Update conf.py

adress some flake8
  • Loading branch information
chris-hld authored May 6, 2020
1 parent dc4b181 commit 93abde0
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 43 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ venv.bak/

# mypy
.mypy_cache/

# editor configs
.vscode/
13 changes: 8 additions & 5 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ build:
# Optionally build your docs in additional formats such as PDF and ePub
formats: all

conda:
environment: docs/readthedocs-environment.yml
#conda:
# environment: docs/readthedocs-environment.yml

# Optionally set the version of Python and requirements required to build your docs
python:
install:
- method: pip
path: .
version: 3.6
install:
- requirements: docs/requirements.txt
- method: pip
path: .
9 changes: 0 additions & 9 deletions docs/readthedocs-environment.yml

This file was deleted.

5 changes: 5 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Sphinx>=2.4,<3.0
Sphinx-RTD-Theme

NumPy
matplotlib<3.1.0
31 changes: 16 additions & 15 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


sys.path.insert(0, os.path.abspath('../../'))
#print('\n'.join(sys.path))
# print('\n'.join(sys.path))

# -- Project information -----------------------------------------------------

Expand All @@ -27,7 +27,7 @@
author = 'Chris Hold'

# The short X.Y version.
#version = '0.0.0'
# version = '0.0.0'
# The full version, including alpha/beta/rc tags.
try:
release = check_output(['git', 'describe', '--tags', '--always'])
Expand All @@ -39,7 +39,7 @@
# -- General configuration ---------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = '1.3' # for sphinx.ext.napoleon
needs_sphinx = '1.3' # for sphinx.ext.napoleon

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Expand All @@ -55,7 +55,7 @@

# autodoc
autodoc_default_options = {
'members' : None,
'members': None,
'undoc-members': None,
'member-order': 'bysource',
'special-members': '__init__',
Expand Down Expand Up @@ -85,10 +85,11 @@
# matplotlib inline plots
plot_include_source = True
plot_html_show_source_link = False
plot_html_show_formats = False
plot_pre_code = ''
plot_rcparams = {'figure.figsize': (8, 4.5), }
plot_formats = ['svg', 'pdf', ('png', 96)]
# plot_html_show_formats = False
# plot_pre_code = ''
# plot_rcparams = {'figure.figsize': (8, 4.5),
# }
# plot_formats = ['svg', 'pdf', ('png', 96)]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand All @@ -107,7 +108,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
#language = None
# language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand All @@ -134,7 +135,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
#html_static_path = ['_static']
# html_static_path = ['_static']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down Expand Up @@ -197,11 +198,11 @@
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
#texinfo_documents = [
# (master_doc, 'spaudiopy', 'spaudiopy Documentation',
# author, 'spaudiopy', 'One line description of project.',
# 'Miscellaneous'),
#]
# texinfo_documents = [
# (master_doc, 'spaudiopy', 'spaudiopy Documentation',
# author, 'spaudiopy', 'One line description of project.',
# 'Miscellaneous'),
# ]


# -- Options for Epub output -------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion spaudiopy/IO.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['figure.constrained_layout.use'] = True
plt.rcParams['axes.grid'] = True
import spaudiopy as spa
Expand Down
1 change: 0 additions & 1 deletion spaudiopy/decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['figure.constrained_layout.use'] = True
plt.rcParams['axes.grid'] = True
import spaudiopy as spa
Expand Down
1 change: 0 additions & 1 deletion spaudiopy/grids.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['figure.constrained_layout.use'] = True
plt.rcParams['axes.grid'] = True
import spaudiopy as spa
Expand Down
5 changes: 2 additions & 3 deletions spaudiopy/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['figure.constrained_layout.use'] = True
plt.rcParams['axes.grid'] = True
import spaudiopy as spa
Expand Down Expand Up @@ -373,7 +372,7 @@ def hull(hull, simplices=None, mark_invalid=True, title=None, lim_m=1,
y = hull.points[:, 1]
z = hull.points[:, 2]

fig = plt.figure()
fig = plt.figure(constrained_layout=True)
ax = fig.gca(projection='3d', aspect='equal')

# valid
Expand Down Expand Up @@ -415,7 +414,7 @@ def hull_normals(hull, plot_face_normals=True, plot_vertex_normals=True):
y = hull.points[:, 1]
z = hull.points[:, 2]

fig = plt.figure()
fig = plt.figure(constrained_layout=True)
ax = fig.gca(projection='3d', aspect='equal')
ax.plot_trisurf(x, y, z,
triangles=hull.simplices,
Expand Down
6 changes: 3 additions & 3 deletions spaudiopy/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['figure.constrained_layout.use'] = True
plt.rcParams['axes.grid'] = True
import spaudiopy as spa
Expand Down Expand Up @@ -259,9 +258,10 @@ def frac_octave_filterbank(n, N_out, fs, f_low, f_high=None, mode='energy',
fs = 44100
N = 2**16
gs, ff = spa.process.frac_octave_filterbank(n=1, N_out=N, fs=fs, f_low=100, f_high=8000)
gs, ff = spa.process.frac_octave_filterbank(n=1, N_out=N, fs=fs,
f_low=100, f_high=8000)
f = np.linspace(0, fs//2, N)
fig, ax = plt.subplots(2, 1)
fig, ax = plt.subplots(2, 1, constrained_layout=True)
ax[0].semilogx(f, gs.T)
ax[0].set_title('Band gains')
ax[1].semilogx(f, np.sum(np.abs(gs)**2, axis=0))
Expand Down
1 change: 0 additions & 1 deletion spaudiopy/sdm.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['figure.constrained_layout.use'] = True
plt.rcParams['axes.grid'] = True
import spaudiopy as spa
Expand Down
1 change: 0 additions & 1 deletion spaudiopy/sig.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['figure.constrained_layout.use'] = True
plt.rcParams['axes.grid'] = True
import spaudiopy as spa
Expand Down
7 changes: 5 additions & 2 deletions spaudiopy/sph.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['figure.constrained_layout.use'] = True
plt.rcParams['axes.grid'] = True
import spaudiopy as spa
Expand Down Expand Up @@ -576,7 +575,11 @@ def binaural_coloration_compensation(N, f, r_0=0.0875, w_taper=None):
Returns
-------
gain : array_like
Filter gain(kr). See also 'process.gain_clipping'.
Filter gain(kr).
See Also
--------
process.gain_clipping : Limit maximum gain
References
----------
Expand Down
1 change: 0 additions & 1 deletion spaudiopy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['figure.constrained_layout.use'] = True
plt.rcParams['axes.grid'] = True
import spaudiopy as spa
Expand Down

0 comments on commit 93abde0

Please sign in to comment.