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

Compile against numpy 2.0 when building wheels, define target api version #5216

Merged
merged 2 commits into from May 16, 2024

Conversation

maxnoe
Copy link
Member

@maxnoe maxnoe commented Apr 16, 2024

This is needed to provide wheels that are compatible with both numpy 2.0 and 1.x.

Building will happen always against the newest version of numpy and wheels will be ABI compatible with numpy >= NPY_TARGET_VERSION

Description

This pull request ...

Dear reviewer

Copy link

codecov bot commented Apr 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.25%. Comparing base (662086a) to head (84c6ae8).
Report is 187 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5216       +/-   ##
===========================================
+ Coverage   75.12%   94.25%   +19.13%     
===========================================
  Files         234      234               
  Lines       34941    35224      +283     
===========================================
+ Hits        26248    33202     +6954     
+ Misses       8693     2022     -6671     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@QRemy QRemy added this to the 1.3 milestone May 14, 2024
Signed-off-by: Régis Terrier <rterrier@apc.in2p3.fr>
@registerrier
Copy link
Contributor

The devdeps tests now run locally once removing the astropy and numpy constraints.

There are numerous errors appearing. Most of them are due to the change in Quantity(copy=False) behavior. See: astropy/astropy#16167
We should follow the numpy 2.0 (and astropy) scheme of using Quantity(copy=None) to keep the same behavior.

Copy link
Contributor

@registerrier registerrier left a comment

Choose a reason for hiding this comment

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

Thanks @maxnoe . The devdeps tests are now properly run. I propose to solve the fails in a subsequent PR.

@registerrier registerrier merged commit a0e656c into gammapy:main May 16, 2024
15 of 16 checks passed
registerrier added a commit to registerrier/gammapy that referenced this pull request May 16, 2024
Compile against numpy 2.0 when building wheels, define target api version
registerrier added a commit that referenced this pull request May 16, 2024
Backport #5216: Compile against numpy 2.0 when building wheels, define target api version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants