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

Added ruff rule to check for numpy2.0 compatibility #227

Merged
merged 1 commit into from
Jun 18, 2024
Merged

Added ruff rule to check for numpy2.0 compatibility #227

merged 1 commit into from
Jun 18, 2024

Conversation

niksirbi
Copy link
Member

@niksirbi niksirbi commented Jun 18, 2024

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?

Numpy 2.0 was released yesterday, containing some breaking API changes (syntax deprecations).

The Numpy devs have written a migration guide, and have even provided a ruff linting rule - NPY201 - that "Checks for uses of NumPy functions and constants that were removed from the main namespace in NumPy 2.0".

What does this PR do?

It add NPY201 to the ruff lint config.

I also run pre-commit run -a and thankfully nothing came up. Nevertheless I'll leave this rule in, so that no deprecated syntax creeps in.

References

n/a

How has this PR been tested?

Existing tests pass locally and in CI.

Is this a breaking change?

No.

Does this PR require an update to the documentation?

No.

Checklist:

  • The code has been tested locally
  • [/] Tests have been added to cover all new functionality
  • [/] The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

codecov bot commented Jun 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.70%. Comparing base (ba10263) to head (0a562e8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #227   +/-   ##
=======================================
  Coverage   99.70%   99.70%           
=======================================
  Files          12       12           
  Lines         678      678           
=======================================
  Hits          676      676           
  Misses          2        2           

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

@niksirbi niksirbi marked this pull request as ready for review June 18, 2024 12:08
@niksirbi niksirbi requested a review from sfmig June 18, 2024 12:08
Copy link
Contributor

@sfmig sfmig left a comment

Choose a reason for hiding this comment

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

these numpy folks are amazing ✨
thanks Niko! 🚀

@sfmig sfmig added this pull request to the merge queue Jun 18, 2024
Merged via the queue into main with commit 2e406e1 Jun 18, 2024
27 checks passed
@sfmig sfmig deleted the numpy2 branch June 18, 2024 17: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.

2 participants