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

[MAINT] Expose standardize parameter in function signatures to allow handling of deprecation #3927

Merged
merged 11 commits into from Aug 29, 2023

Conversation

ymzayek
Copy link
Member

@ymzayek ymzayek commented Aug 25, 2023

Changes proposed in this pull request:

  • Add standardize parameter to plot_carpet and ConnectivityMeasure so users can deal with "zscore" deprecation
  • Update examples
  • Update/add tests that warnings are not raised with new input

@github-actions
Copy link
Contributor

👋 @ymzayek 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 Aug 25, 2023

Codecov Report

Merging #3927 (44b71df) into main (457c79e) will decrease coverage by 0.02%.
Report is 6 commits behind head on main.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #3927      +/-   ##
==========================================
- Coverage   91.76%   91.75%   -0.02%     
==========================================
  Files         134      134              
  Lines       15747    15751       +4     
  Branches     3283     3283              
==========================================
+ Hits        14451    14453       +2     
- Misses        752      753       +1     
- Partials      544      545       +1     
Flag Coverage Δ
macos-latest_3.10 91.68% <100.00%> (?)
macos-latest_3.11 91.68% <100.00%> (?)
macos-latest_3.8 91.64% <100.00%> (?)
macos-latest_3.9 91.64% <100.00%> (?)
ubuntu-latest_3.10 91.68% <100.00%> (+<0.01%) ⬆️
ubuntu-latest_3.11 91.68% <100.00%> (+<0.01%) ⬆️
ubuntu-latest_3.8 91.64% <100.00%> (?)
ubuntu-latest_3.9 91.64% <100.00%> (+<0.01%) ⬆️
windows-latest_3.10 91.62% <100.00%> (?)
windows-latest_3.11 ?
windows-latest_3.8 ?

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

Files Changed Coverage Δ
nilearn/regions/region_extractor.py 97.94% <ø> (ø)
nilearn/connectome/connectivity_matrices.py 94.44% <100.00%> (+0.03%) ⬆️
nilearn/plotting/img_plotting.py 89.13% <100.00%> (-0.41%) ⬇️

... and 4 files with indirect coverage changes

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

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 so far, but we need to check that the behavior of the examples is still fine.

@ymzayek
Copy link
Member Author

ymzayek commented Aug 28, 2023

Showing main branch build versus changes in this PR for affected examples:

plot_carpet: main version vs this pr

plot_atlas_comparison: main version vs this pr

plot_extract_regions_dictlearning_maps: main version vs this pr

plot_group_level_connectivity: main version vs this pr

plot_probabilistic_atlas_extraction: main version vs this pr

plot_signal_extraction: main version vs this pr

plot_sphere_based_connectome: main version vs this pr

plot_age_group_prediction_cross_val: main version vs this pr

@ymzayek
Copy link
Member Author

ymzayek commented Aug 28, 2023

Is there a reason that standardize_confounds was not passed to RegionExtractor?

@bthirion
Copy link
Member

Thx ! LGTM

@bthirion
Copy link
Member

No, I think it was simply forgotten.

@Remi-Gau
Copy link
Collaborator

had a look yesterday and it LGTM
let me know if something else needs reviewing otherwise I think this can be merged

@ymzayek ymzayek marked this pull request as ready for review August 29, 2023 13:38
@ymzayek
Copy link
Member Author

ymzayek commented Aug 29, 2023

Ok should be good to go once the CI passes

@Remi-Gau Remi-Gau merged commit 0b4d7db into nilearn:main Aug 29, 2023
29 checks passed
@ymzayek ymzayek deleted the silence-standardize branch September 20, 2023 16:37
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.

Silence standardize deprecation warnings not possible with functions that set parameter internally
3 participants