-
Notifications
You must be signed in to change notification settings - Fork 260
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
ENH: Check CIFTI-2 data shape matches shape described by header #774
Conversation
I do think a |
Codecov Report
@@ Coverage Diff @@
## master #774 +/- ##
==========================================
+ Coverage 89.97% 89.99% +0.01%
==========================================
Files 94 94
Lines 11992 12009 +17
Branches 2128 2134 +6
==========================================
+ Hits 10790 10807 +17
Misses 859 859
Partials 343 343
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. Just a couple comments.
Also, I doubt I'm going to have time to think through and implement new warning classes before the 2.5 release. Perhaps we can revisit afterwards. |
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
I'm happy to either have this pull request to remain open until you have time to decide on the new warning system. We could also just put it in with the default python warning and later replace that with a custom warning system. I have no strong preference either way. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. One quick typo...
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
LGTM. Thanks. |
Checks whether the shape of the data matches the shape expected based on the CIFTI-2 header
I've added tests for both of these behaviors (and fixed many old tests that produced mismatched CIFTI images).
In the end I did not adopt the framework of _get_checks as this seemed to be only implemented for subclasses of WrapStruct, which are the header objects. However, this is a test that should be run on the Image class (as it requires knowing the shape of the dataobj).