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

[ENH] Allow pandas.Series as valid input for second_level_input #4070

Merged
merged 5 commits into from Oct 23, 2023

Conversation

Remi-Gau
Copy link
Collaborator

Changes proposed in this pull request:

  • supports passing a pandas series of image filenames to second level

@github-actions
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
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 otherwise

nilearn/glm/tests/test_second_level.py Outdated Show resolved Hide resolved
Co-authored-by: bthirion <bertrand.thirion@inria.fr>
@Remi-Gau
Copy link
Collaborator Author

Remi-Gau commented Oct 20, 2023

TODO

  • update changelog

@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Merging #4070 (e34c499) into main (9fcc19d) will increase coverage by 0.00%.
Report is 2 commits behind head on main.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #4070   +/-   ##
=======================================
  Coverage   91.60%   91.60%           
=======================================
  Files         143      143           
  Lines       16072    16077    +5     
  Branches     3339     3341    +2     
=======================================
+ Hits        14722    14727    +5     
  Misses        804      804           
  Partials      546      546           
Flag Coverage Δ
macos-latest_3.10 91.49% <100.00%> (+<0.01%) ⬆️
macos-latest_3.11 91.49% <100.00%> (+<0.01%) ⬆️
macos-latest_3.12 ?
macos-latest_3.8 ?
macos-latest_3.9 ?
ubuntu-latest_3.10 91.49% <100.00%> (+<0.01%) ⬆️
ubuntu-latest_3.11 91.49% <100.00%> (+<0.01%) ⬆️
ubuntu-latest_3.12 ?
ubuntu-latest_3.8 91.45% <100.00%> (+<0.01%) ⬆️
ubuntu-latest_3.9 ?
windows-latest_3.10 91.44% <100.00%> (+<0.01%) ⬆️
windows-latest_3.11 ?
windows-latest_3.12 ?
windows-latest_3.8 91.40% <100.00%> (+<0.01%) ⬆️
windows-latest_3.9 91.40% <100.00%> (+<0.01%) ⬆️

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

Files Coverage Δ
nilearn/_utils/docs.py 91.86% <ø> (ø)
nilearn/glm/second_level/second_level.py 96.36% <100.00%> (+0.05%) ⬆️

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

@Remi-Gau Remi-Gau marked this pull request as ready for review October 23, 2023 12:34
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 thanks!

@Remi-Gau Remi-Gau merged commit 2a0eb8f into nilearn:main Oct 23, 2023
32 checks passed
@Remi-Gau Remi-Gau deleted the series_scd_lvl branch October 23, 2023 14:28
Remi-Gau added a commit to Remi-Gau/nilearn that referenced this pull request Oct 24, 2023
…arn#4070)

* support panda Series for scd lvl input

* Update nilearn/glm/tests/test_second_level.py

Co-authored-by: bthirion <bertrand.thirion@inria.fr>

* fix test for errors

* update changelog

* typo

---------

Co-authored-by: bthirion <bertrand.thirion@inria.fr>
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.

Allow pandas.Series as valid input for second_level_input in SecondLevelModel class
3 participants