-
Notifications
You must be signed in to change notification settings - Fork 262
Simplify the testing infrastructure for checking warnings #343
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
Comments
Sorry - I was on a plane flying across the Atlantic yesterday... Yes, it certainly seems like a good idea to clean these up. I did an extensive refactor of these things for numpy - here : numpy/numpy#5682 - maybe best to use a copy of that? It had a heavy review. We should be a little careful not to break anyone else's code with the API change. |
👍 thx |
OK, so given this, I am thinking to:
Any comments on this plan are welcome. |
Sounds like a good plan. |
MRG: Simplify interface for testing of warnings. This is a fix for #343 New interface: suppress_warnings, clear_and_catch_warnings, and error_warnings. Deprecate ErrorWarnings, IgnoreWarnings, and catch_warn_reset; nibabel.checkwarns.
This was fixed in #345 |
MRG: Simplify interface for testing of warnings. This is a fix for nipy#343 New interface: suppress_warnings, clear_and_catch_warnings, and error_warnings. Deprecate ErrorWarnings, IgnoreWarnings, and catch_warn_reset; nibabel.checkwarns.
In implementing #329, I've hit the need to check warnings. I believe
nibabel
has two different codepaths for manipulating warnings:nibabel.checkwarns
- has classesErrorWarnings
andIgnoreWarnings
nibabel.testing
- has classessuppress_warnings
andcatch_warn_reset
I'd like to combine these into a single place, with a single methodology. I believe creating a
CheckWarnings
class, that mirrorscatch_warn_reset
, and eliminating the warning classes fromnibabel.testing
, may be the best?@matthew-brett any advice? I'd like to resolve this one before completing #329 , if that's cool. I have time to do it today.
The text was updated successfully, but these errors were encountered: