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

[DOC] Fix typo and docstring formatting in glm.first_level.first_level_from_bids #4352

Merged
merged 2 commits into from Apr 2, 2024

Conversation

michellewang
Copy link
Contributor

Changes proposed in this pull request:

  • Fixed typo: confound_ prefix should be confounds_ for the kwargs
  • Fixed some formatting weirdness in the autodocs
    • Indented the part about the confounds_ kwargs to be under the entry for kwargs
    • Moved some text referring to other arguments and subject labels to before the "Parameters" section
  • Added double back ticks around None etc. and turned the references to e.g. FirstLevelModel into links

@Remi-Gau does this function currently only process kwargs that have the confounds_ prefix? Should we raise a warning or throw an error if there are other kwargs provided by the user?

Copy link
Contributor

github-actions bot commented Apr 2, 2024

👋 @michellewang 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 Apr 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.07%. Comparing base (abb80ff) to head (9169f27).
Report is 41 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4352      +/-   ##
==========================================
+ Coverage   91.85%   92.07%   +0.21%     
==========================================
  Files         144      143       -1     
  Lines       16419    16496      +77     
  Branches     3434     3463      +29     
==========================================
+ Hits        15082    15189     +107     
+ Misses        792      764      -28     
+ Partials      545      543       -2     
Flag Coverage Δ
macos-latest_3.10_test_plotting 91.94% <ø> (?)
macos-latest_3.11_test_plotting 91.94% <ø> (+0.09%) ⬆️
macos-latest_3.12_test_plotting 91.94% <ø> (?)
macos-latest_3.8_test_plotting 91.91% <ø> (?)
macos-latest_3.9_test_plotting 91.91% <ø> (?)
ubuntu-latest_3.10_test_plotting 91.94% <ø> (+0.09%) ⬆️
ubuntu-latest_3.11_test_plotting 91.94% <ø> (?)
ubuntu-latest_3.12_test_plotting 91.94% <ø> (?)
ubuntu-latest_3.12_test_pre 91.94% <ø> (?)
ubuntu-latest_3.8_test_plot_min 91.61% <ø> (?)
ubuntu-latest_3.8_test_plotting 91.91% <ø> (?)
ubuntu-latest_3.9_test_plotting 91.91% <ø> (?)
windows-latest_3.10_test_plotting 91.92% <ø> (?)
windows-latest_3.11_test_plotting 91.92% <ø> (?)
windows-latest_3.12_test_plotting 91.92% <ø> (?)
windows-latest_3.8_test_plotting 91.88% <ø> (?)
windows-latest_3.9_test_plotting 91.89% <ø> (?)

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.

@Remi-Gau
Copy link
Collaborator

Remi-Gau commented Apr 2, 2024

Oops. I had already opened a PR. Let me compare them, push anything extra I may have done on mine on your PR and then close mine.

@Remi-Gau
Copy link
Collaborator

Remi-Gau commented Apr 2, 2024

does this function currently only process kwargs that have the confounds_ prefix? Should we raise a warning or throw an error if there are other kwargs provided by the user?

That's a good idea because kwargs tend invite some funky problems when left unnchecked but this is also beyond the scope of this PR.

Copy link
Collaborator

@Remi-Gau Remi-Gau left a comment

Choose a reason for hiding this comment

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

Minor comments but the rest LGTM

@michellewang
Copy link
Contributor Author

Sorry @Remi-Gau I didn't see that you already had a PR for this! 😅

@Remi-Gau
Copy link
Collaborator

Remi-Gau commented Apr 2, 2024

Sorry @Remi-Gau I didn't see that you already had a PR for this! 😅

well I should have mentioned I was taking the issue but in the end you did a more extensive job than I did so I cannot complain.

@Remi-Gau Remi-Gau requested a review from man-shu April 2, 2024 14:44
Copy link
Contributor

@man-shu man-shu left a comment

Choose a reason for hiding this comment

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

Great! Thanks @michellewang !

@Remi-Gau Remi-Gau merged commit 261d6e5 into nilearn:main Apr 2, 2024
33 of 34 checks passed
@michellewang michellewang deleted the 4342/glm_docstring branch April 2, 2024 20:34
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.

[DOC] Error in docstring for nilearn.glm.first_level.first_level_from_bids
3 participants