nipy / nibabel

Python package to access a cacophony of neuro-imaging file formats
http://nipy.org/nibabel/
Other
646 stars 257 forks source link

Numpy 2.0-dev support and testing #1233

Closed effigies closed 9 months ago

effigies commented 1 year ago

With low PR activity, pre-release failures aren't getting noticed when failures are permitted. They will show up as red x's in PRs, but won't alert because the whole workflow "succeeds".

Numpy 1.25 seems to be breaking things. Will try to look into it soon.

effigies commented 1 year ago

An initial attempt to debug 1.25 locally has failed. Tests are all passing, but not on CI.

larsoner commented 1 year ago

NumPy 2.0 continues breaking stuff at a fairly rapid pace so this would be helpful :+1:

effigies commented 1 year ago

Yeah. We need to figure out how to keep the doctests from breaking en masse, or spend a bunch of time changing expected outputs. Otherwise, it's just a total nightmare. See #1242.

effigies commented 10 months ago

Pre-releases are no longer soft failures, but we are not testing on numpy 2.0. I'm a bit inclined to hold off until the dust settles and they have a release candidate...

larsoner commented 10 months ago

we are not testing on numpy 2.0. I'm a bit inclined to hold off until the dust settles and they have a release candidate...

One problem with this is that downstream packages that use Nibabel (e.g., MNE, dipy) will could have problems testing against numpy 2.0 in the meantime :( In MNE nibabel is an optional dependency and our tests have decorators so we would "just" have to uninstall / not install nibabel in our pip-pre runs for a while. Not sure what the fallout would be for dipy or other packages, though.

effigies commented 10 months ago

Fair point. I don't have much spare bandwidth for this, but I don't want to be a blocker for y'all. Maybe I could deputize a pair of MNE/dipy representatives to work through issues and review and merge each others' PRs?

I assume you just need fixes in master, not in a release until numpy releases....

cc @skoudoro as a dipy representative contact.

@ymzayek / @remi-gau Is nilearn looking to test against numpy 2.0-dev before a release candidate comes out?

larsoner commented 10 months ago

I'm happy to submit and/or review PRs as needed. @effigies we could create a pip-pre/numpy 2.0 run and leave it as non-required in your branch protection rules (assuming you have them) so if it takes a few days to fix you can continue normal development. Still annoying to have a run red that you have to ignore, but maybe okay?

effigies commented 10 months ago

I'm very good at ignoring red flags. :-) Just added a tox environment in #1267. Feel free to merge or build on that. It looks like you have all the permissions you need already.

Remi-Gau commented 10 months ago

@ymzayek / @Remi-Gau Is nilearn looking to test against numpy 2.0-dev before a release candidate comes out?

the issue has not come up yet but I could add it to our dev meeting agenda

skoudoro commented 10 months ago

Maybe I could deputize a pair of MNE/dipy representatives to work through issues and review and merge each others' PRs?

ok with that, we started to look and fix numpy 2.0-dev issue on DIPY. just tag me and I will be happy to review nibabel + numpy 2.0 PRs

for now, we still focus on fixing issue with python 3.12 + meson, but it should be done soon

effigies commented 10 months ago

For reference, numpy has a post for people interested in keeping up with numpy 2.0-dev:

effigies commented 9 months ago

2.0-dev tests are part of the CI now.