Skip to content

Commit

Permalink
Add dependencies to pyproject.toml and integrate examples notebooks i…
Browse files Browse the repository at this point in the history
…nto docs (#15)

* add dependencies to pyproject.toml

* Integrate examples ipynb into documentation

* ruff format

* restore rendered outputs
  • Loading branch information
MitchellAcoustics authored Aug 2, 2024
1 parent ada5e58 commit ec88c31
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ _build
.ipynb_checkpoints

temp
/.idea
2 changes: 1 addition & 1 deletion acoustic_toolbox/signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Signal
======
The signal module constains all kinds of signal processing related functions.
The signal module contains all kinds of signal processing related functions.
.. inheritance-diagram:: acoustic_toolbox.signal
Expand Down
5 changes: 5 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
sphinx==7.1.2
sphinx-rtd-theme==1.3.0rc1
nbsphinx>=0.9.4
nbsphinx-link>=1.3.0
jupyter>=1.0.0



numpy
scipy
Expand Down
44 changes: 23 additions & 21 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,51 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('../..'))
sys.path.insert(0, os.path.abspath("../.."))

# -- Project information

project = 'Acoustic-Toolbox'
copyright = '2024, Valentin LE BESCOND'
author = 'Valentin LE BESCOND'
project = "Acoustic-Toolbox"
copyright = "2024, Valentin LE BESCOND"
author = "Valentin LE BESCOND"

release = '0.1'
version = '0.1.0'
release = "0.1"
version = "0.1.0"

# -- General configuration

extensions = [
'sphinx.ext.duration',
'sphinx.ext.doctest',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.intersphinx',
"sphinx.ext.duration",
"sphinx.ext.doctest",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
"sphinx.ext.inheritance_diagram",
"nbsphinx",
"nbsphinx_link",
]

intersphinx_mapping = {
'python': ('https://docs.python.org/3/', None),
'scipy': ('https://docs.scipy.org/doc/scipy/', None),
'numpy': ('https://numpy.org/doc/stable/', None),
'pandas': ('https://pandas.pydata.org/docs/', None),
'matplotlib': ('https://matplotlib.org/stable/', None)
"python": ("https://docs.python.org/3/", None),
"scipy": ("https://docs.scipy.org/doc/scipy/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"pandas": ("https://pandas.pydata.org/docs/", None),
"matplotlib": ("https://matplotlib.org/stable/", None),
}

intersphinx_disabled_domains = ['std']
intersphinx_disabled_domains = ["std"]

templates_path = ['_templates']
templates_path = ["_templates"]

# autodoc_default_options = {
# 'members': True,
# }

# -- Options for HTML output

html_theme = 'sphinx_rtd_theme'
html_theme = "sphinx_rtd_theme"

# -- Options for EPUB output
epub_show_urls = 'footnote'
epub_show_urls = "footnote"

# graphviz_dot = 'dot'
# graphviz_dot = 'dot'
3 changes: 3 additions & 0 deletions docs/source/directivity.nblink
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "../../examples/directivity.ipynb"
}
9 changes: 9 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ Acoustic Toolbox

Welcome to the documentation of the acoustic-toolbox module!

Examples
########

.. toctree::
:maxdepth: 1

signal_class
directivity

API Reference
#############

Expand Down
3 changes: 3 additions & 0 deletions docs/source/signal_class.nblink
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "../../examples/signal_class.ipynb"
}
19 changes: 19 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ classifiers = [
"Operating System :: OS Independent",
]
dependencies = [
"numpy>=2.0.1",
"scipy>=1.14.0",
"matplotlib>=3.9.1",
"six>=1.16.0",
"pandas>=2.2.2",
"tabulate>=0.9.0",
"pysoundfile>=0.9.0.post1",
]

[project.license]
Expand All @@ -25,5 +32,17 @@ file = "LICENSE"
"Homepage" = "https://github.com/Universite-Gustave-Eiffel/acoustic-toolbox"
"Bug Tracker" = "https://github.com/Universite-Gustave-Eiffel/acoustic-toolbox/issues"

[project.optional-dependencies]
docs = [
"sphinx-rtd-theme==1.3.0rc1",
"sphinx>=1.6, <8",
"nbsphinx>=0.9.4",
"nbsphinx-link>=1.3.0",
"jupyter>=1.0.0",
]
test = [
"pytest>=8.3.2",
]

[tool.flit.sdist]
include = ["tests/"]

0 comments on commit ec88c31

Please sign in to comment.