Skip to content

Every verdict is spelled passes, refuses to stand in for a bool, and comes from a function whose verb says what it judges - #977

Merged
jmrplens merged 1 commit into
fix/one-vocabulary-per-choicefrom
fix/verdicts-spell-passes-and-refuse-truth
Oct 21, 2026
Merged

jmrplens merged 1 commit into
fix/one-vocabulary-per-choicefrom
fix/verdicts-spell-passes-and-refuse-truth

Conversation

@jmrplens

@jmrplens jmrplens commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

What changes for you

A pass or a fail is spelled passes on every verdict of the library. DBHRCheck, DBHRAssessment, ActivityAssessment, PeriodAssessment, PeopleAssessment and RailwayChange said complies, MountingCheck said acceptable, CeilingSpecimenCheck, BackgroundMarginCheck, SourcePositionCheck and the prediction detail check said satisfied, BandFlatnessCheck said all_satisfied, and the enclosure test environment said applicable; all of them now say passes. The per-octave mask of BandFlatnessCheck is within_limit, named like the per-band within_tolerance of the instrument verifications. A flag that is not a pass or a fail keeps its own name with its reason: within_guideline, because DIN 4150-3 5.1 does not call exceeding a guideline value a failure, significant, a reason to investigate, and qualified.

A verdict no longer stands in for a bool. A record a verify_, assess_ or check_ function returns, and every record with a passes, raises TypeError on if verdict: and the message names the attribute to read. Before, a dataclass was always true, so if result: passed every failure: QuasiPeakDynamicsResult, AircraftSystemComplianceResult, WeightingVerification, PhaseVerification, SignalBurstVerification and VibrationMeterVerification (read .passes), FilterComplianceResult, WeightingComplianceResult and IntensityInstrumentComplianceResult (read .overall_class), DamageAssessment and AssessmentVelocity (read .within_guideline), PrecisionCriteria (read .qualified), TonalAssessmentResult (read .adjustment), ToneAudibilityResult (read .decisive_audibility) and BackgroundNoiseAssessment (read .category).

A judgement carries its verb and returns a record that keeps its reasons. vibration.assess_operational_change holds the change and the zone B limit and reads the threshold and significant from them. materials.check_limp_frame returns a LimpFrameCheck with the ratio, the threshold and passes. room.assess_perceptible_difference returns a PerceptibleDifference with the just-noticeable difference and different. noise_control.check_enclosure_test_environment returns an EnclosureTestEnvironmentCheck, so no public name starts with test and pytest no longer collects one from a user's test module; a room ISO 11546-2 sets no K2 limit for still passes with required_area_ratio at None. environment.check_short_distance returns a ShortDistanceCheck that holds the five lengths and reads the three ratios of ISO 10847 6.3.1 and the before and after answers from them. room.check_prediction_detail returns a PredictionDetailCheck. building.assess_requirement_conformity returns a RequirementConformity with the settled margin_db and a strict passes, as ISO 12999-1 Formulae (4) and (5) print it. building.check_strong_coupling returns a StrongCouplingCheck with holds per band, the threshold_db and passes over every band, and its documentation now asks for the one-way Dv,ij the formula compares, not the direction average: the threshold changes when the two elements swap. environment.assess_tonal_survey returns a TonalSurveyAssessment with the prominent bands, the level differences they are read from and a .plot(). vibration.verify_rigid_mass_calibration judges a measuring chain, so its verb is verify_. hearing.FixtureIsolationVerification is the record verify_fixture_isolation returns. FieldIndicators.check_field_stationarity() returns a FieldStationarityCheck with stationary band by band and passes over them, read against the 0.6 of ISO 9614-1 Table B.3.

materials.check_base_plate_scattering returns a BasePlateScatteringCheck instead of a tuple of the bands over the limit. It holds the eighteen bands of ISO 17497-1 Table 1 and the measured coefficients, read-only, and reads the limits, the settled margins, the strict exceeds per band, the exceeded_frequencies and passes from them. Its .plot() draws the coefficients against the stepped limit, on an axis labelled with the full-scale f/N the table is keyed to, with the bands over the limit ringed, and the diffuser guide shows it. The guide's citation of Clause 6.4 for the base plate limits is Clause 6.2.

The three background corrections that returned a value and a flag return a small record each: building.background_corrected_level a BackgroundCorrectedLevel (corrected_levels, limited and margins_db, also for a positions by bands array), emission.background_noise_correction_at_workstation a WorkstationBackgroundCorrection (correction and upper_bound, read from the margin and the grade) and noise_control.extraneous_corrected_mean_level an ExtraneousCorrectionResult (the corrected level, the margin of the two energy means and capped). Each reads its limits from its own module and warns as before.

What breaks

