Fix warnings in test suite#1569
Merged
FlorianPfaff merged 1 commit intomainfrom Mar 31, 2026
Merged
Conversation
Copilot created this pull request from a session on behalf of
FlorianPfaff
March 31, 2026 10:34
View session
c9b02ad to
835bf61
Compare
…ation modules Agent-Logs-Url: https://github.com/FlorianPfaff/PyRecEst/sessions/3adcbbec-96fb-4503-915a-8f101eb5c387 Co-authored-by: FlorianPfaff <6773539+FlorianPfaff@users.noreply.github.com>
835bf61 to
8ed9e11
Compare
Contributor
✅MegaLinter analysis: Success
See detailed reports in MegaLinter artifacts Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining
|
Contributor
Test Results 12 files 12 suites 3h 7m 5s ⏱️ Results for commit 8ed9e11. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

49 warnings fired across the test suite, spanning production code bugs, test data issues, and unfiltered third-party noise.
Production code
circular_fourier_distribution.__sub__: Stop settingnpost-construction; passn=self.ndirectly to the constructor to avoid the ambiguous-n warning.abstract_hypersphere_subset_grid_distribution.__init__: Callnormalize(warn_unnorm=False)— normalization at construction time is expected, not an error. Eliminated ~3,179 repeated warnings.abstract_spherical_harmonics_distribution.normalize_in_place: Addedwarn_unnorm=Trueparameter so callers can opt out of the "not normalized" warning when approximate normalization is expected.Tests
test_hyperspherical_mixture.test_pdf_4d: Meshgrid included the origin(0,0,0,0), causing divide-by-zeroRuntimeWarningduring normalization. Filter zero-norm points before dividing.warnings.catch_warnings();testNormalization, which does test this behavior, updated to useassertWarns(UserWarning).test_evaluation_basic:summarize_filter_resultsandplot_resultscalls use 8 runs for speed, legitimately triggering "less than 1000 runs" warnings. Suppress withcatch_warningsat the call site.Config
pyproject.toml: Added[tool.pytest.ini_options] filterwarningsto suppress third-partyDeprecationWarnings frommpmathandbayesian_filters, andscipy.optimize.OptimizeWarning.