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] Allow both vmin and threshold argument values to be used in plotting functions using colorscale #3945

Merged
merged 4 commits into from Sep 5, 2023

Conversation

ymzayek
Copy link
Member

@ymzayek ymzayek commented Sep 1, 2023

@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2023

👋 @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 Sep 1, 2023

Codecov Report

Merging #3945 (80bb7f6) into main (25e091a) will increase coverage by 0.01%.
Report is 2 commits behind head on main.
The diff coverage is n/a.

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

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

Files Changed Coverage Δ
nilearn/plotting/js_plotting_utils.py 97.59% <ø> (-0.12%) ⬇️

... and 2 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, but how can we make sure that the behavior is consistent across backends and for the many parameter settings ?

@ymzayek
Copy link
Member Author

ymzayek commented Sep 4, 2023

@bthirion I guess it is tested on a higher level in some cases where engine is parameterized in the pytests. I can see if it makes sense to add such a test for this particular case. On a more general level I assume they are consistent by design and, where they diverge, for reasons of available functionality, this is usually documented in the docstrings. I wouldn't be too worried about this but might be something to look into.

@ymzayek
Copy link
Member Author

ymzayek commented Sep 4, 2023

There is an external issue related to the failing jobs that has just been reported to github community forum: https://github.com/orgs/community/discussions/65912

@bthirion
Copy link
Member

bthirion commented Sep 4, 2023

@bthirion I guess it is tested on a higher level in some cases where engine is parameterized in the pytests. I can see if it makes sense to add such a test for this particular case. On a more general level I assume they are consistent by design and, where they diverge, for reasons of available functionality, this is usually documented in the docstrings. I wouldn't be too worried about this but might be something to look into.

Sounds reasonable, but I'm afraid you're a bit optimistic regarding the consistency of the codebase ;-)

@Remi-Gau
Copy link
Collaborator

Remi-Gau commented Sep 5, 2023

@bthirion I guess it is tested on a higher level in some cases where engine is parameterized in the pytests. I can see if it makes sense to add such a test for this particular case. On a more general level I assume they are consistent by design and, where they diverge, for reasons of available functionality, this is usually documented in the docstrings. I wouldn't be too worried about this but might be something to look into.

I guess that I share that optimism and in the worst case scenario, we'll handle inconsistencies when we become aware of them.

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

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.

I can't sport any big issue, so this is an OK.

@Remi-Gau
Copy link
Collaborator

Remi-Gau commented Sep 5, 2023

Thanks @ymzayek

@Remi-Gau Remi-Gau merged commit 1759fa2 into nilearn:main Sep 5, 2023
29 checks passed
@ymzayek ymzayek deleted the fix-plotly-vmin-threshold branch September 20, 2023 16:38
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.

[BUG] In plot_to_surf vmin is set to 0 despite not setting a threshold
3 participants