Every rename is a hard break with no alias; the migration guide (docs/start/upgrading.md and both site copies) has a new section, "A verdict says passes, refuses a truth value, and comes from a verb", with a row for each name that shipped in 3.3.0 or 4.0.0rc1, and the CHANGELOG lists the rest.

  • .complies on DbHrCheck, DbHrAssessment (now DBHRCheck, DBHRAssessment), ActivityAssessment and PeriodAssessment: read .passes.
  • if result: on any verdict raises TypeError: read the attribute the message names.
  • vibration.is_significant_change(change, zone_b_upper) is vibration.assess_operational_change(change, zone_b_upper).significant.
  • materials.limp_frame_applicable(k_c, criterion=...) is materials.check_limp_frame(k_c, criterion=...).passes. A modulus ratio exactly on the threshold no longer passes: Allard & Atalla print both criteria as strict inequalities (|Kc/Kf| < 0.05 and < 0.2).
  • fi.field_is_stationary(limit=...) is fi.check_field_stationarity().passes, and band by band its .stationary; the limit is the 0.6 of Table B.3, read as .limit, and no longer an argument.
  • room.perceptibly_different(symbol, first, second) is room.assess_perceptible_difference(symbol, first, second).different, and two values of different shapes raise ValueError instead of broadcasting.
  • materials.check_base_plate_scattering(s) == () is materials.check_base_plate_scattering(s).passes, with the bands over the limit in .exceeded_frequencies. A coefficient that is not finite raises ValueError, where a NaN used to pass.
  • corrected, limited = building.background_corrected_level(lp, lb) is result.corrected_levels and result.limited; k1, held = emission.background_noise_correction_at_workstation(lp, lb) is result.correction and result.upper_bound.
  • rigid_mass_calibration_check, satisfies_lower_requirement, satisfies_upper_requirement, strong_coupling_satisfied and tonal_seeking_survey were exported by the 3.3.0 top level and are gone: vibration.verify_rigid_mass_calibration, building.assess_requirement_conformity(..., bound="minimum"|"maximum").passes, building.check_strong_coupling(...).holds and environment.assess_tonal_survey(...).prominent. The counts at the top of the migration guide are re-measured: seventy-four of the 885 names the 3.3.0 top level exported are gone.
  • The names that only existed after 4.0.0rc1 (noise_control.test_environment_applicability, room.detail_is_sufficient, environment.is_short_distance, hearing.FixtureIsolationCheck and the flags satisfied, all_satisfied, acceptable and applicable) are recorded in the CHANGELOG.

How it was verified

Every threshold a new record reads was checked on the printed page, not from memory: ISO 12999-1:2020 Formulae (4) and (5) (PDF page 17, folio 11), both strict; ISO 10847:1997 6.3.1 (PDF page 10, folio 6), strict at 0,1, and 8.1.4 (PDF page 14, folio 10), where 250 m is only the distance past which more than three repetitions may be needed, which the API table now says; ISO 17497-1:2004+A1:2014 6.2 and Table 1 (PDF page 13, folio 5), keyed by f/N; ISO 10848-1:2017 Formula (4) (PDF page 15, folio 9) and BS EN ISO 10848-1:2006 Formula (15) (PDF page 15, folio 7), which print the one-way Dv,ij while Formula (14) on the same page prints the direction average; Allard & Atalla, Propagation of Sound in Porous Media 2e, PDF pages 259 and 260 (printed 253 and 254), which print |Kc/Kf| < 0.05, < 0.2 and "lower than 20 kPa"; and BS EN ISO 11820:1997 Equations (17) and (18) (PDF pages 18 and 19, folios 10 and 11), whose corrected mean L_p1 / L_pI the extraneous correction now names apart from the measured mean of Equation (2) its margin is read from.

New tests pin each record at its edges: the strong-coupling threshold for unlike elements (a ratio of 2 gives 3 - 10 lg 2 dB, one band either side of it fails the verdict, and swapping the elements gives 3 + 10 lg 2 dB); a geometry that is short both before and after the barrier (ratios 0,2 and 0,5) and one with unequal sides; the workstation background at exactly the 6 dB and 3 dB floor of each grade, on decimal pairs that land either side in binary, which hold nothing and do not warn; the limp-frame ratio exactly on each printed threshold, which does not pass, and a millionth inside it, which does; every refusal of BasePlateScatteringCheck (rank, length, a band set other than Table 1's, NaN and infinities) and of RequirementConformity, ExtraneousCorrectionResult, PerceptibleDifference and FieldStationarityCheck; and the derived values of the records (OperationalChange.threshold of 1,125 mm/s for a 4,5 mm/s zone B, the 10 dB extraneous margin, the per-position margins_db, the limp-frame ratio and threshold). The base plate figure was drawn again in both languages and both themes and passes the figure checks. The conformance report keeps its numbers (1893 of 1893 checks), with the ISO 10847 row now also asking for a geometry that is short.

Gates on this branch: ruff check . and ruff format --check . clean, mypy src scripts with no issues in 700 files, bandit -q -r src clean, every scripts/check_*.py that reads the tree green (the clip anim_epnl_flyover is stale for a reason outside this change), the API reference covering all 3073 public names, and the full suite green (28880 passed, 69 skipped). The documentation snippets run clean (7545 blocks over 731 pages), and the site installs from its lockfile, type-checks, builds and passes html-validate.

The guard

tests/test_verdict_shape.py reads the whole public API, the public methods of every published class included, and holds four rules: no public name reads as a test; a function or a method that answers with a bool, a tuple of them, a boolean array or a verdict carries verify_, assess_ or check_, and each of those returns a record; every verdict a judging verb returns, and every record with a scalar passes, has a __bool__ that raises TypeError, checked in the source and then on real instances; and no verdict spells its overall flag complies, satisfied, all_satisfied, acceptable or applicable. The two regime predicates (low_frequency_procedure_applies, resolve_tones_separately) and the methods that test membership or provenance, look up one requirement of a verdict by its clause, or say how a value is reported are keyed by location with their reason. CONTRIBUTING states the rule.

Red on the base of this branch (65 failed, 70 passed), excerpts:

E   AssertionError: pytest collects these from a user's test module; name them for what they answer:
      phonometry.noise_control.TestEnvironmentApplicability
      phonometry.noise_control.test_environment_applicability
E   AssertionError: a public function that answers pass or fail is named verify_, assess_ or check_ and returns a record:
      phonometry.building.background_corrected_level: documents a boolean return
      phonometry.building.satisfies_lower_requirement: returns a bool
      phonometry.building.satisfies_upper_requirement: returns a bool
      phonometry.building.strong_coupling_satisfied: documents a boolean return
      phonometry.emission.background_noise_correction_at_workstation: returns tuple[float | NDArray[numpy.float64], bool]
      phonometry.environment.is_short_distance: returns tuple[bool, bool]
      phonometry.environment.tonal_seeking_survey: documents a boolean return
      phonometry.materials.limp_frame_applicable: returns a bool
      phonometry.noise_control.extraneous_corrected_mean_level: returns tuple[float, bool]
      phonometry.noise_control.test_environment_applicability: returns the verdict TestEnvironmentApplicability
      phonometry.room.detail_is_sufficient: returns the verdict DetailVerdict
      phonometry.room.perceptibly_different: returns a bool
      phonometry.vibration.is_significant_change: returns a bool
      phonometry.vibration.rigid_mass_calibration_check: returns the verdict RigidMassCalibrationResult
E   AssertionError: a judgement carries its reasons: a record, or None for a warning only:
      phonometry.materials.check_base_plate_scattering -> tuple[int, ...]
E   AssertionError: a public method that answers pass or fail is named verify_, assess_ or check_ and returns a record; a predicate that judges nothing is argued in PREDICATE_METHODS:
      phonometry.emission.intensity.FieldIndicators.field_is_stationary: returns a bool
E   AssertionError: these have no __bool__ that raises TypeError, so `if result:` is always true:
      phonometry.aircraft.measurement_system.AircraftSystemComplianceResult
      phonometry.broadcast.quasi_peak.QuasiPeakDynamicsResult
      phonometry.building.regulation.spain.DBHRAssessment
      phonometry.building.regulation.spain.DBHRCheck
      phonometry.electroacoustics.induction_loop.BackgroundNoiseAssessment
      phonometry.emission.intensity_compliance.IntensityInstrumentComplianceResult
      phonometry.environment.assessment.measurement.TonalAssessmentResult
      phonometry.environment.assessment.spain.ActivityAssessment
      phonometry.filters.compliance.FilterComplianceResult
      phonometry.filters.weighting_compliance.WeightingComplianceResult
      phonometry.materials.absorbers.suspended_ceilings.CeilingSpecimenCheck
      phonometry.noise_control._cabin_insulation.BandFlatnessCheck
      phonometry.noise_control._cabin_insulation.SourcePositionCheck
      phonometry.psychoacoustics.quality._tone_audibility.ToneAudibilityResult
      phonometry.room.spatial_decay.BackgroundMarginCheck
      phonometry.vibration.human.instrumentation.PhaseVerification
      phonometry.vibration.human.instrumentation.WeightingVerification
      phonometry.vibration.human.signal_burst.SignalBurstVerification
      phonometry.vibration.immission.coupling.MountingCheck
      phonometry.vibration.immission.people.PeopleAssessment
      phonometry.vibration.immission.train_categories.RailwayChange
      phonometry.vibration.immission.vibration_meter.AssessmentVelocity
      phonometry.vibration.immission.vibration_meter.VibrationMeterVerification
      phonometry.vibration.structural.building_damage.DamageAssessment
E   AssertionError: the pass/fail of a verdict is `passes`; a flag that is not one is argued in KEPT_FLAGS:
      phonometry.building.regulation.spain.DBHRAssessment.complies
      phonometry.building.regulation.spain.DBHRCheck.complies
      phonometry.environment.assessment.spain.ActivityAssessment.complies
      phonometry.environment.assessment.spain.PeriodAssessment.complies
      phonometry.materials.absorbers.suspended_ceilings.CeilingSpecimenCheck.satisfied
      phonometry.noise_control._cabin_insulation.BandFlatnessCheck.all_satisfied
      phonometry.noise_control._cabin_insulation.BandFlatnessCheck.satisfied
      phonometry.noise_control._cabin_insulation.SourcePositionCheck.satisfied
      phonometry.noise_control.enclosure_insulation.TestEnvironmentApplicability.applicable
      phonometry.room.spatial_decay.BackgroundMarginCheck.satisfied
      phonometry.room.workroom_prediction.DetailVerdict.satisfied
      phonometry.vibration.immission.coupling.MountingCheck.acceptable
      phonometry.vibration.immission.people.PeopleAssessment.complies
      phonometry.vibration.immission.train_categories.RailwayChange.complies

plus 24 failures of bool() on a bare instance of each verdict class and 33 on real verdicts built through the public calls, each of which either did not raise (Failed: DID NOT RAISE TypeError) or had no judging verb to be built with yet. Green on this branch: 147 passed in tests/test_verdict_shape.py.

@sourcery-ai

sourcery-ai Bot commented Oct 17, 2026

Copy link
Copy Markdown

Sorry @jmrplens, your pull request is larger than the review limit of 150,000 diff characters

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 227 files, which is 127 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

⚙️ Run configuration
  • Configuration used: Repository: jmrplens/phonometry/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f23a8949-7709-4c74-97c5-7a12e294fbaa
📥 Commits

Reviewing files that changed from the base of the PR and between 286b816 and b2cc946.

⛔ Files ignored due to path filters: 4
  • .github/images/base_plate_scattering.svg is excluded by !**/*.svg
  • .github/images/base_plate_scattering_dark.svg is excluded by !**/*.svg
  • .github/images/base_plate_scattering_es.svg is excluded by !**/*.svg
  • .github/images/base_plate_scattering_es_dark.svg is excluded by !**/*.svg
📒 Files selected for processing: 227
  • CHANGELOG.md
  • CONTRIBUTING.md
  • docs/CONFORMANCE.md
  • docs/ERRATA.es.md
  • docs/ERRATA.md
  • docs/buildings/insulation/flanking-lab.md
  • docs/buildings/insulation/insulation-field.md
  • docs/buildings/insulation/spanish-building-code.md
  • docs/buildings/rooms/reporting-and-qualification.md
  • docs/buildings/rooms/workroom-sound-decay.md
  • docs/conformance.json
  • docs/devices/emission/intensity.md
  • docs/devices/emission/workstation-emission.md
  • docs/devices/noise-control/enclosure-cabin-insulation.md
  • docs/devices/noise-control/in-situ-noise-control.md
  • docs/environment/assessment/environmental-levels.md
  • docs/environment/assessment/spanish-noise-regulation.md
  • docs/materials/absorbers/porous-absorbers.md
  • docs/materials/absorbers/suspended-ceilings.md
  • docs/materials/diffusers/diffusers.md
  • docs/reference/api/index.md
  • docs/start/index.md
  • docs/start/upgrading.md
  • docs/vibration/immission/people-in-buildings.md
  • docs/vibration/immission/railway-categories.md
  • docs/vibration/immission/railway-prediction.md
  • docs/vibration/immission/vibration-meter.md
  • docs/vibration/machinery/machine-vibration-evaluation.md
  • docs/vibration/structural/impact-mobility.md
  • docs/vibration/structural/mechanical-mobility.md
  • llms-full.txt
  • scripts/check_identifier_spelling.py
  • scripts/conformance/domains/absorbers.py
  • scripts/conformance/domains/building.py
  • scripts/conformance/domains/enclosure_cabin_insulation.py
  • scripts/conformance/domains/in_situ_measurement.py
  • scripts/conformance/domains/intensity.py
  • scripts/conformance/domains/levels.py
  • scripts/conformance/domains/machine_vibration.py
  • scripts/conformance/domains/suspended_ceilings.py
  • scripts/conformance/domains/workroom_acoustics.py
  • scripts/figures/environment.py
  • scripts/figures/materials.py
  • scripts/figures/registry.py
  • scripts/figures/vibration.py
  • scripts/generate_graphs.py
  • site/public/llms/llms-buildings-insulation-laboratory.txt
  • site/public/llms/llms-buildings-insulation-ratings.txt
  • site/public/llms/llms-buildings-insulation.txt
  • site/public/llms/llms-buildings-rooms-auditorium.txt
  • site/public/llms/llms-buildings-rooms.txt
  • site/public/llms/llms-devices-emission-intensity.txt
  • site/public/llms/llms-devices-emission.txt
  • site/public/llms/llms-devices-noise-control-measured.txt
  • site/public/llms/llms-environment-assessment.txt
  • site/public/llms/llms-materials-absorbers.txt
  • site/public/llms/llms-materials-diffusers.txt
  • site/public/llms/llms-start.txt
  • site/public/llms/llms-vibration-immission.txt
  • site/public/llms/llms-vibration-machinery.txt
  • site/public/llms/llms-vibration-structural.txt
  • site/src/content/docs/buildings/insulation/flanking-lab.mdx
  • site/src/content/docs/buildings/insulation/insulation-field.mdx
  • site/src/content/docs/buildings/insulation/spanish-building-code.mdx
  • site/src/content/docs/buildings/rooms/reporting-and-qualification.mdx
  • site/src/content/docs/buildings/rooms/workroom-sound-decay.mdx
  • site/src/content/docs/devices/emission/intensity.mdx
  • site/src/content/docs/devices/emission/workstation-emission.mdx
  • site/src/content/docs/devices/noise-control/enclosure-cabin-insulation.mdx
  • site/src/content/docs/devices/noise-control/in-situ-noise-control.mdx
  • site/src/content/docs/environment/assessment/environmental-levels.mdx
  • site/src/content/docs/environment/assessment/spanish-noise-regulation.mdx
  • site/src/content/docs/es/buildings/insulation/flanking-lab.mdx
  • site/src/content/docs/es/buildings/insulation/insulation-field.mdx
  • site/src/content/docs/es/buildings/insulation/spanish-building-code.mdx
  • site/src/content/docs/es/buildings/rooms/reporting-and-qualification.mdx
  • site/src/content/docs/es/buildings/rooms/workroom-sound-decay.mdx
  • site/src/content/docs/es/devices/emission/intensity.mdx
  • site/src/content/docs/es/devices/emission/workstation-emission.mdx
  • site/src/content/docs/es/devices/noise-control/enclosure-cabin-insulation.mdx
  • site/src/content/docs/es/devices/noise-control/in-situ-noise-control.mdx
  • site/src/content/docs/es/environment/assessment/environmental-levels.mdx
  • site/src/content/docs/es/environment/assessment/spanish-noise-regulation.mdx
  • site/src/content/docs/es/materials/absorbers/porous-absorbers.mdx
  • site/src/content/docs/es/materials/absorbers/suspended-ceilings.mdx
  • site/src/content/docs/es/materials/diffusers/diffusers.mdx
  • site/src/content/docs/es/reference/errata.md
  • site/src/content/docs/es/start/index.md
  • site/src/content/docs/es/start/upgrading.mdx
  • site/src/content/docs/es/vibration/immission/people-in-buildings.mdx
  • site/src/content/docs/es/vibration/immission/railway-categories.mdx
  • site/src/content/docs/es/vibration/immission/railway-prediction.mdx
  • site/src/content/docs/es/vibration/immission/vibration-meter.mdx
  • site/src/content/docs/es/vibration/machinery/machine-vibration-evaluation.mdx
  • site/src/content/docs/es/vibration/structural/impact-mobility.mdx
  • site/src/content/docs/es/vibration/structural/mechanical-mobility.mdx
  • site/src/content/docs/materials/absorbers/porous-absorbers.mdx
  • site/src/content/docs/materials/absorbers/suspended-ceilings.mdx
  • site/src/content/docs/materials/diffusers/diffusers.mdx
  • site/src/content/docs/reference/api/building/flanking-transmission.md
  • site/src/content/docs/reference/api/building/floor-covering-improvement.md
  • site/src/content/docs/reference/api/building/spain.md
  • site/src/content/docs/reference/api/building/uncertainty.md
  • site/src/content/docs/reference/api/environment/barrier-in-situ.md
  • site/src/content/docs/reference/api/environment/measurement.md
  • site/src/content/docs/reference/api/environment/spain.md
  • site/src/content/docs/reference/api/hearing/earmuff-insertion-loss.md
  • site/src/content/docs/reference/api/materials/biot.md
  • site/src/content/docs/reference/api/materials/porous.md
  • site/src/content/docs/reference/api/materials/reverberation-room-scattering.md
  • site/src/content/docs/reference/api/materials/suspended-ceilings.md
  • site/src/content/docs/reference/api/noise_control/cabin-insulation.md
  • site/src/content/docs/reference/api/noise_control/enclosure-insulation.md
  • site/src/content/docs/reference/api/noise_control/silencer-in-situ.md
  • site/src/content/docs/reference/api/power/intensity.md
  • site/src/content/docs/reference/api/power/workstation.md
  • site/src/content/docs/reference/api/rooms/auditorium.md
  • site/src/content/docs/reference/api/rooms/spatial-decay.md
  • site/src/content/docs/reference/api/rooms/workroom-prediction.md
  • site/src/content/docs/reference/api/vibration/coupling.md
  • site/src/content/docs/reference/api/vibration/evaluation.md
  • site/src/content/docs/reference/api/vibration/impact-mobility.md
  • site/src/content/docs/reference/api/vibration/mechanical-mobility.md
  • site/src/content/docs/reference/api/vibration/people.md
  • site/src/content/docs/reference/api/vibration/train-categories.md
  • site/src/content/docs/reference/errata.md
  • site/src/content/docs/start/index.md
  • site/src/content/docs/start/upgrading.mdx
  • site/src/content/docs/vibration/immission/people-in-buildings.mdx
  • site/src/content/docs/vibration/immission/railway-categories.mdx
  • site/src/content/docs/vibration/immission/railway-prediction.mdx
  • site/src/content/docs/vibration/immission/vibration-meter.mdx
  • site/src/content/docs/vibration/machinery/machine-vibration-evaluation.mdx
  • site/src/content/docs/vibration/structural/impact-mobility.mdx
  • site/src/content/docs/vibration/structural/mechanical-mobility.mdx
  • src/phonometry/_plot/audiometry.py
  • src/phonometry/_plot/building.py
  • src/phonometry/_plot/environment.py
  • src/phonometry/_plot/materials.py
  • src/phonometry/_plot/vibration.py
  • src/phonometry/_report/rd1367.py
  • src/phonometry/aircraft/measurement_system.py
  • src/phonometry/broadcast/quasi_peak.py
  • src/phonometry/building/__init__.py
  • src/phonometry/building/measurement/__init__.py
  • src/phonometry/building/measurement/flanking_transmission.py
  • src/phonometry/building/measurement/floor_covering_improvement.py
  • src/phonometry/building/measurement/uncertainty.py
  • src/phonometry/building/regulation/spain.py
  • src/phonometry/electroacoustics/induction_loop.py
  • src/phonometry/emission/__init__.py
  • src/phonometry/emission/_sound_power_intensity.py
  • src/phonometry/emission/intensity.py
  • src/phonometry/emission/intensity_compliance.py
  • src/phonometry/emission/workstation.py
  • src/phonometry/environment/__init__.py
  • src/phonometry/environment/assessment/__init__.py
  • src/phonometry/environment/assessment/measurement.py
  • src/phonometry/environment/assessment/spain.py
  • src/phonometry/environment/propagation/__init__.py
  • src/phonometry/environment/propagation/barrier_in_situ.py
  • src/phonometry/filters/compliance.py
  • src/phonometry/filters/weighting_compliance.py
  • src/phonometry/hearing/__init__.py
  • src/phonometry/hearing/_earmuff_insertion_loss.py
  • src/phonometry/materials/__init__.py
  • src/phonometry/materials/absorbers/__init__.py
  • src/phonometry/materials/absorbers/biot.py
  • src/phonometry/materials/absorbers/porous.py
  • src/phonometry/materials/absorbers/suspended_ceilings.py
  • src/phonometry/materials/diffusers/__init__.py
  • src/phonometry/materials/diffusers/reverberation_room_scattering.py
  • src/phonometry/noise_control/__init__.py
  • src/phonometry/noise_control/_cabin_insulation.py
  • src/phonometry/noise_control/enclosure_insulation.py
  • src/phonometry/noise_control/silencer_in_situ.py
  • src/phonometry/psychoacoustics/quality/_tone_audibility.py
  • src/phonometry/room/__init__.py
  • src/phonometry/room/auditorium.py
  • src/phonometry/room/spatial_decay.py
  • src/phonometry/room/workroom_prediction.py
  • src/phonometry/vibration/__init__.py
  • src/phonometry/vibration/human/instrumentation.py
  • src/phonometry/vibration/human/signal_burst.py
  • src/phonometry/vibration/immission/coupling.py
  • src/phonometry/vibration/immission/people.py
  • src/phonometry/vibration/immission/train_categories.py
  • src/phonometry/vibration/immission/vibration_meter.py
  • src/phonometry/vibration/machinery/__init__.py
  • src/phonometry/vibration/machinery/evaluation.py
  • src/phonometry/vibration/structural/__init__.py
  • src/phonometry/vibration/structural/_impact_mobility.py
  • src/phonometry/vibration/structural/building_damage.py
  • src/phonometry/vibration/structural/mechanical_mobility.py
  • tests/building/measurement/test_building_uncertainty.py
  • tests/building/measurement/test_flanking_transmission.py
  • tests/building/measurement/test_floor_covering_improvement.py
  • tests/building/regulation/test_spanish_building_code.py
  • tests/emission/test_intensity.py
  • tests/emission/test_workstation.py
  • tests/environment/assessment/test_measurement.py
  • tests/environment/assessment/test_spain.py
  • tests/environment/test_barrier_in_situ.py
  • tests/materials/absorbers/test_limp_frame.py
  • tests/materials/diffusers/test_scattering_diffusion.py
  • tests/materials/test_suspended_ceilings.py
  • tests/noise_control/test_cabin_insulation.py
  • tests/noise_control/test_enclosure_insulation.py
  • tests/noise_control/test_silencer_in_situ.py
  • tests/room/test_auditorium_reporting.py
  • tests/room/test_spatial_decay.py
  • tests/room/test_workroom_prediction.py
  • tests/test_boundary_verdicts.py
  • tests/test_check_boundary_comparisons.py
  • tests/test_printed_limits.py
  • tests/test_scalar_guards.py
  • tests/test_verdict_shape.py
  • tests/vibration/human/test_signal_burst.py
  • tests/vibration/immission/test_coupling.py
  • tests/vibration/immission/test_people.py
  • tests/vibration/immission/test_railway_prediction.py
  • tests/vibration/immission/test_train_categories.py
  • tests/vibration/machinery/test_industrial_zones.py
  • tests/vibration/structural/test_impact_mobility.py
  • tests/vibration/structural/test_mechanical_mobility.py
  • tests/vibration/test_vibration_frequency_axis_language.py
  • tests/vibration/test_vibration_plot_i18n.py

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Review on demand using usage pricing
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jmrplens
jmrplens added this pull request to stack #984 October 17, 2026 17:11
@jmrplens jmrplens changed the title fix/verdicts spell passes and refuse truth Every verdict is spelled passes, refuses to stand in for a bool, and comes from a function whose verb says what it judges Oct 17, 2026
@github-actions github-actions Bot added documentation Improvements or additions to documentation conformance Standard clause coverage, reference values or errata errata Confirmed defect in a published standard, tracked in docs/ERRATA.md api Public API surface, naming and deprecations figures Generated plots, diagrams and animations reports Accredited-format .report() fiches and their rendering site Documentation website i18n English and Spanish translations area: aircraft Aircraft and rotorcraft noise area: broadcast Programme loudness and broadcast levels area: building Sound insulation and building acoustics area: electroacoustics Transducers, arrays and electroacoustic devices area: emission Sound power and source emission area: environment Outdoor propagation, environmental sources and noise assessment area: hearing Audiometric thresholds, hearing loss and noise exposure area: materials Absorption, impedance and material properties area: noise control Silencers, barriers and noise control treatments area: psychoacoustics Loudness, sharpness, roughness and annoyance area: room Room acoustics and reverberation area: vibration Human vibration and structure-borne sound area: core Shared internals and cross-cutting code every domain depends on area: filters Octave filter banks, weightings and instrument class verification labels Oct 17, 2026
@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.06716% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.90%. Comparing base (286b816) to head (b2cc946).

Files with missing lines Patch % Lines
src/phonometry/emission/_sound_power_intensity.py 33.33% 2 Missing ⚠️
src/phonometry/_plot/building.py 0.00% 1 Missing ⚠️
src/phonometry/_plot/environment.py 96.15% 1 Missing ⚠️
src/phonometry/hearing/_earmuff_insertion_loss.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@                        Coverage Diff                        @@
##           fix/one-vocabulary-per-choice     #977      +/-   ##
=================================================================
+ Coverage                          96.88%   96.90%   +0.01%     
=================================================================
  Files                                445      445              
  Lines                              89986    90395     +409     
=================================================================
+ Hits                               87185    87594     +409     
  Misses                              2801     2801              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Numerical conformance

All 1893 conformance checks pass, across 111 domains and 523 standards

1893/1893 checks pass across 111 domains and 523 standards (227 normative designations, 125 further published sources).

Used in the tables below is how much of that clause's published tolerance the deviation consumes: 100 % sits exactly on the limit, 5 % uses a twentieth of the allowance, and a dash means the clause states no two-sided tolerance for the quantity, so there is no budget to spend. It is reported and never used to decide a verdict, which is settled at full precision before any rounding.

Renamed (4)

Standard Base quantity Head quantity
ISO 8297:1994 Table 2 Background correction at differences of 6 to 10 dB and at 12 dB, read through plant_background_correction_db Background correction at differences of 6 to 10 dB and at 12 dB, read through plant_background_correction
Wenz wind noise (rule of fives) Wind spectrum level at 1 kHz, 5 kn (canonical anchor), dB re 1 µPa²/Hz Wind spectrum level at 1 kHz, 5 kt (canonical anchor), dB re 1 µPa²/Hz
JOMOPANS-ECHO ship source level Bulker V=13.5 kn L=211 m band level at 1 kHz (File S1 oracle), dB re 1 µPa m Bulker V=13.5 kt L=211 m band level at 1 kHz (File S1 oracle), dB re 1 µPa m
ISO 10847:1997 6.3.1 The short-distance ratio is strict at 0,1, and the after case needs both of its two inequalities The short-distance ratio is strict at 0,1, the after case needs both of its two inequalities, and a geometry past 0,1 on every ratio is short

Closest to their published limit (top 5)

The rows with the least room left, so the ones a change is most likely to push over.

Standard Quantity Deviation Used
ISO/TR 17534-3:2015 Table 3 Ground-projected path length dp, m 0.005 m 100 %
DIN 4150-2:1999-06 Annex C, Example 5 KB_FTr with hammer b) in the rest hours, Formula (5) -0.005 100 %
DIN 4150-2:1999-06 Annex C, Example 8 KB_FTm over the record with the passage maxima alone -0.0005 100 %
E DIN 4150-2:2023-08 Annex B, Table B.1 KB_FTm,Zug of the metro north by Formula (5) -0.0005 100 %
Jarvis (1996) NPL CIRA(EXT) 010 Appendix B, folio 26 Volume of the coupler of the example, v = pi r^2 L -0.00000000005 m³ 100 %

