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] Throw error when extra kwargs are given to glm.first_level.first_level_from_bids #4357

Closed
1 task done
michellewang opened this issue Apr 2, 2024 · 1 comment · Fixed by #4414
Closed
1 task done
Assignees
Labels
Enhancement for feature requests

Comments

@michellewang
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Describe your proposed enhancement in detail.

nilearn.glm.first_level.first_level_from_bids takes kwargs, and passes kwargs that have the confounds_ prefix to another function. However, the remaining kwargs are not checked and nothing happens if for example the confound kwargs are not given correctly (e.g. with typo confound_ instead of confounds_).

I think it would be nice/useful to throw a runtime error or something when that happens (first mentioned in PR #4352). Would be happy to work on this too.

Benefits to the change

Better debugging when invalid/unknown kwargs are given.

Pseudocode for the new behavior, if applicable

No response

@michellewang michellewang added the Enhancement for feature requests label Apr 2, 2024
@Remi-Gau
Copy link
Collaborator

Remi-Gau commented Apr 3, 2024

@michellewang
I assigned the issue to you so that "no one else" (😉) gets started on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement for feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants