Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[FIX] check data format passed to surface plotting functions #4323
[FIX] check data format passed to surface plotting functions #4323
Changes from all commits
6e6fa89
1f541cb
2b10c4b
8c9d161
0025994
b501218
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Added in this as I needed it but probably reusable in other tests.
Check warning on line 26 in nilearn/plotting/surf_plotting.py
Codecov / codecov/patch
nilearn/plotting/surf_plotting.py#L26
Check warning on line 36 in nilearn/plotting/surf_plotting.py
Codecov / codecov/patch
nilearn/plotting/surf_plotting.py#L36
Check warning on line 826 in nilearn/plotting/surf_plotting.py
Codecov / codecov/patch
nilearn/plotting/surf_plotting.py#L826
Check warning on line 989 in nilearn/plotting/surf_plotting.py
Codecov / codecov/patch
nilearn/plotting/surf_plotting.py#L989
Check warning on line 1204 in nilearn/plotting/surf_plotting.py
Codecov / codecov/patch
nilearn/plotting/surf_plotting.py#L1204
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.
Tested that the code works with both string and path so updated the doc.
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.
On that note, it may be worth checking in the public API that users can also pass a Path in places where they can pass a string to a file.
I have not checked but it seems that many functions require a string and that Paths are not supported (or at least the doc string is not necessarily explicit - or I missed it).
May be done as some internal refactoring to rely more on pathlib rather than os (where relevant) - to be discussed.
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.
Yes, we should open an issue and address that later.
Check warning on line 1718 in nilearn/plotting/surf_plotting.py
Codecov / codecov/patch
nilearn/plotting/surf_plotting.py#L1718
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.
refactor this as fixture to help reusing it
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.
sorry for the horrible diff on this part but this test was pretty unreadable
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.
check that files are accepted as string or paths