Pass Tests & coverage: 260541 tests, 0 failures (all green)
Python Version Tests Failures Coverage Status
macos-latest-3.12 28949 0 96.9% Pass Passed
macos-latest-3.13 28949 0 96.9% Pass Passed
macos-latest-3.14 28949 0 96.9% Pass Passed
ubuntu-latest-3.12 28949 0 96.9% Pass Passed
ubuntu-latest-3.13 28949 0 96.9% Pass Passed
ubuntu-latest-3.14 28949 0 96.9% Pass Passed
windows-latest-3.12 28949 0 96.9% Pass Passed
windows-latest-3.13 28949 0 96.9% Pass Passed
windows-latest-3.14 28949 0 96.9% Pass Passed

Full report at this commit: docs/CONFORMANCE.md · docs/conformance.json · full CI artifacts

…d comes from a function whose verb says what it judges

A pass or a fail is spelled `passes` on every verdict of the library. `DBHRCheck`, `DBHRAssessment`, `ActivityAssessment`, `PeriodAssessment`, `PeopleAssessment` and `RailwayChange` said `complies`, `MountingCheck` said `acceptable`, `CeilingSpecimenCheck`, `BackgroundMarginCheck`, `SourcePositionCheck` and the prediction detail check said `satisfied`, `BandFlatnessCheck` said `all_satisfied`, and the enclosure test environment said `applicable`; all of them now say `passes`. The per-octave mask of `BandFlatnessCheck` is `within_limit`, named like the per-band `within_tolerance` of the instrument verifications. A flag that is not a pass or a fail keeps its own name with its reason: `within_guideline`, because DIN 4150-3 5.1 does not call exceeding a guideline value a failure, `significant`, a reason to investigate, and `qualified`.
@jmrplens
jmrplens force-pushed the fix/verdicts-spell-passes-and-refuse-truth branch from d394c8b to b2cc946 Compare October 20, 2026 01:45
@greptile-apps

greptile-apps Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] Renames verdict attributes and functions across the codebase.

The PR appears safe to merge, with a non-blocking fix needed for custom drawing order in the tonal survey plot.

Findings

  1. P2 Custom drawing order breaks plotting ▶

Reviews (1) · Last reviewed commit: "Every verdict is spelled `passes`, refus..." · Reviewed by Greptile

style_default(kwargs, "color", _C_PRIMARY)
kwargs.setdefault("width", 0.66)
kwargs.setdefault("label", _t(_BAND_LEVEL_LABEL, language))
ax.bar(positions, levels, zorder=3, **kwargs)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Custom drawing order breaks plotting

TonalSurveyAssessment.plot(zorder=2) raises TypeError instead of drawing the spectrum. The public method forwards drawing options through kwargs, but this call also supplies zorder=3 explicitly. Set the default with kwargs.setdefault("zorder", 3) and pass it only once.

Suggested change
ax.bar(positions, levels, zorder=3, **kwargs)
kwargs.setdefault("zorder", 3)
ax.bar(positions, levels, **kwargs)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #992, commit a7a1d07 (with a refactor of the gate in c801d57). The same shape was in 71 calls across 24 modules; each now merges its default through styled(kwargs, ...), and scripts/check_plot_style_defaults.py refuses a keyword written beside the function's own **kwargs. A test calls TonalSurveyAssessment.plot(zorder=2) and checks the bars; the figures are unchanged.

