Skip to content
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] fix loading of confounds for giftis #3819

Merged
merged 9 commits into from Jul 7, 2023
Merged

Conversation

Remi-Gau
Copy link
Collaborator

@Remi-Gau Remi-Gau commented Jul 6, 2023

Closes #3817

Changes proposed in this pull request:

  • add regression test
  • swap space and hemi entities in filename pattern to fix test

@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2023

👋 @Remi-Gau Thanks for creating a PR!

Until this PR is ready for review, you can include the [WIP] tag in its title, or leave it as a github draft.

Please make sure it is compliant with our contributing guidelines. In particular, be sure it checks the boxes listed below.

  • PR has an interpretable title.
  • PR links to Github issue with mention Closes #XXXX (see our documentation on PR structure)
  • Code is PEP8-compliant (see our documentation on coding style)
  • Changelog or what's new entry in doc/changes/latest.rst (see our documentation on PR structure)

For new features:

  • There is at least one unit test per new function / class (see our documentation on testing)
  • The new feature is demoed in at least one relevant example.

For bug fixes:

  • There is at least one test that would fail under the original bug conditions.

We will review it as quick as possible, feel free to ping us with questions if needed.

Copy link
Member

@bthirion bthirion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM so far. Don't forget the whatsnew entry.

Copy link
Member

@htwangtw htwangtw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for catching this...

@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Merging #3819 (71a5cd8) into main (36b4725) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #3819      +/-   ##
==========================================
+ Coverage   91.53%   91.54%   +0.01%     
==========================================
  Files         133      133              
  Lines       15575    15619      +44     
  Branches     3233     3248      +15     
==========================================
+ Hits        14256    14298      +42     
- Misses        772      774       +2     
  Partials      547      547              
Flag Coverage Δ
macos-latest_3.10 91.46% <100.00%> (+0.01%) ⬆️
macos-latest_3.11 91.46% <100.00%> (+0.01%) ⬆️
macos-latest_3.8 91.43% <100.00%> (+0.01%) ⬆️
macos-latest_3.9 91.43% <100.00%> (+0.01%) ⬆️
ubuntu-latest_3.10 91.46% <100.00%> (+0.01%) ⬆️
ubuntu-latest_3.11 91.46% <100.00%> (+0.01%) ⬆️
ubuntu-latest_3.8 91.43% <100.00%> (+0.01%) ⬆️
ubuntu-latest_3.9 91.43% <100.00%> (+0.01%) ⬆️
windows-latest_3.10 91.40% <100.00%> (+0.01%) ⬆️
windows-latest_3.11 91.40% <100.00%> (+0.01%) ⬆️
windows-latest_3.8 ?
windows-latest_3.9 91.37% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
nilearn/interfaces/bids/_utils.py 97.72% <ø> (ø)
...ilearn/interfaces/fmriprep/load_confounds_utils.py 100.00% <ø> (ø)
nilearn/_utils/data_gen.py 96.66% <100.00%> (+0.11%) ⬆️
...n/interfaces/fmriprep/tests/test_load_confounds.py 98.38% <100.00%> (+0.04%) ⬆️

... and 10 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Remi-Gau
Copy link
Collaborator Author

Remi-Gau commented Jul 7, 2023

@htwangtw
noticing that there is a bit of code duplication (at least in terms of goals) between some of the utils used in testing to generate dummy fmriprep confounds and some of the code in _utils.data_gen to generate dummy fmriprep datasets.

Nothing big but will probably end up opening a PR to refactor.

@Remi-Gau Remi-Gau marked this pull request as ready for review July 7, 2023 09:20
@htwangtw
Copy link
Member

htwangtw commented Jul 7, 2023

@htwangtw noticing that there is a bit of code duplication (at least in terms of goals) between some of the utils used in testing to generate dummy fmriprep confounds and some of the code in _utils.data_gen to generate dummy fmriprep datasets.

Nothing big but will probably end up opening a PR to refactor.

Sounds good to me. I was thinking about similar things looking at my own PR as well

@Remi-Gau Remi-Gau merged commit 7295b41 into nilearn:main Jul 7, 2023
29 checks passed
@Remi-Gau Remi-Gau deleted the fix/3817 branch July 7, 2023 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] func.gii files not recognized in interfaces.fmriprep.load_confounds
4 participants