Split hearing into speech and hearing - #473
Conversation
The package held two subjects that share a word and nothing else. Speech intelligibility scores a transmission channel and is read by whoever designs a room or a public address system; hearing conservation is about the ear and is read by an occupational hygienist. The generated reference and the sidebar had separated them long ago, which is why the reference had a speech section drawing from a package called something else; the code is what had not caught up. STI, SII and STOI become phonometry.speech. The audiometric thresholds, the ISO 1999 hearing loss and the ISO 9612 exposure stay in phonometry.hearing, which is now what its name says. No module is renamed and no reference page moves, so this is the cheapest of the taxonomy splits and the one that removes an exception rather than adding a URL. Compatibility follows the pattern the metrology split established: the three pre-split module paths still import and delegate with a notice, reading a moved name from the namespace it left still works, dir() still lists them, and all of it goes in 5.0. The frozen snapshot of pre-split paths grows by three. The renderers split the same way, so _plot/hearing.py becomes two modules with their own translation tables. The speech half gets the Spanish test it never had, including the four vocal efforts of the ANSI S3.5 spectra, which are table keys reached through the result rather than written in the renderer. The snippet gate earned its place here: it caught the SII guide importing the new speech package into a block that already bound `speech` as the variable holding the speech spectrum. The variable is renamed.
From an adversarial review of the split. The fiche generator still called the library through the namespace the names left: `ph.hearing.sti_from_impulse_response` and its SII neighbour, the two factories behind the STI and SII example fiches. They ran on a deprecation notice nothing turns red, and they would have stopped running in 5.0. The sibling scripts were migrated with the split; these two were missed. The snippet gate looked at the guides and at nothing else, which is where the one broken example was hiding: `llms.txt`, the first thing an assistant reads, opened with `from phonometry import filters, signal` and the package has been `signals` since the rename. The gate now covers the README, the PyPI long description and `llms.txt` the same way it covers a guide, and it reads the generated dumps too. Those dumps glue unrelated pages into one file, so they are read block by block: carrying an import across a page boundary invents collisions no reader can hit, which is what the first run reported. A block that passes `...` to a call is a sketch of a call, not a computation, so it is read but not run; the README leads with one. Three links pointed at `src/phonometry/hearing/sii.py`, which is now under `speech`, from the errata page in both languages and in the GitHub mirror. Two test-data READMEs cited test files that moved, one of them in this split and one back in the 3.2 modularization. The Spanish test for the speech renderers claimed to hold the translation table to its contents and did not: deleting three of the four band-importance labels left it green, because it exercised one procedure and never read the legend. It now checks all four, and a mutation of the table fails it. The CHANGELOG said three sections carry a key that is not a subpackage name and then listed four things, one of which is itself three. It is five, and they are named.
|
You've reached the fair usage limit for the Bito Code Review Agent trial. Upgrade to a paid plan or contact support@bito.in for assistance. Learn more |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (23)
📝 WalkthroughWalkthroughThe pull request creates ChangesSpeech namespace split
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant Hearing
participant Speech
participant Plot
Caller->>Hearing: access legacy speech API
Hearing->>Speech: resolve compatibility alias
Speech->>Plot: render speech result
Plot-->>Caller: return localized plot
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Reviewer's GuideSplit speech intelligibility functionality out of the hearing domain into a new phonometry.speech package, updated all plotting/rendering, documentation, compatibility shims, and snippet checks accordingly, while preserving 4.x to 5.0 migration guarantees and adding tests for Spanish plot labels and snippet execution/shadowing behaviour. Flow diagram for updated documentation snippet checksflowchart TD
main --> pages_and_pairs
pages_and_pairs[_pages] --> pages
pages_and_pairs --> pairs
pages --> restated[_restated]
pages --> published[_published]
pages_no_restated[pages_without_restated] --> shadowing_normal
restated --> shadowing_restated
shadowing_normal[check_shadowing carry_true] --> shadowing_failures_normal
shadowing_restated[check_shadowing carry_false] --> shadowing_failures_restated
pairs --> translation_failures[check_translations]
main -->|args.static_false| execution
execution --> runnable_pages
runnable_pages[runnable_site_en_plus_published] --> execution_checks[check_execution]
subgraph execution_pipeline
block_list[_blocks] --> filtered_blocks
filtered_blocks[_is_sketch filter] --> run_page_script
run_page_script[_run_page] --> stderr_tail
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Pull request overview
This PR completes the long-standing taxonomy split between speech intelligibility and hearing conservation by introducing phonometry.speech and narrowing phonometry.hearing accordingly, while preserving backward compatibility via deprecation shims and updating docs/snippet-validation to match the new module layout.
Changes:
- Introduces
src/phonometry/speech/as the home for STI/STIPA, SII (incl. procedures and standard spectra), and STOI/ESTOI; updates imports/re-exports across the package. - Narrows
phonometry.hearingto conservation-focused APIs and adds namespace shims sohearing.<moved_name>continues to resolve (with deprecations) until 5.0. - Splits plotting renderers (
_plot/hearing.py→ add_plot/speech.py) and strengthens documentation snippet gating (including generated dumps and sketch blocks), plus adds Spanish speech plot i18n tests.
Reviewed changes
Copilot reviewed 61 out of 61 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_deprecated_aliases.py | Extends frozen pre-split import-path coverage and adds namespace-resolution test for moved speech names via hearing. |
| tests/test_check_doc_snippets.py | Adds tests for generated-dump scope handling and for “sketch” blocks being read but not executed. |
| tests/speech/test_stipa_certified.py | Updates internal imports to the new phonometry.speech.sti location. |
| tests/speech/test_sti.py | Updates STI test imports to the new speech module path. |
| tests/speech/test_sti_report.py | Switches report-related STI imports to phonometry.speech. |
| tests/speech/test_speech_plot_i18n.py | New tests pinning EN/ES behavior of speech .plot(language=...) renderers. |
| tests/speech/test_sii.py | Updates SII tests to import from phonometry.speech. |
| tests/speech/test_sii_report.py | Switches SII report tests to use phonometry.speech APIs. |
| tests/speech/test_objective_intelligibility.py | Updates STOI/ESTOI tests to the new phonometry.speech.objective_intelligibility. |
| tests/data/stipa/README.md | Fixes test-path references after moving STIPA tests under tests/speech/. |
| tests/data/iso532_1/README.md | Updates loudness test consumer path reference. |
| src/phonometry/speech/sti.py | Redirects STIResult plotting to _plot.speech renderers. |
| src/phonometry/speech/sii.py | Redirects SII-related plotting to _plot.speech renderers. |
| src/phonometry/speech/objective_intelligibility.py | Updates doc references and redirects plotting to _plot.speech. |
| src/phonometry/speech/init.py | New speech namespace exporting STI/SII/STOI public surface. |
| src/phonometry/hearing/init.py | Narrows hearing namespace and adds PEP 562 shims (__getattr__, __dir__) to serve moved speech names until 5.0. |
| src/phonometry/_report/sti.py | Updates STI report type references to phonometry.speech.sti. |
| src/phonometry/_report/sii.py | Updates SII report type references to phonometry.speech.sii. |
| src/phonometry/_plotting.py | Rehomes plot renderer re-exports for STI/SII to _plot.speech. |
| src/phonometry/_plot/speech.py | New speech plotting module with its own EN/ES string table and renderers for STI/SII/STOI and speech spectra. |
| src/phonometry/_plot/hearing.py | Removes speech-intelligibility plotting code/strings after the split. |
| src/phonometry/_compat.py | Updates 4.x move-map to route old STI/SII/hearing speech paths to phonometry.speech.*. |
| src/phonometry/init.py | Moves top-level re-exports of STI/SII/STOI to import from phonometry.speech. |
| site/src/content/docs/reference/errata.md | Updates errata links to the new src/phonometry/speech/sii.py path. |
| site/src/content/docs/reference/api/speech/sti.md | Updates frontmatter title to speech.sti. |
| site/src/content/docs/reference/api/speech/sii.md | Updates frontmatter title to speech.sii. |
| site/src/content/docs/reference/api/speech/objective-intelligibility.md | Updates title and inline links to phonometry.speech.*. |
| site/src/content/docs/reference/api/index.md | Updates API table entries from hearing.* to speech.* for speech section. |
| site/src/content/docs/guides/speech-transmission.mdx | Updates guide imports/usages from hearing to speech. |
| site/src/content/docs/guides/speech-intelligibility.mdx | Updates guide imports/usages from hearing to speech and avoids name collisions in examples. |
| site/src/content/docs/guides/occupational-exposure.mdx | Adjusts import ordering in examples (hearing remains; ReportMetadata import reordered). |
| site/src/content/docs/guides/objective-intelligibility.mdx | Updates API reference link target to speech.objective_intelligibility. |
| site/src/content/docs/getting-started.mdx | Updates domain-namespace count to reflect the new split. |
| site/src/content/docs/es/reference/errata.md | Spanish errata: updates link to src/phonometry/speech/sii.py. |
| site/src/content/docs/es/guides/speech-transmission.mdx | Spanish guide: switches hearing.* calls to speech.*. |
| site/src/content/docs/es/guides/speech-intelligibility.mdx | Spanish guide: switches hearing.* calls to speech.* and updates examples accordingly. |
| site/src/content/docs/es/guides/occupational-exposure.mdx | Spanish guide: adjusts import ordering in example snippet. |
| site/src/content/docs/es/guides/objective-intelligibility.mdx | Spanish guide: updates API reference link to speech.objective_intelligibility. |
| site/src/content/docs/es/getting-started.mdx | Spanish getting-started: updates domain-namespace count. |
| site/public/llms/llms-start.txt | Updates domain-namespace count for LLM-facing summary. |
| site/public/llms/llms-speech.txt | Updates speech guide dump to import from speech and avoids stale signal usage. |
| site/public/llms/llms-room-acoustics.txt | Updates restated snippets referencing STI APIs to use speech.*. |
| site/public/llms/llms-hearing-exposure.txt | Adjusts import ordering in restated hearing/exposure snippet. |
| scripts/generate_reports.py | Updates report example generation to call ph.speech.* for STI/SII. |
| scripts/generate_llms.py | Fixes generated llms summary import (signals instead of stale signal). |
| scripts/generate_graphs.py | Updates STI/SII internal references in graph generation to phonometry.speech.*. |
| scripts/conformance_report.py | Switches STI/SII/STOI references to ph.speech.* / phonometry.speech.*. |
| scripts/check_doc_snippets.py | Extends snippet checking to README/PyPI/llms surfaces, treats generated dumps as non-carry blocks, and skips execution of sketch blocks. |
| scripts/api_taxonomy.py | Updates taxonomy to place STI/SII/STOI under phonometry.speech.* and fixes section key mapping. |
| README.md | Splits hearing row into separate speech and hearing rows and updates namespace count. |
| README_PYPI.md | Mirrors README taxonomy split (speech vs hearing). |
| llms.txt | Fixes minimal usage import (signals not signal). |
| llms-full.txt | Propagates signals import fix and updates taxonomy counts + speech/hearing table rows in generated dump. |
| docs/speech-transmission.md | Updates mirrored docs to use speech.* instead of hearing.*. |
| docs/speech-intelligibility.md | Updates mirrored docs to use speech.* instead of hearing.*. |
| docs/occupational-exposure.md | Adjusts import ordering in mirrored occupational exposure doc. |
| docs/getting-started.md | Updates mirrored docs domain-namespace count. |
| docs/ERRATA.md | Updates mirrored errata link to new speech/sii.py path. |
| docs/api-reference.md | Updates mirrored API reference taxonomy table and namespace count. |
| CHANGELOG.md | Adds an Unreleased entry describing the hearing→speech split and compatibility approach. |
| .github/labeler.yml | Adds "area: speech" label automation for src/phonometry/speech/** and tests/speech/**. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CHANGELOG.md`:
- Around line 1008-1010: Update the release note’s moved speech API list to
include STI, STIPA, SII, STOI, and ESTOI, preserving the existing
phonometry.speech and phonometry.hearing module descriptions.
In `@scripts/check_doc_snippets.py`:
- Around line 246-251: Update _is_sketch to inspect each ast.Call node’s keyword
arguments in node.keywords as well as positional args, treating any keyword
value that is an ast.Constant Ellipsis as a sketch. Add a regression test
covering a call such as function(value=...) and verify _run_page does not
execute it.
In `@src/phonometry/_plot/speech.py`:
- Line 79: Update the speech renderer docstrings in
src/phonometry/_plot/speech.py at lines 79-79 and 172-172: change the STIResult
reference to phonometry.speech.sti.STIResult and the SIIResult reference to
phonometry.speech.sii.SIIResult, respectively, while leaving the surrounding
documentation unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 92ccc265-5bf1-4ce5-858f-e36096a5abc2
📒 Files selected for processing (61)
.github/labeler.ymlCHANGELOG.mdREADME.mdREADME_PYPI.mddocs/ERRATA.mddocs/api-reference.mddocs/getting-started.mddocs/occupational-exposure.mddocs/speech-intelligibility.mddocs/speech-transmission.mdllms-full.txtllms.txtscripts/api_taxonomy.pyscripts/check_doc_snippets.pyscripts/conformance_report.pyscripts/generate_graphs.pyscripts/generate_llms.pyscripts/generate_reports.pysite/public/llms/llms-hearing-exposure.txtsite/public/llms/llms-room-acoustics.txtsite/public/llms/llms-speech.txtsite/public/llms/llms-start.txtsite/src/content/docs/es/getting-started.mdxsite/src/content/docs/es/guides/objective-intelligibility.mdxsite/src/content/docs/es/guides/occupational-exposure.mdxsite/src/content/docs/es/guides/speech-intelligibility.mdxsite/src/content/docs/es/guides/speech-transmission.mdxsite/src/content/docs/es/reference/errata.mdsite/src/content/docs/getting-started.mdxsite/src/content/docs/guides/objective-intelligibility.mdxsite/src/content/docs/guides/occupational-exposure.mdxsite/src/content/docs/guides/speech-intelligibility.mdxsite/src/content/docs/guides/speech-transmission.mdxsite/src/content/docs/reference/api/index.mdsite/src/content/docs/reference/api/speech/objective-intelligibility.mdsite/src/content/docs/reference/api/speech/sii.mdsite/src/content/docs/reference/api/speech/sti.mdsite/src/content/docs/reference/errata.mdsrc/phonometry/__init__.pysrc/phonometry/_compat.pysrc/phonometry/_plot/hearing.pysrc/phonometry/_plot/speech.pysrc/phonometry/_plotting.pysrc/phonometry/_report/sii.pysrc/phonometry/_report/sti.pysrc/phonometry/hearing/__init__.pysrc/phonometry/speech/__init__.pysrc/phonometry/speech/objective_intelligibility.pysrc/phonometry/speech/sii.pysrc/phonometry/speech/sti.pytests/data/iso532_1/README.mdtests/data/stipa/README.mdtests/speech/test_objective_intelligibility.pytests/speech/test_sii.pytests/speech/test_sii_report.pytests/speech/test_speech_plot_i18n.pytests/speech/test_sti.pytests/speech/test_sti_report.pytests/speech/test_stipa_certified.pytests/test_check_doc_snippets.pytests/test_deprecated_aliases.py
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #473 +/- ##
=======================================
Coverage 96.98% 96.99%
=======================================
Files 253 255 +2
Lines 38487 38505 +18
=======================================
+ Hits 37327 37347 +20
+ Misses 1160 1158 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Numerical conformance report✅ 533/533 conformance checks pass across 57 domains and 362 standards - filters class 1 - weightings within IEC 61672-1 class 1. Each row pins a standard clause to its expected normative value and the value the library computes. Every section below is collapsible and stays collapsed while all of its rows pass; a section with any failing row opens automatically. ✅ Numerical validation - filters & weightings: class showcase (IEC 61260-1 · IEC 61672-1 · ISO 7196)IEC 61260-1:2014 class per filter architecture (order 6, one-third-octave, 100 Hz-10 kHz, fs = 48 kHz). For each architecture the table shows, at its binding band, the measured relative attenuation and the class-1 limit it must clear, so the number and the range it must sit in are both visible. A positive margin means the acceptance limits are met with that much room.
Only Butterworth (the library default) and Chebyshev-II are class-compliant architectures. Chebyshev-I and elliptic trade the mask for passband ripple, and Bessel for a maximally-flat group delay (soft rolloff); they cannot satisfy the IEC 61260-1 Class 1/2 attenuation mask by construction, so they are labelled By design - this is expected, not a failure or regression. Frequency-weighting conformance (A/C: IEC 61672-1 Table 3; G: ISO 7196 A.3). The max deviation from nominal is informational (it falls at a frequency extreme where the tolerance is widest and asymmetric); compliance is judged at the binding frequency - the one with the least headroom - where the deviation, the applicable tolerance band and the headroom are shown together.
✅ Filters & weightings: 100% (10/10)
✅ Levels & dosimetry: 100% (9/9)
✅ Room & building acoustics: 100% (72/72)
✅ Room acoustics: 100% (16/16)
✅ Psychoacoustics: 100% (14/14)
✅ Speech transmission (IEC 60268-16): 100% (10/10)
✅ System measurement (Golay / Kirkeby / Mueller-Massarani): 100% (5/5)
✅ Intensity & sound power: 100% (10/10)
✅ Building prediction & uncertainty: 100% (15/15)
✅ Outdoor propagation & occupational exposure: 100% (10/10)
✅ Materials: absorption, airflow & impedance: 100% (6/6)
✅ Scattering & diffusion (ISO 17497): 100% (14/14)
✅ In-situ road absorption (ISO 13472): 100% (3/3)
✅ Precision sound power (ISO 3745 / 9614-3): 100% (4/4)
✅ Human vibration (ISO 8041 / 2631 / 5349): 100% (15/15)
✅ Speech intelligibility (ANSI S3.5-1997): 100% (24/24)
✅ Objective intelligibility (STOI / ESTOI): 100% (3/3)
✅ Impulsive-sound prominence (NT ACOU 112): 100% (2/2)
✅ Impulsive-sound prominence (ISO/PAS 1996-3): 100% (2/2)
✅ Room noise (ANSI S12.2-2019): 100% (3/3)
✅ Hearing threshold (ISO 7029 / ISO 389-7): 100% (3/3)
✅ Measurement uncertainty (GUM / Supplement 1): 100% (7/7)
✅ Noise-induced hearing loss (ISO 1999): 100% (6/6)
✅ Multiple-shock whole-body vibration (ISO 2631-5): 100% (6/6)
✅ Sound absorption in enclosed spaces (EN 12354-6): 100% (2/2)
✅ Prominent discrete tones (ECMA-418-1): 100% (2/2)
✅ Tonal audibility (ISO/PAS 20065): 100% (11/11)
✅ Psychoacoustic annoyance & fluctuation strength (Fastl & Zwicker): 100% (3/3)
✅ Electroacoustics: distortion & frequency response: 100% (20/20)
✅ Calibrated spectral analysis (Bendat & Piersol): 100% (12/12)
✅ Multiple-input coherence (Bendat & Piersol): 100% (5/5)
✅ Time-frequency analysis (Bendat & Piersol): 100% (3/3)
✅ Correlation, time delay and envelope (B&P / Knapp & Carter): 100% (7/7)
✅ Cepstrum, liftering and envelope spectrum (Havelock / B&P): 100% (3/3)
✅ Time synchronous averaging (McFadden 1987): 100% (5/5)
✅ Data qualification and Rice statistics (Bendat & Piersol): 100% (8/8)
✅ Underwater acoustics (ISO 18405/17208/18406): 100% (6/6)
✅ Underwater sound propagation (transmission loss): 100% (16/16)
✅ Underwater propagation regimes (Weston flux theory): 100% (3/3)
✅ Marine-mammal auditory weighting (NMFS / Southall): 100% (4/4)
✅ Underwater numerical propagation (modes / rays / PE): 100% (4/4)
✅ Aircraft noise (ICAO Annex 16 / IEC 61265): 100% (15/15)
✅ Rotorcraft noise (ECAC Doc 32 / NORAH2): 100% (12/12)
✅ CNOSSOS-EU road source (Directive 2002/49/EC Annex II): 100% (6/6)
✅ Wind-turbine noise (IEC 61400-11): 100% (3/3)
✅ Porous & multilayer absorbers (Mechel / Bies / Cox & D'Antonio): 100% (20/20)
✅ Slow-sound perfect absorbers (Jimenez et al. Appl. Sci. 2017): 100% (3/3)
✅ Program loudness (ITU-R BS.1770 / EBU R 128): 100% (8/8)
✅ 2D FDTD wave simulation (Attenborough & Van Renterghem 2021, Ch. 4): 100% (4/4)
✅ Swept-sine distortion & phase utilities (Farina / Novak): 100% (7/7)
✅ Spherical ground & barriers (Attenborough / Salomons / Bies): 100% (7/7)
✅ Panel & aperture sound insulation (Bies / Hopkins / Cremer): 100% (17/17)
✅ Bending-wave plate-junction transmission (Cremer / Craik / Hopkins): 100% (6/6)
✅ Atmospheric refraction (Salomons rays / GFPE): 100% (3/3)
✅ Electroacoustics: 100% (9/9)
✅ Industrial noise control: 100% (22/22)
✅ CNOSSOS-EU railway source (Directive 2002/49/EC Annex II): 100% (8/8)
Tests & coverage — 47340 tests, 0 failures (✅ all green)
Conformance harness: |
Every Sphinx cross-reference in the package that named a pre-4.0 module path now names the module it points at. There were about ninety of them, nearly all in the renderers, and two were the ones the reviewer flagged: the speech renderers pointed at `phonometry.sti` and `phonometry.sii`, which are 3.1 aliases that warn. They are resolved from the alias table itself rather than by hand, so the class is gone rather than the two instances. The table's own file is left alone: naming the deprecated paths is its subject. The release note listed STI, SII and STOI and left out STIPA and ESTOI, which move with them and are public API of their own. A call sketch written with a keyword placeholder, `f(level=...)`, is the same thing as `f(...)` and the gate now reads it as one instead of running it. The repeated axis labels in the new speech renderers become module constants, which is what SonarCloud asked for and what the metrology split already did. The two branches the coverage report named are now tested rather than excused: the modulation-index axis of an STI result that does not carry the seven octave bands, which a caller can build because the result class is public, and the refusal to plot an exposure result that carries no per-task contributions.
|
|
You've reached the fair usage limit for the Bito Code Review Agent trial. Upgrade to a paid plan or contact support@bito.in for assistance. Learn more |



What and why
phonometry.hearingheld two subjects that share a word and nothing else. Speech intelligibility scores a transmission channel and is read by whoever designs a room or a public address system; hearing conservation is about the ear and is read by an occupational hygienist. The generated reference and the sidebar separated them long ago, which is why the reference had aspeechsection drawing from a package called something else. The code is what had not caught up.phonometry.speech: STI and STIPA (IEC 60268-16), the Speech Intelligibility Index (ANSI S3.5-1997) with its four band-importance procedures and the standard speech spectra, and STOI/ESTOI.phonometry.hearing: what its name says. Audiometric thresholds (ISO 7029, ISO 389-7), noise-induced hearing loss (ISO 1999) and daily noise exposure (ISO 9612).No module is renamed and no reference page moves, so this is the cheapest of the taxonomy splits and the only one that removes a consistency exception instead of adding URLs. Five sections still carry a key that is not the name of a single subpackage:
roomsandenvironmentwait for the steps that rename their packages, andfilters,aeroacousticsandpowerare the three documented sections that deliberately span two parents.Compatibility follows the pattern the metrology split established: the three pre-split module paths still import and delegate with a notice, reading a moved name from the namespace it left (
hearing.stipa) still works,dir()still lists them, and all of it goes in 5.0. The frozen snapshot of pre-split paths grows by three.The renderers split the same way, so
_plot/hearing.pybecomes two modules with their own translation tables, and the Spanish labels of the speech half get the test they never had: the four vocal efforts of the ANSI S3.5 spectra and the four band-importance labels are keys reached through the result rather than written in the renderer, so a literal search does not see them and a mutation of the table now fails the test.Also fixed here
The snippet gate that landed with the previous split earned its place twice.
It caught the SII guide importing the new
speechpackage into a block that already boundspeechas the variable holding the speech spectrum, which is the silent-rebinding failure it exists for. And once widened, it caught a defect already onmain:llms.txt, the first thing an assistant reads, opened withfrom phonometry import filters, signalwhen the package has beensignalssince the rename. The gate now covers the README, the PyPI long description andllms.txtthe same way it covers a guide, and reads the generated dumps block by block, since those glue unrelated pages and carrying an import across a page boundary invents collisions no reader can hit.Two more from the review: the fiche generator still called
ph.hearing.sti_from_impulse_responseand its SII neighbour, running on a deprecation notice that nothing turns red; and three links pointed atsrc/phonometry/hearing/sii.pyfrom the errata page in both languages and in the GitHub mirror.Validation
No new computation: this moves code. The full suite passes (7864 passed, 23 skipped) and the conformance report, the committed figures and the example fiches are byte-for-byte identical to
main, which is the evidence that nothing was recomputed. The fiches were regenerated after the generator fix and still match.Checklist
Ran locally, same as CI:
ruff check .mypy src scriptsbandit -r srcpytest -qRegenerated where this change touches them:
make conformance(no diff)make api-docs(no diff beyond the three moved module paths in the generated pages)make llmsmake reportspluscheck_reports.py(no diff: all 67 fiches match)check_figures.pyandcheck_figure_contrast.py(no diff)make pypi-readmeafter editingREADME.mdmake snippetsAlways:
.github/labeler.yml[Unreleased]Also run: the site builds clean with the link validator green,
check:math,generate_site_reports.py --checkandcheck_errata_evidence.py.Summary by CodeRabbit
New Features
Documentation
Tests