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 tests failing due to deprecations in pre-release dependencies #3746

Merged
merged 6 commits into from Jun 9, 2023

Conversation

ymzayek
Copy link
Member

@ymzayek ymzayek commented Jun 6, 2023

Closes #3745.

Fix test_resampling.py::test_resampling_nan
Fix test_html_report.py::test_nifti_maps_masker_report_list_and_arrays_maps_number

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 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 Jun 6, 2023

Codecov Report

Merging #3746 (1e57ca4) into main (6085633) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #3746      +/-   ##
==========================================
+ Coverage   91.57%   91.58%   +0.01%     
==========================================
  Files         139      139              
  Lines       16572    16596      +24     
  Branches     3236     3243       +7     
==========================================
+ Hits        15175    15199      +24     
  Misses       1394     1394              
  Partials        3        3              
Impacted Files Coverage Δ
nilearn/image/resampling.py 97.86% <100.00%> (ø)
nilearn/maskers/nifti_maps_masker.py 97.72% <100.00%> (+0.03%) ⬆️

... and 1 file with indirect coverage changes

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

@ymzayek ymzayek marked this pull request as ready for review June 7, 2023 09:15
@ymzayek
Copy link
Member Author

ymzayek commented Jun 7, 2023

I removed testing for the warning in test_resampling_nan because it is tested in the test that follows. But now it fails with another error but only on the prerelease job so maybe it is another thing associated with the numpy upgrade

or (
not isinstance(displayed_maps, str)
and np.all(displayed_maps != "all")
)
Copy link
Member

Choose a reason for hiding this comment

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

The logic here is abit complex. Cna you give plain word explanation of the intended behevior

Copy link
Member Author

Choose a reason for hiding this comment

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

I did it with the code. Is it clear enough like this?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Definitely clearer. To me at least.

@ymzayek
Copy link
Member Author

ymzayek commented Jun 8, 2023

Failure is unrelated. This should be ready to merge

@ymzayek ymzayek requested review from bthirion and Remi-Gau June 8, 2023 11:10
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.

This looks good to me.
Thanks @ymzayek

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 Jun 8, 2023

Do you understand the Azure failure ?

@ymzayek
Copy link
Member Author

ymzayek commented Jun 9, 2023

Ok thanks will merge

Do you understand the Azure failure ?

It's just the timeout issue (being addressed in #3747)

@ymzayek ymzayek merged commit 2d3f10c into nilearn:main Jun 9, 2023
27 of 29 checks passed
@ymzayek ymzayek deleted the prerelease-failures branch June 9, 2023 07:29
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Sep 30, 2023
https://build.opensuse.org/request/show/1103307
by user dgarcia + dimstar_suse
- Add numpy-1.25.patch, upstream patch gh#nilearn/nilearn#3746
- Add warning-based-sklearn-version.patch, upstream patch gh#nilearn/nilearn#3763
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.

Failure in pre-release dependencies CI job
3 participants