@sonarqubecloud

Copy link
Copy Markdown

@jmrplens
jmrplens merged commit c4e40ba into main Oct 21, 2026
59 checks passed
@jmrplens
jmrplens deleted the fix/verdicts-spell-passes-and-refuse-truth branch October 21, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Public API surface, naming and deprecations area: aircraft Aircraft and rotorcraft noise area: broadcast Programme loudness and broadcast levels area: building Sound insulation and building acoustics area: core Shared internals and cross-cutting code every domain depends on area: electroacoustics Transducers, arrays and electroacoustic devices area: emission Sound power and source emission area: environment Outdoor propagation, environmental sources and noise assessment area: filters Octave filter banks, weightings and instrument class verification area: hearing Audiometric thresholds, hearing loss and noise exposure area: materials Absorption, impedance and material properties area: noise control Silencers, barriers and noise control treatments area: psychoacoustics Loudness, sharpness, roughness and annoyance area: room Room acoustics and reverberation area: vibration Human vibration and structure-borne sound conformance Standard clause coverage, reference values or errata documentation Improvements or additions to documentation errata Confirmed defect in a published standard, tracked in docs/ERRATA.md figures Generated plots, diagrams and animations i18n English and Spanish translations reports Accredited-format .report() fiches and their rendering site Documentation website

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant