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] Test against Numpy 2.0 nightly releases #4130

Merged
merged 11 commits into from Dec 6, 2023

Conversation

ymzayek
Copy link
Member

@ymzayek ymzayek commented Dec 5, 2023

Copy link
Contributor

github-actions bot commented Dec 5, 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.

Copy link

codecov bot commented Dec 5, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (570a65a) 91.84% compared to head (2c6f685) 91.77%.
Report is 1 commits behind head on main.

Files Patch % Lines
nilearn/plotting/find_cuts.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4130      +/-   ##
==========================================
- Coverage   91.84%   91.77%   -0.08%     
==========================================
  Files         144      144              
  Lines       16224    16241      +17     
  Branches     3377     3386       +9     
==========================================
+ Hits        14901    14905       +4     
- Misses        781      791      +10     
- Partials      542      545       +3     
Flag Coverage Δ
macos-latest_3.10_test_plotting 91.66% <78.57%> (-0.01%) ⬇️
macos-latest_3.11_test_plotting 91.66% <78.57%> (-0.01%) ⬇️
macos-latest_3.12_test_plotting 91.66% <78.57%> (-0.01%) ⬇️
macos-latest_3.8_test_plotting 91.62% <78.57%> (-0.01%) ⬇️
macos-latest_3.9_test_plotting 91.63% <78.57%> (-0.01%) ⬇️
ubuntu-latest_3.10_test_plotting ?
ubuntu-latest_3.11_test_plotting ?
ubuntu-latest_3.12_test_plotting ?
ubuntu-latest_3.12_test_pre ?
ubuntu-latest_3.8_test_min 69.06% <78.57%> (+0.02%) ⬆️
ubuntu-latest_3.8_test_plot_min ?
ubuntu-latest_3.8_test_plotting ?
ubuntu-latest_3.9_test_plotting ?
windows-latest_3.10_test_plotting 91.64% <78.57%> (-0.01%) ⬇️
windows-latest_3.11_test_plotting ?
windows-latest_3.12_test_plotting 91.64% <78.57%> (-0.01%) ⬇️
windows-latest_3.8_test_plotting 91.60% <78.57%> (-0.01%) ⬇️
windows-latest_3.9_test_plotting ?

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.

@ymzayek ymzayek marked this pull request as ready for review December 6, 2023 12:25
Comment on lines +7 to +8
# TODO remove on pull request
pull_request:
Copy link
Member Author

Choose a reason for hiding this comment

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

Remove before merging PR

Suggested change
# TODO remove on pull request
pull_request:

@ymzayek
Copy link
Member Author

ymzayek commented Dec 6, 2023

The failure still seen here in the numpy2 job: test_decoder_binary_classification_with_masker_object
is actually related to an inconsistency between nilearn and scikit-learn dev version from their nightly releases which we have to use to test against numpy v2.0. All the numpy deprecations so far are dealt with in this PR so I'd rather merge this and deal with the sklearn deprecation separately

@Remi-Gau
Copy link
Collaborator

Remi-Gau commented Dec 6, 2023

Was following the commits of this to see where it was going. Thanks for taking care of that.

All the numpy deprecations so far are dealt with in this PR so I'd rather merge this and deal with the sklearn deprecation separately

Sounds like a sensible approach. You can even mark the test as xfail for this type of nightly release tests until this is fixed. Though maybe not necessary if you plan to do this in afollow up PR right away.

@ymzayek
Copy link
Member Author

ymzayek commented Dec 6, 2023

You can even mark the test as xfail for this type of nightly release tests until this is fixed

Actually yes good idea. I'll open up an issue to track the sklearn issue

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, thx

@bthirion
Copy link
Member

bthirion commented Dec 6, 2023

Merging, then.

@bthirion bthirion merged commit 069a6a7 into nilearn:main Dec 6, 2023
33 checks passed
@ymzayek ymzayek deleted the test_numpy2 branch December 7, 2023 09:24
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.

Testing against numpy 2.0
3 participants