AFM-SPM / TopoStats

An AFM image analysis program to batch process data and obtain statistics from images
https://afm-spm.github.io/TopoStats/
GNU Lesser General Public License v3.0
55 stars 10 forks source link

Preparation for Numpy2 #774

Closed ns-rse closed 5 months ago

ns-rse commented 5 months ago

Numpy2 is due to be released early later this year (first release candidate is scheduled 2024-02-01).

This may introduce some breaking changes, a broad overview is available here.

Mentioned in that article is that scikit-image has issues, which is indirect because the package has an optional dependency on matplotlib (I've discovered this whilst working on skan issues).

The official NumPy 2.0 migration guide — NumPy v2.0.dev0 Manual suggests that ruff can be leveraged to address the mentioned changes under Ruff Plugin.

To which end we may be able to check and anticipate any breaking changes by adding the following to pyproject.toml :

[tool.ruff.lint]
extend-select = ["NPY201"]
preview = true

After adding this the checks should be run using the pre-commit hook

pre-commit run --all-files ruff