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] Ensure that fetchers for atlas and func return a Bunch #4233

Merged
merged 10 commits into from Jan 22, 2024

Conversation

Remi-Gau
Copy link
Collaborator

@Remi-Gau Remi-Gau commented Jan 18, 2024

Changes proposed in this pull request:

  • add test to check that atlas and func fetchers return a Bunch
  • add extra argument to fetchers that do not to allow that behavior that will become the default in 0.13.0

Fetchers / loaders of struct were not tested / touched as several in there just return a single nifti files.

Also no test or behavior change was done to the bids_langloc as it planned for complete deprecation for 0.13.

Copy link
Contributor

👋 @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

codecov bot commented Jan 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cfc6246) 92.04% compared to head (a0af25f) 92.06%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4233      +/-   ##
==========================================
+ Coverage   92.04%   92.06%   +0.01%     
==========================================
  Files         144      144              
  Lines       16406    16421      +15     
  Branches     3431     3434       +3     
==========================================
+ Hits        15101    15118      +17     
+ Misses        762      761       -1     
+ Partials      543      542       -1     
Flag Coverage Δ
macos-latest_3.10_test_plotting 91.85% <100.00%> (+0.01%) ⬆️
macos-latest_3.11_test_plotting 91.85% <100.00%> (+0.01%) ⬆️
macos-latest_3.12_test_plotting 91.85% <100.00%> (+0.01%) ⬆️
macos-latest_3.8_test_plotting 91.81% <100.00%> (+0.01%) ⬆️
macos-latest_3.9_test_plotting 91.82% <100.00%> (+0.01%) ⬆️
ubuntu-latest_3.10_test_plotting 91.85% <100.00%> (+0.01%) ⬆️
ubuntu-latest_3.11_test_plotting 91.85% <100.00%> (+0.01%) ⬆️
ubuntu-latest_3.12_test_plotting 91.85% <100.00%> (+0.01%) ⬆️
ubuntu-latest_3.12_test_pre 91.85% <100.00%> (+0.01%) ⬆️
ubuntu-latest_3.8_test_min 68.94% <100.00%> (+0.04%) ⬆️
ubuntu-latest_3.8_test_plot_min 91.56% <100.00%> (+0.01%) ⬆️
ubuntu-latest_3.8_test_plotting 91.81% <100.00%> (+0.01%) ⬆️
ubuntu-latest_3.9_test_plotting 91.82% <100.00%> (+0.01%) ⬆️
windows-latest_3.10_test_plotting 91.83% <100.00%> (+0.01%) ⬆️
windows-latest_3.11_test_plotting 91.83% <100.00%> (+0.01%) ⬆️
windows-latest_3.12_test_plotting 91.83% <100.00%> (+0.01%) ⬆️
windows-latest_3.8_test_plotting 91.79% <100.00%> (+0.01%) ⬆️
windows-latest_3.9_test_plotting 91.80% <100.00%> (+0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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 overall.

examples/07_advanced/plot_surface_bids_analysis.py Outdated Show resolved Hide resolved
Co-authored-by: bthirion <bertrand.thirion@inria.fr>
@Remi-Gau Remi-Gau changed the title [WIP][FIX] Ensure that fetchers for atlas and func return a Bunch FIX] Ensure that fetchers for atlas and func return a Bunch Jan 19, 2024
@Remi-Gau Remi-Gau changed the title FIX] Ensure that fetchers for atlas and func return a Bunch [FIX] Ensure that fetchers for atlas and func return a Bunch Jan 19, 2024
nilearn/datasets/func.py Outdated Show resolved Hide resolved
Remi-Gau and others added 3 commits January 19, 2024 10:59
Co-authored-by: Yasmin <63292494+ymzayek@users.noreply.github.com>
@Remi-Gau Remi-Gau marked this pull request as ready for review January 19, 2024 10:05
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, thx !

Copy link
Member

@ymzayek ymzayek left a comment

Choose a reason for hiding this comment

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

LGTM!

@Remi-Gau Remi-Gau merged commit 0d2cdbc into nilearn:main Jan 22, 2024
32 checks passed
@Remi-Gau Remi-Gau deleted the fetcher_return_bunch branch January 22, 2024 08:22
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.

None yet

3 participants