neuroinformatics-unit / movement

Python tools for analysing body movements across space and time
http://movement.neuroinformatics.dev
BSD 3-Clause "New" or "Revised" License
77 stars 7 forks source link

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

Closed niksirbi closed 1 week ago

niksirbi commented 1 week ago

Description

What is this PR

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:

sonarcloud[bot] commented 1 week ago

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

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.