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
Update test_examples
job dependencies, unskip surface_timeseries_.py
and update some examples validations
#5716
Conversation
…e some example validations
for more information, see https://pre-commit.ci
test_examples
job dependencies, unskip some examples and update some examples validationstest_examples
job dependencies, unskip surface_timeseries_.py
and update some examples validations
Codecov Report
@@ Coverage Diff @@
## main #5716 +/- ##
==========================================
+ Coverage 89.84% 89.87% +0.03%
==========================================
Files 614 614
Lines 52196 52196
==========================================
+ Hits 46893 46913 +20
+ Misses 5303 5283 -20
|
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.
I like this a lot, thank you @psobolewskiPhD!
One very small change requested below.
examples/surface_timeseries_.py
Outdated
from packaging.version import parse | ||
except ModuleNotFoundError: | ||
raise ModuleNotFoundError( | ||
"You must have packaging installed to run this example." |
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.
I like it when error messages have the format: something went wrong, here's how you might fix it
Can this error include a suggestion to use "pip install packaging" (and/or conda)
examples/surface_timeseries_.py
Outdated
if parse(np.__version__) >= parse("1.24"): | ||
raise RuntimeError( | ||
"Incompatible numpy version. " | ||
"You must have numpy <1.24 for nilearn to work and download the example data" |
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.
Two suggestions:
- Replace the
<
symbol with with the words "less than" (because people skim read, and very often these types of error messages are encouraging people to upgrade their versions, not downgrade like we are asking them to do here) - Write down which version(s) of nilearn this is currently true for, i.e. nilearn version 0.10.1 and below (because this info is hard to find easily the more time has gone by, and possibly newer version s of nilearn that are compatible might be released)
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.
A nilearn PR that could fix this problem is open here: nilearn/nilearn#3644
It's still under development but once a fix is in and a new version published, we'll probably require that as the minimum nilearn version (and remove the numpy version warning) for this example script.
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.
Looks good, thank you!
…py` and update some examples validations (#5716) # Fixes/Closes Closes #5611 # Description This enables testing the `surface_timeseries_.py` example on the CI and adds some validations and comments to inform better why some examples can't be run/dependencies needed for running them ## Type of change - [x] Bug-fix (non-breaking change which fixes an issue) # How has this been tested? - [x] all tests pass with my change ## Final checklist: - [x] My PR is the minimum possible work for the desired functionality - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…py` and update some examples validations (#5716) # Fixes/Closes Closes #5611 # Description This enables testing the `surface_timeseries_.py` example on the CI and adds some validations and comments to inform better why some examples can't be run/dependencies needed for running them ## Type of change - [x] Bug-fix (non-breaking change which fixes an issue) # How has this been tested? - [x] all tests pass with my change ## Final checklist: - [x] My PR is the minimum possible work for the desired functionality - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…py` and update some examples validations (#5716) # Fixes/Closes Closes #5611 # Description This enables testing the `surface_timeseries_.py` example on the CI and adds some validations and comments to inform better why some examples can't be run/dependencies needed for running them ## Type of change - [x] Bug-fix (non-breaking change which fixes an issue) # How has this been tested? - [x] all tests pass with my change ## Final checklist: - [x] My PR is the minimum possible work for the desired functionality - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…py` and update some examples validations (#5716) # Fixes/Closes Closes #5611 # Description This enables testing the `surface_timeseries_.py` example on the CI and adds some validations and comments to inform better why some examples can't be run/dependencies needed for running them ## Type of change - [x] Bug-fix (non-breaking change which fixes an issue) # How has this been tested? - [x] all tests pass with my change ## Final checklist: - [x] My PR is the minimum possible work for the desired functionality - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Fixes/Closes
Closes #5611
Description
This enables testing the
surface_timeseries_.py
example on the CI and adds some validations and comments to inform better why some examples can't be run/dependencies needed for running themType of change
How has this been tested?
Final checklist: