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] Add docstrings for some bigger private functions in load_confounds. #3863

Merged
merged 11 commits into from Aug 10, 2023

Conversation

htwangtw
Copy link
Member

@htwangtw htwangtw commented Jul 21, 2023

Closes #3826.

  • Focus on some wrapper functions that I have seen used incorrectly from user submitted issues.
  • With the help of copilot.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 21, 2023

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

@codecov
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

Merging #3863 (87f03e4) into main (e002d24) will increase coverage by 0.01%.
Report is 31 commits behind head on main.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #3863      +/-   ##
==========================================
+ Coverage   91.59%   91.60%   +0.01%     
==========================================
  Files         134      134              
  Lines       15694    15751      +57     
  Branches     3270     3281      +11     
==========================================
+ Hits        14375    14429      +54     
- Misses        770      772       +2     
- Partials      549      550       +1     
Flag Coverage Δ
macos-latest_3.10 91.53% <100.00%> (+0.01%) ⬆️
macos-latest_3.11 91.53% <100.00%> (+0.01%) ⬆️
macos-latest_3.8 91.49% <100.00%> (+0.01%) ⬆️
macos-latest_3.9 91.49% <100.00%> (+0.01%) ⬆️
ubuntu-latest_3.10 91.53% <100.00%> (+0.01%) ⬆️
ubuntu-latest_3.11 91.53% <100.00%> (+0.01%) ⬆️
ubuntu-latest_3.8 91.49% <100.00%> (+0.01%) ⬆️
ubuntu-latest_3.9 91.49% <100.00%> (+0.01%) ⬆️
windows-latest_3.10 91.47% <100.00%> (+0.01%) ⬆️
windows-latest_3.11 91.47% <100.00%> (+0.01%) ⬆️
windows-latest_3.8 91.43% <100.00%> (+0.01%) ⬆️
windows-latest_3.9 91.43% <100.00%> (+0.01%) ⬆️

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

Files Changed Coverage Δ
nilearn/interfaces/fmriprep/load_confounds.py 100.00% <ø> (ø)
...earn/interfaces/fmriprep/load_confounds_compcor.py 100.00% <ø> (ø)
...n/interfaces/fmriprep/load_confounds_components.py 100.00% <ø> (ø)
...ilearn/interfaces/fmriprep/load_confounds_scrub.py 100.00% <ø> (ø)
...arn/interfaces/fmriprep/load_confounds_strategy.py 100.00% <ø> (ø)
...ilearn/interfaces/fmriprep/load_confounds_utils.py 100.00% <100.00%> (ø)

... and 11 files with indirect coverage changes

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

@htwangtw htwangtw marked this pull request as ready for review July 21, 2023 17:19
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.

Thx !
Maybe we could take this opportunity to improve docstrings quality...

nilearn/interfaces/fmriprep/load_confounds.py Outdated Show resolved Hide resolved
nilearn/interfaces/fmriprep/load_confounds.py Outdated Show resolved Hide resolved
nilearn/interfaces/fmriprep/load_confounds.py Outdated Show resolved Hide resolved
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.

Thx. A few changes have been missed. Best,

nilearn/interfaces/fmriprep/load_confounds_compcor.py Outdated Show resolved Hide resolved
nilearn/interfaces/fmriprep/load_confounds_compcor.py Outdated Show resolved Hide resolved
nilearn/interfaces/fmriprep/load_confounds_compcor.py Outdated Show resolved Hide resolved
nilearn/interfaces/fmriprep/load_confounds_compcor.py Outdated Show resolved Hide resolved
nilearn/interfaces/fmriprep/load_confounds_compcor.py Outdated Show resolved Hide resolved
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.

@htwangtw thanks for adding the docstrings to these private functions! Most of my comments actually have to do with modified docstrings of public functions but I think it's fine to change them in this PR. If you think it's a bigger job (I didn't check parameters that aren't modified) and wish to leave it for another PR that's fine too

nilearn/interfaces/fmriprep/load_confounds.py Outdated Show resolved Hide resolved
nilearn/interfaces/fmriprep/load_confounds.py Outdated Show resolved Hide resolved
nilearn/interfaces/fmriprep/load_confounds.py Outdated Show resolved Hide resolved
nilearn/interfaces/fmriprep/load_confounds.py Outdated Show resolved Hide resolved
nilearn/interfaces/fmriprep/load_confounds.py Outdated Show resolved Hide resolved
nilearn/interfaces/fmriprep/load_confounds.py Outdated Show resolved Hide resolved
nilearn/interfaces/fmriprep/load_confounds.py Outdated Show resolved Hide resolved
nilearn/interfaces/fmriprep/load_confounds_strategy.py Outdated Show resolved Hide resolved
nilearn/interfaces/fmriprep/load_confounds_strategy.py Outdated Show resolved Hide resolved
htwangtw and others added 3 commits August 4, 2023 13:15
Co-authored-by: Yasmin <63292494+ymzayek@users.noreply.github.com>
Co-authored-by: bthirion <bertrand.thirion@inria.fr>
- remove outdated one-hot encoder related description
- remove options from parameter descriptions, replaced with default
  option
- remove redundant default option descriptions in the docstring
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.

Thx @htwangtw , just a few minor things

nilearn/interfaces/fmriprep/load_confounds_components.py Outdated Show resolved Hide resolved
nilearn/interfaces/fmriprep/load_confounds_components.py Outdated Show resolved Hide resolved
nilearn/interfaces/fmriprep/load_confounds_components.py Outdated Show resolved Hide resolved
nilearn/interfaces/fmriprep/load_confounds_utils.py Outdated Show resolved Hide resolved
nilearn/interfaces/fmriprep/load_confounds_utils.py Outdated Show resolved Hide resolved
nilearn/interfaces/fmriprep/load_confounds_utils.py Outdated Show resolved Hide resolved
Co-authored-by: Yasmin <63292494+ymzayek@users.noreply.github.com>
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.

Thx!

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.

Good with me

thanks @htwangtw

@Remi-Gau Remi-Gau merged commit ab8eae6 into nilearn:main Aug 10, 2023
29 checks passed
@htwangtw htwangtw deleted the load_confounds_private_docstrings branch August 15, 2023 15:20
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] load_confounds private function docstrings
4 participants