-
Notifications
You must be signed in to change notification settings - Fork 590
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
[doc] Warning for non-matching n_parcels #2240
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2240 +/- ##
==========================================
- Coverage 92.7% 92.57% -0.13%
==========================================
Files 150 150
Lines 19019 19038 +19
Branches 2311 2313 +2
==========================================
- Hits 17632 17625 -7
- Misses 883 905 +22
- Partials 504 508 +4
Continue to review full report at Codecov.
|
Nice! A test & what's new entry & this should be ready. |
903cd1a
to
ee68320
Compare
@GaelVaroquaux I was looking at adding another test, to confirm that the warning isn't raised when the
The problem is that Do you have any suggestions of how to filter appropriately and confirm there's no |
assert record.list is None
I would filter out the list manually here.
|
Hi @emdupre Also instead of doing what you did above, you can write another test like the one you have added in the code, but engineered such that the number of parcels are the same, and mark it as expected to fail, using |
Once CI is green, I am +1 for merge. |
Thanks, @kchawla-pi and @GaelVaroquaux ! Hopefully this will pass as-is, but the different methods are good to know moving forward 😸 |
Totally. I particularly love |
In my experience the manual parsing approach is rather fragile, and when implemented in a robust way, looks ugly. Do consider my suggestion, I think that approach is clean and robust. |
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.
LGTM. Thank you for your perseverence
@emdupre I played around with Pytest to see if we can find ways to improve the testing. It seems to me my suggestion has gaps that pytest does not handle (counter-intuitive, hope they fix it), and your way is the better one. |
…der2 * 'master' of https://github.com/nilearn/nilearn: BUG: NiftiLabelsMasker inverse_transform without transform (nilearn#2248) Details in CONTRIBUTING.rst Update CONTRIBUTING.rst (nilearn#2262) [MRG+1] Remove support for old parameters in view_connectome & view_markers (nilearn#2255) maint: warn upcoming deprecation for fetch_haxby_simple (nilearn#2256) fix: remove now duplicated report scraper (nilearn#2261) Region means are no longer casted to Int type for Int images in NiftLabelsMasker (nilearn#2195) Improve replace parameters (nilearn#2254) Fix tests pertaining to replace_parameters functionality (nilearn#2253) [doc] Warning for non-matching n_parcels (nilearn#2240) More clear CONTRIBUTING.rst (nilearn#2246) doc: remove now unecessary print statements (nilearn#2243) [doc] Iimprove documentation re: using index_img with slice() (nilearn#2189) Argument version='det' in pauli 2017 atlas now works correctly (nilearn#2235) Fix: Nilearn raises Nose ImportError with no MatPlotLib (nilearn#2231) Non-iterable Image headers are not copied anymore (nilearn#2212) Add parameter "strategy" to NiftiLabelsMasker to choose function to reduce ROIs (nilearn#2221) Improved nifti masker documentation (nilearn#2234) CI: Use pkg_resources to list installed dependencies (nilearn#2228) CI: Test pre-release versions of dependencies (nilearn#2224)
…rtva_fetcher_dev * 'master' of https://github.com/nilearn/nilearn: (30 commits) Remove appveyor (nilearn#2267) Maint: Replace nose with Pytest - 1 (Asserts, warns, raises) (nilearn#2232) Release 0.6.0 (nilearn#2265) doc: remove outdated references to multisubjs (nilearn#2264) typo + changes for plot_decoding_tutorial (nilearn#2260) [documentation] Searchlight user guide (nilearn#2257) BUG: NiftiLabelsMasker inverse_transform without transform (nilearn#2248) Details in CONTRIBUTING.rst Update CONTRIBUTING.rst (nilearn#2262) [MRG+1] Remove support for old parameters in view_connectome & view_markers (nilearn#2255) maint: warn upcoming deprecation for fetch_haxby_simple (nilearn#2256) fix: remove now duplicated report scraper (nilearn#2261) Region means are no longer casted to Int type for Int images in NiftLabelsMasker (nilearn#2195) Improve replace parameters (nilearn#2254) Fix tests pertaining to replace_parameters functionality (nilearn#2253) [doc] Warning for non-matching n_parcels (nilearn#2240) More clear CONTRIBUTING.rst (nilearn#2246) doc: remove now unecessary print statements (nilearn#2243) [doc] Iimprove documentation re: using index_img with slice() (nilearn#2189) Argument version='det' in pauli 2017 atlas now works correctly (nilearn#2235) ...
Closes #2238.