Give vibration three families - #474
Conversation
The package mixed three readerships behind one name. Structural acoustics (mobility, junctions, radiation, SEA, transfer stiffness) is an input to building prediction and is read by whoever predicts a facade. Human exposure (ISO 2631, ISO 5349) is hygiene and is read by whoever signs an exposure assessment. Machinery diagnostics is maintenance. They share a word, an accelerometer and nothing else, and the documentation had already put the machinery guide under signal analysis to avoid the question. vibration.structural, vibration.human and vibration.machinery now say which is which. Three modules lose a word the package already says: human_vibration is human.exposure, multiple_shock_vibration is human.multiple_shock and machine_diagnostics is machinery.diagnostics. This is the first split that puts a second level under a domain, so it is also the first to prove the generated reference does not care: pages are named by the last component, so only the three renamed modules move, and their guides follow. The consistency contract needed nothing either, since the parent of a four-part module is still the domain. Nothing moves in the namespace. `from phonometry import vibration` exports the same 112 names, because the package re-exports its families explicitly, the way every other package in the tree does its modules. No notice fires for reading a name that never left the domain; the nine pre-split module paths import and delegate with the usual one until 5.0. The renderers stay in one _plot/vibration.py. They mirror the domain and the domain is still vibration, so splitting the translation table three ways would have been the riskiest edit here for no reader's benefit.
Four findings, the first of which was a real break. Registering an alias in sys.modules is enough for `import phonometry.vibration.human_vibration` and not for the `phonometry.vibration.human_vibration.daily_exposure` that follows it: the attribute is gone from the package. The other two splits never showed this because their narrowed packages carry a PEP 562 hook for the names that left them, and its last branch happens to serve the module aliases too. Vibration has no names to redirect, so it had no hook, so seven of its nine pre-split paths imported and then failed on the first read. It now carries the same hook with an empty redirect table, `dir()` lists the aliases like everywhere else, and the frozen list of pre-split paths is exercised through the dotted read as well as the import. The facade contract test stopped covering vibration the moment it grew a second level: it only looked at two-part module paths, so all 107 of its names went unchecked and nothing said so. It now checks the top-level package of the import at whatever depth the module sits, and a family that stops re-exporting a name the facade imports fails it again. The errata page cited four files this split moved, and the transplant carried them into both site pages as 404s. The guides had their link targets updated and their labels left behind, so fifteen pages printed a path that only exists as a deprecation shim while linking to the page of the real one.
|
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 |
|
Warning Review limit reached
Next review available in: 8 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR reorganizes vibration APIs into ChangesVibration namespace reorganization
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
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 the vibration domain into three subpackages (structural, human, machinery) while preserving the existing public namespace, add PEP 562 namespace shims and alias tables to keep all pre-split module paths and dotted reads working through 5.0, and update tests, docs, site content, and facade/import checks to reflect the new layout and avoid regressions. Sequence diagram for legacy vibration module access via namespace shimsequenceDiagram
actor User
participant ImportSystem
participant phonometry_compat as phonometry._compat
participant vibration as phonometry.vibration
participant sysmodules as sys.modules
User->>ImportSystem: import phonometry.vibration.human_vibration
ImportSystem->>phonometry_compat: _install()
phonometry_compat->>sysmodules: register alias phonometry.vibration.human_vibration
User->>vibration: human_vibration
vibration->>vibration: __getattr__("human_vibration")
alt name in targets
vibration-->>User: resolved attribute from targets
else fallback to module alias
vibration->>sysmodules: lookup phonometry.vibration.human_vibration
sysmodules-->>User: module alias
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 reorganizes the phonometry.vibration domain into three readership-focused families (structural, human, machinery) while preserving the existing top-level and domain-level public API via explicit reexports and compatibility shims, and updates tests + documentation to match the new module layout.
Changes:
- Introduces
phonometry.vibration.structural,phonometry.vibration.human, andphonometry.vibration.machinerysubpackages and updates internal imports accordingly. - Extends compatibility shims/tests to keep pre-split module import paths (and dotted reads) working through the deprecation window.
- Updates API docs, guides, generated site navigation, and reports/scripts to reference the new module paths.
Reviewed changes
Copilot reviewed 81 out of 86 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/vibration/test_vibration_plot_i18n.py | Updates imports to new vibration.human.multiple_shock path. |
| tests/vibration/structural/test_transfer_stiffness.py | Updates imports to new vibration.structural.transfer_stiffness path. |
| tests/vibration/structural/test_transfer_stiffness_report.py | Adds report rendering contract tests for transfer stiffness fiche. |
| tests/vibration/structural/test_radiation_efficiency.py | Adds structural radiation-efficiency regression/oracle tests. |
| tests/vibration/structural/test_point_mobility.py | Updates imports to new vibration.structural.point_mobility path. |
| tests/vibration/structural/test_mobility_report.py | Updates imports to new vibration.structural.mechanical_mobility path. |
| tests/vibration/structural/test_mechanical_mobility.py | Adds structural mobility/FRF family tests and plot contracts. |
| tests/vibration/structural/test_junction_transmission.py | Updates imports to new structural module paths. |
| tests/vibration/structural/test_experimental_sea.py | Updates imports to new vibration.structural.experimental_sea path. |
| tests/vibration/machinery/test_diagnostics.py | Updates imports to new vibration.machinery.diagnostics path. |
| tests/vibration/human/test_multiple_shock_vibration.py | Updates imports to new vibration.human.multiple_shock path. |
| tests/vibration/human/test_multiple_shock_report.py | Updates imports to new vibration.human.multiple_shock path. |
| tests/vibration/human/test_human_vibration.py | Updates module docstring and imports to vibration.human.exposure. |
| tests/vibration/human/test_human_vibration_report.py | Adds report rendering contract tests for exposure fiche. |
| tests/test_package_architecture.py | Extends facade reexport coverage to handle nested domain modules. |
| tests/test_deprecated_aliases.py | Adds/extends deprecated import + dotted-read coverage for vibration split. |
| src/phonometry/vibration/structural/transfer_stiffness.py | Adjusts internal relative imports and report/plot hooks for new package depth. |
| src/phonometry/vibration/structural/radiation_efficiency.py | Adjusts internal relative imports and doc references for new package depth. |
| src/phonometry/vibration/structural/point_mobility.py | Adjusts internal relative imports and cross-module doc references. |
| src/phonometry/vibration/structural/mechanical_mobility.py | Adjusts internal relative imports and report/plot hooks for new package depth. |
| src/phonometry/vibration/structural/junction_transmission.py | Updates internal imports and doc references to new structural paths. |
| src/phonometry/vibration/structural/experimental_sea.py | Updates internal imports and doc references to new structural paths. |
| src/phonometry/vibration/structural/init.py | New structural-family reexport surface for vibration. |
| src/phonometry/vibration/machinery/diagnostics.py | Adjusts internal relative imports and plot hook for new package depth. |
| src/phonometry/vibration/machinery/init.py | New machinery-family reexport surface for vibration. |
| src/phonometry/vibration/human/multiple_shock.py | Adjusts internal relative imports and report/plot hooks for new package depth. |
| src/phonometry/vibration/human/exposure.py | Adjusts internal relative imports and report/plot hooks for new package depth. |
| src/phonometry/vibration/human/init.py | New human-family reexport surface for vibration. |
| src/phonometry/vibration/init.py | Rebuilds vibration domain facade from the three families; adds namespace shims. |
| src/phonometry/metrology/init.py | Updates namespace __dir__ shim to match new compat helper signature. |
| src/phonometry/hearing/init.py | Updates namespace __dir__ shim to match new compat helper signature. |
| src/phonometry/building/panel_transmission.py | Updates imports/doc references to new structural radiation-efficiency module. |
| src/phonometry/building/masonry_cavity_wall.py | Updates imports/doc references to new structural point-mobility module. |
| src/phonometry/building/installed_structure_borne.py | Updates doc references to new structural mobility/transfer-stiffness modules. |
| src/phonometry/_report/iso7626.py | Updates type references to vibration.structural.mechanical_mobility. |
| src/phonometry/_report/iso2631_5.py | Updates type references to vibration.human.multiple_shock. |
| src/phonometry/_report/iso10846.py | Updates type references to vibration.structural.transfer_stiffness. |
| src/phonometry/_report/human_vibration.py | Updates type references to vibration.human.exposure. |
| src/phonometry/_plot/vibration.py | Updates TYPE_CHECKING and imports to new family module locations. |
| src/phonometry/_plot/junction.py | Updates type references to vibration.structural.junction_transmission. |
| src/phonometry/_plot/geometry.py | Updates type references and doc refs to new structural modules. |
| src/phonometry/_compat.py | Extends moved-module tables and generalizes namespace shim helpers for module-only splits. |
| src/phonometry/init.py | Updates top-level reexports to new vibration family module paths. |
| site/src/generated/api-sidebar.mjs | Updates generated sidebar links for renamed vibration reference pages. |
| site/src/content/docs/reference/errata.md | Updates errata links to moved vibration structural modules/tests. |
| site/src/content/docs/reference/api/vibration/transfer-stiffness.md | Updates reference title to new structural module path. |
| site/src/content/docs/reference/api/vibration/radiation-efficiency.md | Updates reference title and cross-links to new structural module path. |
| site/src/content/docs/reference/api/vibration/point-mobility.md | Updates reference title and cross-links to new structural module path. |
| site/src/content/docs/reference/api/vibration/multiple-shock.md | Updates reference title/labels and internal links to renamed page. |
| site/src/content/docs/reference/api/vibration/mechanical-mobility.md | Updates reference title to new structural module path. |
| site/src/content/docs/reference/api/vibration/junction-transmission.md | Updates reference title and internal links to new structural module path. |
| site/src/content/docs/reference/api/vibration/exposure.md | Updates reference title/label and internal links for renamed exposure page. |
| site/src/content/docs/reference/api/vibration/experimental-sea.md | Updates reference title to new structural module path. |
| site/src/content/docs/reference/api/vibration/diagnostics.md | Updates reference title/label and internal links for renamed diagnostics page. |
| site/src/content/docs/reference/api/index.md | Updates API index table entries to new vibration family module paths. |
| site/src/content/docs/reference/api/building/masonry-cavity-wall.md | Updates cross-link to new structural point-mobility path. |
| site/src/content/docs/reference/api/building/installed-structure-borne.md | Updates cross-link to new structural vibration module paths. |
| site/src/content/docs/guides/transfer-stiffness.mdx | Updates guide “See also” links to new structural module paths. |
| site/src/content/docs/guides/panel-sound-insulation.mdx | Updates guide API reference links to new structural module paths. |
| site/src/content/docs/guides/multiple-shock-vibration.mdx | Updates guide API reference link to new human multiple-shock module path. |
| site/src/content/docs/guides/mechanical-mobility.mdx | Updates guide API reference link to new structural module path. |
| site/src/content/docs/guides/machine-diagnostics.mdx | Updates guide API reference link to new machinery diagnostics module path. |
| site/src/content/docs/guides/junction-transmission.mdx | Updates guide code snippet + API reference link to new structural module path. |
| site/src/content/docs/guides/human-vibration.mdx | Updates guide API reference link to new human exposure module path. |
| site/src/content/docs/es/reference/errata.md | Spanish errata: updates links to moved vibration structural modules/tests. |
| site/src/content/docs/es/guides/transfer-stiffness.mdx | Spanish guide: updates API reference links to new structural module paths. |
| site/src/content/docs/es/guides/panel-sound-insulation.mdx | Spanish guide: updates API reference links to new structural module paths. |
| site/src/content/docs/es/guides/multiple-shock-vibration.mdx | Spanish guide: updates API reference link to new human multiple-shock module path. |
| site/src/content/docs/es/guides/mechanical-mobility.mdx | Spanish guide: updates API reference link to new structural module path. |
| site/src/content/docs/es/guides/machine-diagnostics.mdx | Spanish guide: updates API reference link to new machinery diagnostics module path. |
| site/src/content/docs/es/guides/junction-transmission.mdx | Spanish guide: updates snippet + API reference link to new structural module path. |
| site/src/content/docs/es/guides/human-vibration.mdx | Spanish guide: updates API reference link to new human exposure module path. |
| site/public/llms/llms-structure-borne.txt | Updates embedded snippet imports to new structural module paths. |
| site/public/llms/llms-insulation-design.txt | Updates embedded guide/API links to new structural module paths. |
| scripts/generate_reports.py | Updates example imports to new human multiple-shock module path. |
| scripts/generate_graphs.py | Updates imports in graph generation to new human/structural module paths. |
| scripts/conformance_report.py | Updates imports to new human multiple-shock module path. |
| scripts/bench.py | Updates import to new human exposure module path. |
| scripts/api_taxonomy.py | Updates taxonomy module lists and plot mapping to new vibration family module paths. |
| llms.txt | Updates LLM index links for renamed vibration reference pages. |
| llms-full.txt | Updates LLM full index links and vibration-family description. |
| docs/panel-sound-insulation.md | Updates API reference links to new structural module paths. |
| docs/junction-transmission.md | Updates snippet import to new structural point-mobility module path. |
| docs/ERRATA.md | Updates errata links to moved vibration structural modules/tests. |
| docs/api-reference.md | Updates vibration-family description and module-path examples. |
| CHANGELOG.md | Adds changelog entry describing vibration family split and deprecation behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #474 +/- ##
=======================================
Coverage 96.99% 96.99%
=======================================
Files 255 258 +3
Lines 38505 38520 +15
=======================================
+ Hits 37347 37363 +16
+ Misses 1158 1157 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@llms-full.txt`:
- Around line 2263-2264: Update the migration example’s old module path from
phonometry.signals.levels to phonometry.metrology.levels, while retaining
phonometry.signals.levels as the destination path.
In `@site/src/content/docs/es/guides/panel-sound-insulation.mdx`:
- Line 917: Update the API links in the Spanish guide’s “Referencia de API” list
to use the localized /phonometry/es/reference/api/ namespace for every
referenced symbol, including building.panel_transmission,
building.masonry_cavity_wall, building.aperture_transmission,
vibration.structural.radiation_efficiency, and
vibration.structural.point_mobility.
🪄 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: 45b8165d-6257-421d-92ba-3f6d6d24e2c6
⛔ Files ignored due to path filters (1)
site/src/generated/api-sidebar.mjsis excluded by!**/generated/**
📒 Files selected for processing (85)
CHANGELOG.mddocs/ERRATA.mddocs/api-reference.mddocs/junction-transmission.mddocs/panel-sound-insulation.mdllms-full.txtllms.txtscripts/api_taxonomy.pyscripts/bench.pyscripts/conformance_report.pyscripts/generate_graphs.pyscripts/generate_reports.pysite/public/llms/llms-insulation-design.txtsite/public/llms/llms-structure-borne.txtsite/src/content/docs/es/guides/human-vibration.mdxsite/src/content/docs/es/guides/junction-transmission.mdxsite/src/content/docs/es/guides/machine-diagnostics.mdxsite/src/content/docs/es/guides/mechanical-mobility.mdxsite/src/content/docs/es/guides/multiple-shock-vibration.mdxsite/src/content/docs/es/guides/panel-sound-insulation.mdxsite/src/content/docs/es/guides/transfer-stiffness.mdxsite/src/content/docs/es/reference/errata.mdsite/src/content/docs/guides/human-vibration.mdxsite/src/content/docs/guides/junction-transmission.mdxsite/src/content/docs/guides/machine-diagnostics.mdxsite/src/content/docs/guides/mechanical-mobility.mdxsite/src/content/docs/guides/multiple-shock-vibration.mdxsite/src/content/docs/guides/panel-sound-insulation.mdxsite/src/content/docs/guides/transfer-stiffness.mdxsite/src/content/docs/reference/api/building/installed-structure-borne.mdsite/src/content/docs/reference/api/building/masonry-cavity-wall.mdsite/src/content/docs/reference/api/index.mdsite/src/content/docs/reference/api/vibration/diagnostics.mdsite/src/content/docs/reference/api/vibration/experimental-sea.mdsite/src/content/docs/reference/api/vibration/exposure.mdsite/src/content/docs/reference/api/vibration/junction-transmission.mdsite/src/content/docs/reference/api/vibration/mechanical-mobility.mdsite/src/content/docs/reference/api/vibration/multiple-shock.mdsite/src/content/docs/reference/api/vibration/point-mobility.mdsite/src/content/docs/reference/api/vibration/radiation-efficiency.mdsite/src/content/docs/reference/api/vibration/transfer-stiffness.mdsite/src/content/docs/reference/errata.mdsrc/phonometry/__init__.pysrc/phonometry/_compat.pysrc/phonometry/_plot/geometry.pysrc/phonometry/_plot/junction.pysrc/phonometry/_plot/vibration.pysrc/phonometry/_report/human_vibration.pysrc/phonometry/_report/iso10846.pysrc/phonometry/_report/iso2631_5.pysrc/phonometry/_report/iso7626.pysrc/phonometry/building/installed_structure_borne.pysrc/phonometry/building/masonry_cavity_wall.pysrc/phonometry/building/panel_transmission.pysrc/phonometry/hearing/__init__.pysrc/phonometry/metrology/__init__.pysrc/phonometry/vibration/__init__.pysrc/phonometry/vibration/human/__init__.pysrc/phonometry/vibration/human/exposure.pysrc/phonometry/vibration/human/multiple_shock.pysrc/phonometry/vibration/machinery/__init__.pysrc/phonometry/vibration/machinery/diagnostics.pysrc/phonometry/vibration/structural/__init__.pysrc/phonometry/vibration/structural/experimental_sea.pysrc/phonometry/vibration/structural/junction_transmission.pysrc/phonometry/vibration/structural/mechanical_mobility.pysrc/phonometry/vibration/structural/point_mobility.pysrc/phonometry/vibration/structural/radiation_efficiency.pysrc/phonometry/vibration/structural/transfer_stiffness.pytests/test_deprecated_aliases.pytests/test_package_architecture.pytests/vibration/human/test_human_vibration.pytests/vibration/human/test_human_vibration_report.pytests/vibration/human/test_multiple_shock_report.pytests/vibration/human/test_multiple_shock_vibration.pytests/vibration/machinery/test_diagnostics.pytests/vibration/structural/test_experimental_sea.pytests/vibration/structural/test_junction_transmission.pytests/vibration/structural/test_mechanical_mobility.pytests/vibration/structural/test_mobility_report.pytests/vibration/structural/test_point_mobility.pytests/vibration/structural/test_radiation_efficiency.pytests/vibration/structural/test_transfer_stiffness.pytests/vibration/structural/test_transfer_stiffness_report.pytests/vibration/test_vibration_plot_i18n.py
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 — 47586 tests, 0 failures (✅ all green)
Conformance harness: |
The migration note in the curated API table said a path moved to itself: `phonometry.metrology.levels` had been swept to its own destination when the signals rename went through, so the example named the same module twice. Thirteen links on five Spanish pages pointed into the English reference. The convention is 149 to 0 the other way; these were the remainder. SonarCloud raised four issues in the multiple-shock module, none of them new code: the file moved, so its contents are new to the analyzer. The condition form of `np.where` becomes `np.nonzero`, which is what the numpy documentation asks for. The three negated comparisons stay: `not t > 0.0` rejects NaN and `t <= 0.0` accepts it, which is the whole reason the guard is written that way. The reason is now a comment beside each one and a test that passes NaN through both entry points.
The three remaining SonarCloud issues are the deliberate negated comparisons. The rule cannot see that `not t > 0.0` rejects NaN where `t <= 0.0` accepts it, so they carry the repository's NOSONAR marker beside the comment and the test that already pin the reason.
|
|
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.vibrationmixed three readerships behind one name. Structural acoustics (mobility, junctions, radiation, SEA, transfer stiffness) is an input to building prediction and is read by whoever predicts a facade. Human exposure (ISO 2631, ISO 5349) is hygiene and is read by whoever signs an exposure assessment. Machinery diagnostics is maintenance. They share a word, an accelerometer and nothing else, and the documentation had already put the machinery guide under signal analysis to avoid the question.vibration.structural:mechanical_mobility,point_mobility,junction_transmission,radiation_efficiency,experimental_sea,transfer_stiffness.vibration.human:exposure(ISO 2631-1, ISO 5349) andmultiple_shock(ISO 2631-5).vibration.machinery:diagnostics.Three modules lose a word the package already says:
human_vibrationtohuman.exposure,multiple_shock_vibrationtohuman.multiple_shock,machine_diagnosticstomachinery.diagnostics.What this one settles for the rest of the reorganisation
It is the first split to put a second level under a domain, so it answers three questions the later ones inherit:
_SECTION_SUBPACKAGESneeded nothing.vibration:from phonometry import vibrationexports the same 112 names, because the package re-exports its families explicitly, the way every other package re-exports its modules. But registering an alias insys.modulesis enough forimport phonometry.vibration.human_vibrationand not for the...human_vibration.daily_exposurethat follows it, so the package carries the same PEP 562 hook the other splits use, with nothing to redirect but its own modules. Seven of the nine pre-split paths were broken that way in the first commit here; the review caught it and the frozen list is now exercised through the dotted read as well as the import.The renderers stay in one
_plot/vibration.py. They mirror the domain and the domain is still vibration, so splitting the translation table three ways would have been the riskiest edit in the change for no reader's benefit.Also fixed here
The facade contract test stopped covering vibration the moment it grew a second level: it only looked at two-part module paths, so all 107 of its names went unchecked and nothing said so. It now checks the top-level package of the import at whatever depth the module sits, and a mutation that drops a name from a family fails it again.
The errata page cited four files this split moved, and the transplant carried them into both site pages as 404s. Fifteen guide pages had their link targets updated and their labels left behind, printing a path that only exists as a deprecation shim.
Validation
No new computation: this moves code. The suite passes (7907 passed, 23 skipped) and the conformance report, the committed figures and the example fiches are byte-for-byte identical to
main.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(the three renamed pages, nothing else)make llmscheck_reports.pyandcheck_figures.py(no diff)generate_site_reports.pyafter the errata edit, andcheck_errata_evidence.pymake snippetsAlways:
[Unreleased]Also run: the site builds clean with the link validator green, which is what caught the six guides pointing at the renamed reference pages.
Summary by Sourcery
Split the vibration domain into structural, human, and machinery subpackages while preserving the existing public API and tightening deprecation shims and facade contract coverage.
New Features:
Bug Fixes:
Enhancements:
Documentation:
Tests:
Summary by CodeRabbit