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

BLD: Unpin numpy 2 #1285

Merged
merged 4 commits into from
Jan 8, 2025
Merged

BLD: Unpin numpy 2 #1285

merged 4 commits into from
Jan 8, 2025

Conversation

jcrivenaes
Copy link
Collaborator

@jcrivenaes jcrivenaes commented Jan 7, 2025

This PR replaces #1233

Resolves #1209

This unpins numpy<2 and builds the SWIG C library against numpy >= 2.0.0. Versions of numpy major 2 are backward compatible with numpy 1 with respect to the C api. Hence we should not see issues in environments where numpy<2 may be maintained for years to come, i.e. RMS environments.

The numpy SWIG bindings committed in this repository are not out-of-date in a way that would break compatibility. The last update to them in numpy's repository was two years ago from the time of this commit.

The PR has been manually tested with RMS 14.2, which applies python 3.11 and numpy==1.24.

As a consequence of supporting numpy>=2 this PR deprecates support for Python 3.8, which hits EOL on October 2024.

This unpins numpy<2 and builds the SWIG C library against numpy >=
2.0.0. Versions of numpy major 2 are backward compatible with numpy
1. Hence we should not see issues in environment where numpy<2 may be
maintained for years to come, i.e. RMS environments.

The numpy SWIG bindings committed in this repository are not out-of-date
in a way that would break compatibility. The last update to them in
numpy's repository was two years ago from the time of this commit.
@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.15%. Comparing base (0375fed) to head (cfcc440).
Report is 55 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1285      +/-   ##
==========================================
+ Coverage   80.02%   81.15%   +1.12%     
==========================================
  Files          98       94       -4     
  Lines       13680    12438    -1242     
  Branches     2203     1874     -329     
==========================================
- Hits        10948    10094     -854     
+ Misses       1999     1685     -314     
+ Partials      733      659      -74     

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

mock_file,
keywords=["PROP"],
) as kw:
with (
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

RUFF formatting here (and further)

@jcrivenaes jcrivenaes requested a review from mferrera January 8, 2025 10:56
@jcrivenaes jcrivenaes changed the title Unpin numpy 2 (new PR) BLD: Unpin numpy 2 (new PR) Jan 8, 2025
@jcrivenaes jcrivenaes changed the title BLD: Unpin numpy 2 (new PR) BLD: Unpin numpy 2 Jan 8, 2025
@jcrivenaes jcrivenaes merged commit ffb9cbc into equinor:main Jan 8, 2025
34 checks passed
@jcrivenaes jcrivenaes deleted the unpin-numpy-2-jriv branch January 8, 2025 11:09
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.

Unpin numpy <2
3 participants