Give building three subgroups - #477
Conversation
Nineteen modules behind one name, and the reader had to know the field to tell them apart. The three subgroups say what the acoustician is doing. building.measurement is the building that exists: ISO 16283 in the field, ISO 10140 in the laboratory, ISO 10052 for the survey method, ISO 15186 by intensity, ISO 10848 for flanking, the heavy impact sources, the floor-covering improvement, the reception-plate power, and the ISO 717 ratings and ISO 12999 uncertainty that go with all of them. building.prediction is the building that does not exist yet: EN 12354-1 to -5 and the panel theory behind them. building.regulation is the code it has to satisfy, which is the Spanish CTE DB-HR today and the shape any other country takes tomorrow. Five modules lose a word their subgroup now says. building_prediction and detailed_prediction become prediction.global_model and prediction.detailed_model, which is what the two EN 12354 editions actually are; facade_prediction becomes prediction.facade, building_uncertainty becomes measurement.uncertainty and spanish_building_code becomes regulation.spain. Nothing moves in the namespace: from phonometry import building exports the same 251 names, and the nineteen pre-split module paths keep working until 5.0, dotted reads included. Two test files keep their old names on purpose. A suite without __init__.py imports every module by basename, so tests/building/regulation/test_spain.py collided with the environment one and measurement/test_uncertainty.py with the metrology one, and the collision only surfaces when the whole tree is collected at once. The architecture test now checks for it directly, which is cheaper than finding out on the last run before a push.
There was a problem hiding this comment.
Sorry @jmrplens, your pull request is larger than the review limit of 150000 diff characters
|
Important Review skippedToo many files! This PR contains 170 files, which is 70 over the limit of 100. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (170)
You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|
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 |
Reviewer's GuideIntroduce three explicit subpackages under phonometry.building (measurement, prediction, regulation) while keeping the public API and legacy module paths backwards-compatible, and update all imports, documentation, plotting, reporting, and tests to follow the new taxonomy and avoid test module name collisions. Flow diagram for legacy building module path shimsflowchart LR
legacy_import[legacy module path
e.g. phonometry.building.insulation]
--> compat_map[_compat.LEGACY_IMPORTS]
--> new_subpackage_path[building.measurement.insulation]
--> module_load[importlib loads module]
--> public_api[phonometry.building exports name]
top_level_import[from phonometry import building]
--> phonometry_building_init[building.__init__ re-exports 251 names]
--> public_api
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.building domain into three clearer subgroups—building.measurement, building.prediction, and building.regulation—while preserving the existing public API surface and keeping legacy module import paths working via compatibility shims.
Changes:
- Split and re-home building-related modules under
measurement/,prediction/, andregulation/, updating imports and documentation references throughout the codebase. - Add architecture-level test coverage to prevent pytest collection failures caused by duplicate
test_*.pybasenames. - Add/relocate tests for reports and moved modules (e.g., detailed-model fiche reports, structure-borne power fiche, aperture transmission).
Reviewed changes
Copilot reviewed 148 out of 171 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/vibration/structural/test_experimental_sea.py | Update import to moved flanking-transmission module |
| tests/test_package_architecture.py | Add guard test for unique test-module basenames |
| tests/test_deprecated_aliases.py | Extend deprecated-module import coverage for moved building paths |
| tests/simulation/test_elastic_fluid_solid.py | Update panel-transmission import path references |
| tests/simulation/test_elastic_fdtd.py | Update panel-transmission import path references |
| tests/reference_data.py | Update comments referencing moved test paths |
| tests/iso12354_building.py | Update referenced test filename in docs/comments |
| tests/conftest.py | Update test path in “always run” list |
| tests/building/regulation/test_spanish_building_code.py | Update imports and module reference for Spain regulation |
| tests/building/prediction/test_resilient_layers.py | Update resilient-layers import path |
| tests/building/prediction/test_global_model_report.py | Update imports for global-model + facade prediction results |
| tests/building/prediction/test_facade.py | Update module reference to new facade path |
| tests/building/prediction/test_detailed_model.py | Update imports for moved detailed-model types |
| tests/building/prediction/test_detailed_model_report.py | New/relocated tests for detailed-model PDF fiche rendering |
| tests/building/prediction/test_aperture_transmission.py | New/relocated tests for aperture/slit/circular opening transmission |
| tests/building/measurement/test_structure_borne_power.py | Update structure-borne power import path |
| tests/building/measurement/test_structure_borne_power_report.py | New/relocated tests for EN 15657 PDF fiche rendering |
| tests/building/measurement/test_lab_insulation.py | Update lab-insulation import path |
| tests/building/measurement/test_iso16251_report.py | Update floor-covering-improvement import path |
| tests/building/measurement/test_iso15186_report.py | Update intensity-insulation import path |
| tests/building/measurement/test_iso15186_element_report.py | Update intensity-insulation import path |
| tests/building/measurement/test_heavy_impact.py | Update heavy-impact helper import path |
| tests/building/measurement/test_building_uncertainty.py | Update uncertainty + insulation imports to new locations |
| src/phonometry/vibration/structural/radiation_efficiency.py | Update doc reference to moved panel-transmission module |
| src/phonometry/vibration/structural/experimental_sea.py | Update cross-reference to moved modal-density function |
| src/phonometry/noise_control/room_to_room.py | Update doc references to moved panel-transmission module |
| src/phonometry/materials/dynamic_stiffness.py | Update references to moved EN 12354 global model and ISO 16251 module |
| src/phonometry/materials/absorption_uncertainty.py | Update reference to moved building uncertainty module |
| src/phonometry/building/regulation/spain.py | Fix relative imports after relocation under regulation/ |
| src/phonometry/building/regulation/init.py | New regulation subpackage re-exports |
| src/phonometry/building/prediction/resilient_layers.py | Fix relative imports after relocation under prediction/ |
| src/phonometry/building/prediction/panel_transmission.py | Fix relative imports; update references to measurement rating/report types |
| src/phonometry/building/prediction/masonry_cavity_wall.py | Fix relative imports after relocation under prediction/ |
| src/phonometry/building/prediction/installed_structure_borne.py | Fix relative imports; update references to moved measurement module |
| src/phonometry/building/prediction/global_model.py | Fix relative imports after relocation under prediction/ |
| src/phonometry/building/prediction/facade.py | Fix relative imports; use measurement ISO 717 rating helpers |
| src/phonometry/building/prediction/detailed_model.py | Fix relative imports; wire to measurement helpers for ratings/flanking inputs |
| src/phonometry/building/prediction/ceiling_plenum.py | Fix relative imports after relocation under prediction/ |
| src/phonometry/building/prediction/aperture_transmission.py | Fix relative imports; update doc reference to moved facade module |
| src/phonometry/building/prediction/init.py | New prediction subpackage re-exports |
| src/phonometry/building/measurement/uncertainty.py | Fix relative imports after relocation under measurement/ |
| src/phonometry/building/measurement/survey_insulation.py | Fix relative imports; update report renderer imports |
| src/phonometry/building/measurement/structure_borne_power.py | Fix relative imports; update cross-reference to prediction module |
| src/phonometry/building/measurement/lab_insulation.py | Fix relative imports; update renderer imports |
| src/phonometry/building/measurement/intensity_insulation.py | Fix relative imports; update renderer imports |
| src/phonometry/building/measurement/insulation.py | Fix relative imports; update plot/report renderer imports |
| src/phonometry/building/measurement/heavy_impact.py | Fix relative imports; update plot imports |
| src/phonometry/building/measurement/floor_covering_improvement.py | Fix relative imports; update plot/report renderer imports |
| src/phonometry/building/measurement/flanking_transmission.py | Fix relative imports; update renderer imports |
| src/phonometry/building/measurement/init.py | New measurement subpackage re-exports |
| src/phonometry/_report/iso717.py | Update typing references to moved measurement rating result classes |
| src/phonometry/_report/iso16283.py | Update typing references to moved measurement result classes |
| src/phonometry/_report/iso16251.py | Update typing/imports for moved ISO 16251 + reference floor helpers |
| src/phonometry/_report/iso15186.py | Update typing/imports for moved intensity + rating classes |
| src/phonometry/_report/iso12354.py | Update typing/imports for moved prediction result classes; rating helper import |
| src/phonometry/_report/iso10848.py | Update typing/imports for moved flanking + rating classes |
| src/phonometry/_report/iso10140.py | Update typing/imports for moved lab + rating classes |
| src/phonometry/_report/iso10052.py | Update typing/imports for moved survey + rating classes |
| src/phonometry/_report/en15657.py | Update typing references to moved structure-borne power result |
| src/phonometry/_report/en12354_5.py | Update typing references to moved installed-structure-borne result |
| src/phonometry/_report/_insulation_fiche.py | Update typing references to moved rating result classes |
| src/phonometry/_plot/geometry.py | Update TYPE_CHECKING imports to moved prediction result classes |
| src/phonometry/_plot/common.py | Update typing references to moved rating classes |
| src/phonometry/_compat.py | Update deprecated-module resolution map for moved building modules |
| src/phonometry/init.py | Rewire facade imports to new measurement/prediction/regulation locations |
| site/src/generated/api-sidebar.mjs | Update API sidebar paths for renamed pages |
| site/src/content/docs/reference/errata.md | Update links/paths to moved building modules and tests |
| site/src/content/docs/reference/api/vibration/radiation-efficiency.md | Update module reference text to moved panel-transmission path |
| site/src/content/docs/reference/api/noise_control/room-to-room.md | Update module reference text to moved panel-transmission path |
| site/src/content/docs/reference/api/materials/dynamic-stiffness.md | Update module references to new building module paths |
| site/src/content/docs/reference/api/materials/absorption-uncertainty.md | Update module reference to moved uncertainty module |
| site/src/content/docs/reference/api/index.md | Update building module index rows to new taxonomy paths |
| site/src/content/docs/reference/api/building/uncertainty.md | Update page metadata + internal links to new uncertainty path |
| site/src/content/docs/reference/api/building/survey-insulation.md | Update page metadata + module reference |
| site/src/content/docs/reference/api/building/structure-borne-power.md | Update page metadata + module reference |
| site/src/content/docs/reference/api/building/resilient-layers.md | Update page metadata + internal links to new model paths |
| site/src/content/docs/reference/api/building/panel-transmission.md | Update page metadata + module reference |
| site/src/content/docs/reference/api/building/masonry-cavity-wall.md | Update page metadata + module reference |
| site/src/content/docs/reference/api/building/lab-insulation.md | Update page metadata + module reference |
| site/src/content/docs/reference/api/building/intensity-insulation.md | Update page metadata + module reference |
| site/src/content/docs/reference/api/building/insulation.md | Update page metadata + module reference |
| site/src/content/docs/reference/api/building/installed-structure-borne.md | Update page metadata + module reference |
| site/src/content/docs/reference/api/building/heavy-impact.md | Update page metadata + module reference |
| site/src/content/docs/reference/api/building/global-model.md | Update page metadata + internal links to new global-model path |
| site/src/content/docs/reference/api/building/floor-covering-improvement.md | Update page metadata + module reference |
| site/src/content/docs/reference/api/building/flanking-transmission.md | Update page metadata + internal links to new global-model path |
| site/src/content/docs/reference/api/building/facade.md | Update page metadata + internal anchors/links to new facade path |
| site/src/content/docs/reference/api/building/ceiling-plenum.md | Update page metadata + module reference |
| site/src/content/docs/reference/api/building/aperture-transmission.md | Update page metadata + module reference |
| site/src/content/docs/guides/structure-borne-power.mdx | Update API reference link text |
| site/src/content/docs/guides/spanish-building-code.mdx | Update aperture-transmission import and API link |
| site/src/content/docs/guides/resilient-layers.mdx | Update API reference link text |
| site/src/content/docs/guides/panel-sound-insulation.mdx | Update API reference link list |
| site/src/content/docs/guides/insulation-survey.mdx | Update API reference link text |
| site/src/content/docs/guides/insulation-ratings.mdx | Update API reference link text |
| site/src/content/docs/guides/insulation-prediction.mdx | Update API reference link list |
| site/src/content/docs/guides/insulation-lab.mdx | Update API reference link text |
| site/src/content/docs/guides/insulation-intensity.mdx | Update API reference link text |
| site/src/content/docs/guides/insulation-field.mdx | Update API reference link list |
| site/src/content/docs/guides/installed-structure-borne.mdx | Update API reference link text |
| site/src/content/docs/guides/impact-improvement.mdx | Update API reference link text |
| site/src/content/docs/guides/heavy-impact-sources.mdx | Update API reference link text |
| site/src/content/docs/guides/flanking-lab.mdx | Update API reference link list |
| site/src/content/docs/guides/facade-insulation.mdx | Update API reference link list |
| site/src/content/docs/guides/detailed-prediction.mdx | Update API reference link text |
| site/src/content/docs/es/reference/errata.md | Spanish errata: update links/paths to moved modules/tests |
| site/src/content/docs/es/guides/structure-borne-power.mdx | Update Spanish API reference link text |
| site/src/content/docs/es/guides/spanish-building-code.mdx | Update Spanish guide import and API link |
| site/src/content/docs/es/guides/resilient-layers.mdx | Update Spanish API reference link text |
| site/src/content/docs/es/guides/panel-sound-insulation.mdx | Update Spanish API reference link list |
| site/src/content/docs/es/guides/insulation-survey.mdx | Update Spanish API reference link text |
| site/src/content/docs/es/guides/insulation-ratings.mdx | Update Spanish API reference link text |
| site/src/content/docs/es/guides/insulation-prediction.mdx | Update Spanish API reference link list |
| site/src/content/docs/es/guides/insulation-lab.mdx | Update Spanish API reference link text |
| site/src/content/docs/es/guides/insulation-intensity.mdx | Update Spanish API reference link text |
| site/src/content/docs/es/guides/insulation-field.mdx | Update Spanish API reference link list |
| site/src/content/docs/es/guides/installed-structure-borne.mdx | Update Spanish API reference link text |
| site/src/content/docs/es/guides/impact-improvement.mdx | Update Spanish API reference link text |
| site/src/content/docs/es/guides/heavy-impact-sources.mdx | Update Spanish API reference link text |
| site/src/content/docs/es/guides/flanking-lab.mdx | Update Spanish API reference link list |
| site/src/content/docs/es/guides/facade-insulation.mdx | Update Spanish API reference link list |
| site/src/content/docs/es/guides/detailed-prediction.mdx | Update Spanish API reference link text |
| site/public/llms/llms-sound-insulation.txt | Update embedded API reference links |
| site/public/llms/llms-insulation-design.txt | Update embedded API reference links |
| scripts/generate_graphs.py | Update imports for moved building modules |
| scripts/generate_api_docs.py | Update generated-description text to new module path |
| scripts/conformance_report.py | Update imports for moved insulation spectra constants |
| scripts/api_taxonomy.py | Update taxonomy module list + plot ownership map for moved modules |
| README.md | Update building-domain description for new taxonomy |
| README_PYPI.md | Update building-domain description for new taxonomy |
| llms.txt | Update API reference index links for renamed/moved pages |
| docs/spanish-building-code.md | Update aperture-transmission import and API link |
| docs/resilient-layers.md | Update API reference link text |
| docs/panel-sound-insulation.md | Update API reference link list |
| docs/insulation-survey.md | Update API reference link text |
| docs/insulation-ratings.md | Update API reference link text |
| docs/insulation-prediction.md | Update API reference link list |
| docs/insulation-lab.md | Update API reference link text |
| docs/insulation-intensity.md | Update API reference link text |
| docs/insulation-field.md | Update API reference link list |
| docs/impact-improvement.md | Update API reference link text |
| docs/flanking-lab.md | Update API reference link list |
| docs/facade-insulation.md | Update API reference link list |
| docs/ERRATA.md | Update internal links/paths to moved modules/tests |
| docs/detailed-prediction.md | Update API reference link text |
| docs/api-reference.md | Update namespaces + deprecated-path table for new taxonomy |
| CHANGELOG.md | Add changelog entry describing building taxonomy split and renamed modules |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | Deprecated path | Resolves to | Removed in | | ||
| | :--- | :--- | :--- | | ||
| | `phonometry.insulation` | `phonometry.building.insulation` | 4.0 | | ||
| | `phonometry.metrology.levels` | `phonometry.signals.levels` | 5.0 | | ||
| | `phonometry.hearing.sti` | `phonometry.speech.sti` | 5.0 | | ||
| | `phonometry.vibration.human_vibration` | `phonometry.vibration.human.exposure` | 5.0 | | ||
| | `phonometry.environmental` | `phonometry.environment` | 5.0 | | ||
| | `phonometry.building.measurement.insulation` | `phonometry.building.measurement.insulation` | 4.0 | | ||
| | `phonometry.signals.levels` | `phonometry.signals.levels` | 5.0 | | ||
| | `phonometry.speech.sti` | `phonometry.speech.sti` | 5.0 | | ||
| | `phonometry.vibration.human.exposure` | `phonometry.vibration.human.exposure` | 5.0 | | ||
| | `phonometry.environment` | `phonometry.environment` | 5.0 | |
There was a problem hiding this comment.
Correct, and it was the third time a global rename over the documentation flattened that column. It is restored, and the table now has a test that reads each row against the alias tables in _compat.py: the left path must be a live deprecated key and the right one must be what it resolves to and must import. The mutation that caused this fails that test, so the next sweep cannot ship it. Fixed in 8f5cb17.
|
The observation is correct. The diff shows that the "Deprecated path" table in docs/api-reference.md |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #477 +/- ##
==========================================
- Coverage 96.99% 96.99% -0.01%
==========================================
Files 261 264 +3
Lines 38547 38578 +31
==========================================
+ Hits 37390 37419 +29
- Misses 1157 1159 +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 — 47988 tests, 0 failures (✅ all green)
Conformance harness: |
The curated deprecation table lost its left column to a global rename, for the third time on that file: every row said a path resolves to itself, and four of the five rows had nothing to do with this change. It is restored, and it now has a test that reads each row against the alias tables, so a rename that rewrites the deprecated path fails rather than ships. The mutation that caused it fails that test. `dir()` on a package with the compatibility hook replaced the default listing instead of extending it, so the three subgroups this change introduces, and every dunder, disappeared from the very namespace the documentation tells the reader to explore. It extends now, which also fixes the same hole in metrology, hearing and vibration. The duplicate-basename guard was checking basenames in `tests`, which is both too narrow and too broad: pytest also collects from `src`, and a file inside a package imports under its dotted name rather than its basename. It models that rule now, so `phonometry.signals.test_signals` is correctly not a collision while a real one still fails it. Also: the errata page linked to `facade.py` while printing `facade_prediction.py`, `llms-full.txt` had been swept rather than regenerated, and the release note called the two EN 12354 routes editions when they are the single-number and per-band forms of the same calculation.
The module implements what EN 12354 names the simplified single-number model, says so nine times in its own text, and was being called global_model. "Global" came from the CTE's índice global, where it is the right word and where regulation.spain keeps it. The pair now reads simplified and detailed, which is how the standard offers the two routes and how a reader asks for them.
|
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 |
Eleven exception tests built their subject inside the raises block, so the assertion covered the constructor as well as the call under test; the subject is bound first now. Two more asserted two things at once, which reports the wrong half on failure.
|
|
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
Nineteen modules behind one name, and the reader had to know the field to tell them apart. The three subgroups say what the acoustician is doing:
building.measurement: the building that exists. ISO 16283 in the field, ISO 10140 in the laboratory, ISO 10052 for the survey method, ISO 15186 by intensity, ISO 10848 for flanking, the heavy impact sources, the floor-covering improvement, the reception-plate power, and the ISO 717 ratings and ISO 12999 uncertainty that go with all of them.building.prediction: the building that does not exist yet. EN 12354-1 to -5 and the panel theory behind them.building.regulation: the code it has to satisfy. The Spanish CTE DB-HR today, and the shape any other country takes tomorrow.Five modules lose a word their subgroup now says:
building_predictionanddetailed_predictionbecomeprediction.global_modelandprediction.detailed_model, which is what the two EN 12354 editions are;facade_predictionbecomesprediction.facade,building_uncertaintybecomesmeasurement.uncertainty, andspanish_building_codebecomesregulation.spain.Nothing moves in the namespace:
from phonometry import buildingexports the same 251 names, and the nineteen pre-split module paths keep working until 5.0, dotted reads included.A collision worth a gate
Two test files keep their old names on purpose. The suite has no
__init__.py, so pytest imports every test module by its basename:tests/building/regulation/test_spain.pycollided with the environment one andmeasurement/test_uncertainty.pywith the metrology one. The failure only appears when the whole tree is collected at once, which is the last run before a push. The architecture test now checks for duplicate basenames directly, and a mutation proves it fires.This is the first of four PRs splitting what the plan grouped as one step. Each domain is independent, and at this size the automated reviewers stay under their file limits, which the 204-file first split did not.
Validation
No new computation: this moves and renames code. The suite passes (7974 passed, 23 skipped) and the conformance report, the committed figures and the example fiches are byte-for-byte identical to
main.Checklist
ruff check .,mypy src scripts,bandit -r src,pytest -qmake conformance(no diff)make api-docs(the five renamed pages, nothing else)make llms,make pypi-readmecheck_reports.py,check_figures.py(no diff)make snippets[Unreleased]Also run: the site builds clean with the link validator green.