nipy / nibabel

Python package to access a cacophony of neuro-imaging file formats

Home Page:http://nipy.org/nibabel/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Numpy 2.0-dev support and testing

effigies opened this issue · comments

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.

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

NumPy 2.0 continues breaking stuff at a fairly rapid pace so this would be helpful 👍

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.

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...

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.

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?

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?

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.

@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

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

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

2.0-dev tests are part of the CI now.