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

[FIX] fix plotting of an image with color bar when maximum value is exactly zero #4204

Merged
merged 3 commits into from Jan 16, 2024

Conversation

Remi-Gau
Copy link
Collaborator

@Remi-Gau Remi-Gau commented Jan 10, 2024

Changes proposed in this pull request:

  • bump stack level of several warnings (make sure they "point" to some public API function)
  • add regression test and fix

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

codecov bot commented Jan 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6764c9e) 92.09% compared to head (26e08c8) 92.10%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4204   +/-   ##
=======================================
  Coverage   92.09%   92.10%           
=======================================
  Files         144      144           
  Lines       16366    16368    +2     
  Branches     3426     3427    +1     
=======================================
+ Hits        15073    15075    +2     
  Misses        754      754           
  Partials      539      539           
Flag Coverage Δ
macos-latest_3.10_test_plotting 91.89% <100.00%> (+<0.01%) ⬆️
macos-latest_3.11_test_plotting 91.89% <100.00%> (+<0.01%) ⬆️
macos-latest_3.12_test_plotting 91.89% <100.00%> (+<0.01%) ⬆️
macos-latest_3.8_test_plotting 91.85% <100.00%> (+<0.01%) ⬆️
macos-latest_3.9_test_plotting 91.85% <100.00%> (+<0.01%) ⬆️
ubuntu-latest_3.10_test_plotting 91.89% <100.00%> (+<0.01%) ⬆️
ubuntu-latest_3.11_test_plotting 91.89% <100.00%> (+<0.01%) ⬆️
ubuntu-latest_3.12_test_plotting 91.89% <100.00%> (+<0.01%) ⬆️
ubuntu-latest_3.12_test_pre 91.89% <100.00%> (+<0.01%) ⬆️
ubuntu-latest_3.8_test_min 68.97% <40.00%> (-0.01%) ⬇️
ubuntu-latest_3.8_test_plot_min 91.60% <100.00%> (+<0.01%) ⬆️
ubuntu-latest_3.8_test_plotting 91.85% <100.00%> (+<0.01%) ⬆️
ubuntu-latest_3.9_test_plotting 91.85% <100.00%> (+<0.01%) ⬆️
windows-latest_3.10_test_plotting 91.86% <100.00%> (+<0.01%) ⬆️
windows-latest_3.11_test_plotting 91.86% <100.00%> (+<0.01%) ⬆️
windows-latest_3.12_test_plotting 91.86% <100.00%> (+<0.01%) ⬆️
windows-latest_3.8_test_plotting 91.82% <100.00%> (+<0.01%) ⬆️
windows-latest_3.9_test_plotting 91.83% <100.00%> (+<0.01%) ⬆️

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.

@bthirion
Copy link
Member

Oops, doc does not build.
LGTM otherwise.

@Remi-Gau Remi-Gau changed the title [FIX][]WIP] fix height control crash in make glm report [FIX][WIP] fix height control crash in make glm report Jan 10, 2024
@Remi-Gau Remi-Gau marked this pull request as draft January 10, 2024 23:31
@Remi-Gau
Copy link
Collaborator Author

na it's my bad

I meant to open this to show the bug and then fix it: should have been a draft PR

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.

So far so good

.gitignore Outdated Show resolved Hide resolved
@Remi-Gau
Copy link
Collaborator Author

given that the example tweaked in this PR will be nuked by #3191 I will probably not change the example file in this PR

@bthirion
Copy link
Member

Then we need to couple the two merges because the example is broken.

@Remi-Gau
Copy link
Collaborator Author

OK the bug exists in the PR #3191 if I use height_control="fdr"

@Remi-Gau
Copy link
Collaborator Author

'bonferroni' correction is affected too

@Remi-Gau Remi-Gau changed the title [FIX][WIP] fix height control crash in make glm report [FIX] fix plotting of an image with color bar when maximum value is exactly zero Jan 11, 2024
@Remi-Gau Remi-Gau marked this pull request as ready for review January 11, 2024 21:48
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 thx @Remi-Gau

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. Just beware the codecov complaint.

@Remi-Gau Remi-Gau merged commit 3d80bac into nilearn:main Jan 16, 2024
32 checks passed
@Remi-Gau Remi-Gau deleted the glm_report branch January 16, 2024 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] make_glm_report fails in examples/04_glm_first_level/plot_fiac_analysis.py with height_control="fdr"
3 participants