Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress or fix warnings #1272

Merged
merged 5 commits into from
Jul 29, 2024
Merged

Suppress or fix warnings #1272

merged 5 commits into from
Jul 29, 2024

Conversation

thorbjoernl
Copy link
Collaborator

@thorbjoernl thorbjoernl commented Jul 18, 2024

Change Summary

This PR reduces the number of warnings in the log by either suppressing them, fixing the underlying issue or ignoring them depending on the warning:

  • f"Detected wrong frequency {freq_ebas}. Trying to infer the correct frequency...": Is logged as info instead. Warning is only logged when inference fails.
  • In stats/implementations.py, "invalid value encountered in divide" (caused by division by zero) and ConstantInputWarning (correlation undefined for constant arrays) are ignored.

Related issue number

#1066

Checklist

  • Start with a draft-PR
  • The PR title is a good summary of the changes
  • PR is set to AeroTools and a tentative milestone
  • Documentation reflects the changes where applicable
  • Tests for the changes exist where applicable
  • Tests pass locally
  • Tests pass on CI
  • At least 1 reviewer is selected
  • Make PR ready to review

@thorbjoernl thorbjoernl changed the title Remove or fix warnings Suppress or fix warnings Jul 18, 2024
Copy link

codecov bot commented Jul 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.95%. Comparing base (dc40c69) to head (354e52f).
Report is 46 commits behind head on main-dev.

Additional details and impacted files
@@             Coverage Diff              @@
##           main-dev    #1272      +/-   ##
============================================
- Coverage     79.04%   78.95%   -0.09%     
============================================
  Files           136      136              
  Lines         20786    20835      +49     
============================================
+ Hits          16431    16451      +20     
- Misses         4355     4384      +29     
Flag Coverage Δ
unittests 78.95% <100.00%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@thorbjoernl thorbjoernl marked this pull request as ready for review July 25, 2024 10:01
@@ -52,6 +53,10 @@ def test_unitconv_sfc_conc(dummy_data):
assert np.all(result == pytest.approx(1.99796663, 1e-4))


@ignore_warnings(
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add a TODO: Change to update pandas without breaking other tests

@thorbjoernl thorbjoernl merged commit 6334a76 into main-dev Jul 29, 2024
7 of 8 checks passed
@lewisblake lewisblake deleted the remove-warnings branch July 30, 2024 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants