Noise-control performance reports via .report()#331
Conversation
|
Warning Review limit reached
Next review available in: 15 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 Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (19)
📝 WalkthroughWalkthroughAdds one-page, localized PDF performance reports for enclosure, reactive silencer, and HVAC noise-control results, including metadata, verdicts, verbose output, examples, documentation, and PDF validation tests. ChangesNoise-control PDF reports
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant NoiseControlResult
participant ReportRenderer
participant PDFBuilder
Caller->>NoiseControlResult: call report(path, metadata, verbose, language)
NoiseControlResult->>ReportRenderer: delegate result and report options
ReportRenderer->>PDFBuilder: compose and write one-page PDF
PDFBuilder-->>Caller: return written path
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #331 +/- ##
==========================================
- Coverage 96.73% 96.73% -0.01%
==========================================
Files 202 206 +4
Lines 27854 28136 +282
==========================================
+ Hits 26944 27216 +272
- Misses 910 920 +10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Numerical conformance report✅ 410/410 conformance checks pass across 52 domains and 272 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% (6/6)
✅ Room acoustics: 100% (12/12)
✅ Psychoacoustics: 100% (12/12)
✅ Speech transmission (IEC 60268-16): 100% (9/9)
✅ System measurement (Golay / Kirkeby / Mueller-Massarani): 100% (5/5)
✅ Intensity & sound power: 100% (6/6)
✅ Room & building acoustics: 100% (51/51)
✅ 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% (5/5)
✅ 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% (7/7)
✅ 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% (3/3)
✅ 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% (15/15)
✅ 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)
✅ Wind-turbine noise (IEC 61400-11): 100% (3/3)
✅ Porous & multilayer absorbers (Mechel / Bies / Cox & D'Antonio): 100% (10/10)
✅ Program loudness (ITU-R BS.1770 / EBU R 128): 100% (8/8)
✅ 2D FDTD wave simulation (Attenborough & Van Renterghem 2021, Ch. 4): 100% (2/2)
✅ 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% (11/11)
✅ Bending-wave plate-junction transmission (Cremer / Craik / Hopkins): 100% (6/6)
✅ Atmospheric refraction (Salomons rays / GFPE): 100% (3/3)
✅ Electroacoustics: 100% (6/6)
✅ Industrial noise control: 100% (9/9)
Tests & coverage — 31692 tests, 0 failures (✅ all green)
Conformance harness: |
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 `@src/phonometry/_report/_noise_control_fiche.py`:
- Around line 88-103: Update the comparison logic in the report evaluation block
to round the requirement with display_round before comparing it to rounded. Use
the rounded requirement for both higher_is_better and lower-is-better pass
checks, while preserving the existing formatting and verdict behavior.
In `@src/phonometry/_report/enclosure.py`:
- Around line 102-121: Reduce the enclosure table column widths in the visible
table-building function from the current 66.0 mm total to fit within the 64.0 mm
left panel used by render_noise_control_fiche, while preserving the existing
column order and table content.
🪄 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
Run ID: e3beeacd-c35b-46eb-83b9-1f56f1600a15
⛔ Files ignored due to path filters (3)
.github/reports/enclosure_insertion_loss_example.pdfis excluded by!**/*.pdf.github/reports/hvac_duct_noise_example.pdfis excluded by!**/*.pdf.github/reports/reactive_silencer_example.pdfis excluded by!**/*.pdf
📒 Files selected for processing (19)
.github/reports/enclosure_insertion_loss_example.webp.github/reports/hvac_duct_noise_example.webp.github/reports/reactive_silencer_example.webpCHANGELOG.mdscripts/generate_reports.pysite/src/content/docs/reference/api/noise_control/enclosures.mdsite/src/content/docs/reference/api/noise_control/hvac.mdsite/src/content/docs/reference/api/noise_control/silencers.mdsrc/phonometry/_report/_i18n.pysrc/phonometry/_report/_noise_control_fiche.pysrc/phonometry/_report/enclosure.pysrc/phonometry/_report/hvac.pysrc/phonometry/_report/silencer.pysrc/phonometry/noise_control/enclosures.pysrc/phonometry/noise_control/hvac.pysrc/phonometry/noise_control/silencers.pytests/noise_control/test_enclosure_report.pytests/noise_control/test_hvac_report.pytests/noise_control/test_silencer_report.py
Add a one-page PDF .report() fiche to the three noise_control result types, each laid out with a per-band table beside the result's own plot, a boxed single-number performance figure and an optional PASS/FAIL verdict: - EnclosureResult: machine-enclosure insertion loss (Bies, Hansen & Howard, section 7.4.2). The table lists the supplied panel transmission loss R, the interior build-up correction C and the net insertion loss IL = R - C; the boxed figure is the mean insertion loss with the external and internal surface areas. verbose=True adds the interior room constant column. A declared minimum passes when the mean meets it. - ReactiveSilencerResult: reactive-silencer transmission loss (Munjal Eq. (3.27); Bies sections 8.8-8.9). The table lists the transmission loss TL and, when end impedances were given, the insertion loss IL; the boxed figure is the mean transmission loss with the peak and the device kind. A declared minimum passes when the mean meets it. - HvacSpectrumResult: HVAC duct-noise spectrum (Bies Chapter 8; VDI 2081-1). A regenerated-noise spectrum boxes the A-weighted sound power level with the overall total (lower is better); an attenuation spectrum boxes the mean attenuation (more is better). verbose=True adds the A-weighting correction and A-weighted band-level columns. The three renderers share a two-panel skeleton in _report/_noise_control_fiche.py and reuse the sound-power table builder, band labels and header grid. Each accepts an optional metadata header, states its method basis and renders in English or Spanish. Register one committed example per fiche under .github/reports/, add structural and clean-room number-presence tests (EN and ES), and update the CHANGELOG and the regenerated API reference.
Reduce render_noise_control_fiche below the parameter-count threshold by fixing the two-panel split widths internally (the three renderers never overrode them), and lift the HVAC verdict symbol/unit selection out of a nested conditional into an explicit if/elif/else. No change to rendered output; the committed example fiches are unaffected.
Compare the declared requirement at the same one-decimal precision as the measured value in the noise-control verdict, so the printed comparison can never contradict the verdict at the boundary. Also trim the verbose enclosure table columns to sum to the 64 mm left panel width.
b271491 to
2d4739d
Compare
|



Add a one-page PDF
.report()fiche to the threenoise_controlresult types. Each fiche is laid out with a per-band table beside the result's own plot, a boxed single-number performance figure and an optional PASS/FAIL verdict, and renders in English or Spanish.Fiches
EnclosureResult.report(): machine-enclosure insertion loss (Bies, Hansen & Howard, Engineering Noise Control 5th ed., section 7.4.2). The per-band table lists the supplied panel transmission lossR, the interior build-up correctionCand the net insertion lossIL = R - C; the boxed figure is the mean insertion loss over the analysis bands with the external and internal surface areas.verbose=Trueadds the interior room constantR_icolumn. A declared minimum via the metadatarequirementpasses when the mean insertion loss meets it (more is better).ReactiveSilencerResult.report(): reactive-silencer transmission loss by the four-pole method (Munjal, Acoustics of Ducts and Mufflers 2nd ed., Eq. (3.27); Bies sections 8.8-8.9). The per-band table lists the transmission lossTLand, when end impedances were supplied, the insertion lossIL; the boxed figure is the mean transmission loss with the peak and the device kind. A declared minimum passes when the mean transmission loss meets it (more is better).HvacSpectrumResult.report(): HVAC duct-noise spectrum (Bies Chapter 8; VDI 2081-1). A regenerated-noise spectrum boxes the A-weighted sound power levelL_WA(dB(A) re 1 pW) with the overall unweighted total and passes a declared limit at or below it (lower is better); an attenuation spectrum boxes the mean attenuation and passes a declared minimum at or above it (more is better).verbose=Trueadds the A-weighting correction and A-weighted band-level columns for a regenerated-noise spectrum.Implementation
The three renderers share a two-panel skeleton in
src/phonometry/_report/_noise_control_fiche.pyand reuse the sound-power per-band table builder, nominal band labels and source/environment header grid, keeping the renderers to their genuinely specific parts (basis line, table columns, boxed figure, verdict direction). Domain imports in the render leaves stay underTYPE_CHECKINGor lazy.Examples and tests
.github/reports/(PDF + WebP), registered inscripts/generate_reports.py.Regenerated the affected API reference pages; the CHANGELOG records the addition under Unreleased.
Summary by CodeRabbit