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

Add SpectralUnitsWarning for more targeted warning filters #239

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

lpsinger
Copy link
Contributor

@lpsinger lpsinger commented Sep 5, 2024

This makes it easier for users to disable the unit conversion warnings without also suppressing other unrelated UserWarnings.

This should be a backward-compatible change: since the new warning class subclasses UserWarning, code designed to suppress UserWarnings will still suppress this warning.

@karllark
Copy link
Owner

karllark commented Sep 5, 2024

Please add a description to this PR to describe in words the goal. Thanks.

@lpsinger
Copy link
Contributor Author

lpsinger commented Sep 5, 2024

Please add a description to this PR to describe in words the goal. Thanks.

Done.

Copy link

codecov bot commented Sep 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.89%. Comparing base (8871ed6) to head (412cbfc).
Report is 7 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #239   +/-   ##
=======================================
  Coverage   99.89%   99.89%           
=======================================
  Files           8        9    +1     
  Lines         935      938    +3     
=======================================
+ Hits          934      937    +3     
  Misses          1        1           

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

Copy link
Owner

@karllark karllark left a comment

Choose a reason for hiding this comment

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

Nice PR. Minor updates needed. Thanks.

dust_extinction/helpers.py Show resolved Hide resolved
dust_extinction/tests/test_warnings.py Show resolved Hide resolved
Copy link
Owner

@karllark karllark left a comment

Choose a reason for hiding this comment

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

LGTM.

@karllark karllark merged commit d2e54ba into karllark:master Sep 13, 2024
17 checks passed
@lpsinger lpsinger deleted the SpectralUnitsWarning branch September 13, 2024 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants