From 79109446b263d5add358b5824167bb3d30ec6203 Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Sat, 31 Oct 2026 21:05:55 +0100 Subject: [PATCH] [DOC] document every function of pytta.functions and build on Read the Docs The functions page listed some functions by hand; it now documents the whole module, so new functions appear without editing it. pytta.iso3741 gets its page. The utilities page pointed to filter_alpha, which does not exist, in place of filter_values, and conf.py referred to a _static folder that does not exist; both stopped the build with errors. The release shown is read from pytta.__version__. .readthedocs.yaml builds the documentation on Read the Docs with Python 3.12, PortAudio and Sphinx, and the installation page states the requirements. Co-Authored-By: Claude Fable 5.1 --- .readthedocs.yaml | 20 ++++++++++++++++++++ docs/conf.py | 4 ++-- docs/install.rst | 22 ++++++++++++++-------- docs/pyttadoc/functions.rst | 27 ++++----------------------- docs/pyttadoc/index.rst | 1 + docs/pyttadoc/iso3741.rst | 7 +++++++ docs/pyttadoc/utils/freq.rst | 2 +- 7 files changed, 49 insertions(+), 34 deletions(-) create mode 100644 .readthedocs.yaml create mode 100644 docs/pyttadoc/iso3741.rst diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..37e60d6 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,20 @@ +# Read the Docs configuration: https://docs.readthedocs.io/en/stable/config-file/v2.html +version: 2 + +build: + os: ubuntu-24.04 + tools: + python: "3.12" + apt_packages: + - libportaudio2 # sounddevice is imported with pytta + jobs: + post_create_environment: + - python -m pip install sphinx sphinx_rtd_theme + +sphinx: + configuration: docs/conf.py + +python: + install: + - method: pip + path: . diff --git a/docs/conf.py b/docs/conf.py index 3516287..3a88cbb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,7 +22,8 @@ copyright = '2020, ' + author # The full version, including alpha/beta/rc tags -release = '0.1.0' +import pytta # noqa: E402 +release = pytta.__version__ # -- General configuration --------------------------------------------------- @@ -88,4 +89,3 @@ # 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'] diff --git a/docs/install.rst b/docs/install.rst index 640907f..b2871b1 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -3,14 +3,20 @@ Installation ============ -If you want to check the most up to date beta version, please get the -development branch source code, clone our repository to your local git, or -even install it from pip, as follows: +PyTTa needs Python 3.10 or later. Sounddevice, used for audio input and +output, needs the PortAudio library, which its wheels for Windows and macOS +include. On Linux, install it with the system package manager, for example:: - ~ $ pip install git+https://github.com/pyttamaster/pytta@development + sudo apt install libportaudio2 -To install the last version compiled to pip, which at this point may not be -the best version on the repository, do: +To install the last version published on PyPI, which can be behind the +development branch:: - ~ $ pip install pytta - \ No newline at end of file + pip install pytta + +To install the development branch:: + + pip install "pytta @ git+https://github.com/pyttamaster/pytta@development" + +``pytta.plot_waterfall`` needs the optional packages more-itertools and +kaleido. diff --git a/docs/pyttadoc/functions.rst b/docs/pyttadoc/functions.rst index add57c0..992fbc6 100644 --- a/docs/pyttadoc/functions.rst +++ b/docs/pyttadoc/functions.rst @@ -3,27 +3,8 @@ Functions ========= -.. automodule:: pytta.functions - -.. autofunction:: pytta.merge -.. autofunction:: pytta.fft_convolve -.. autofunction:: pytta.read_wav -.. autofunction:: pytta.write_wav -.. autofunction:: pytta.list_devices -.. autofunction:: pytta.get_device_from_user -.. autofunction:: pytta.SPL -.. autofunction:: pytta.find_delay -.. autofunction:: pytta.resample -.. autofunction:: pytta.corr_coef -.. autofunction:: pytta.peak_time -.. autofunction:: pytta.save -.. autofunction:: pytta.load -.. autofunction:: pytta.weighting -.. autofunction:: pytta.fft_degree -.. autofunction:: pytta.plot_time -.. autofunction:: pytta.plot_time_dB -.. autofunction:: pytta.plot_freq -.. autofunction:: pytta.plot_bars -.. autofunction:: pytta.plot_spectrogram -.. autofunction:: pytta.plot_waterfall +The functions of this module are also available from the top level, e.g. +``pytta.merge`` for ``pytta.functions.merge``. +.. automodule:: pytta.functions + :members: diff --git a/docs/pyttadoc/index.rst b/docs/pyttadoc/index.rst index ca3da8d..7975820 100644 --- a/docs/pyttadoc/index.rst +++ b/docs/pyttadoc/index.rst @@ -64,4 +64,5 @@ Modules: functions generate rooms + iso3741 properties diff --git a/docs/pyttadoc/iso3741.rst b/docs/pyttadoc/iso3741.rst new file mode 100644 index 0000000..5fb9453 --- /dev/null +++ b/docs/pyttadoc/iso3741.rst @@ -0,0 +1,7 @@ +.. currentmodule:: pytta + +ISO 3741 +======== + +.. automodule:: pytta.iso3741 + :members: diff --git a/docs/pyttadoc/utils/freq.rst b/docs/pyttadoc/utils/freq.rst index a0d4852..19a87d0 100644 --- a/docs/pyttadoc/utils/freq.rst +++ b/docs/pyttadoc/utils/freq.rst @@ -9,5 +9,5 @@ Frequency utilities .. autofunction:: pytta.utils.fractional_octave_frequencies .. autofunction:: pytta.utils.normalize_frequencies .. autofunction:: pytta.utils.freqs_to_center_and_edges -.. autofunction:: pytta.utils.filter_alpha +.. autofunction:: pytta.utils.filter_values