diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 220acc6..ee5dabf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.13.1 + rev: v0.14.10 hooks: - id: ruff-format @@ -17,14 +17,14 @@ repos: - id: napari-plugin-checks - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.18.2 + rev: v1.19.1 hooks: - - id: mypy - additional_dependencies: [numpy, matplotlib] + - id: mypy + additional_dependencies: [numpy>=2.1, matplotlib] - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: 'v0.13.1' + rev: "v0.14.10" hooks: - id: ruff diff --git a/README.md b/README.md index fb7aa63..c4e1599 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,15 @@ [![Python Version](https://img.shields.io/pypi/pyversions/napari-matplotlib.svg?color=green)](https://python.org) [![tests](https://github.com/matplotlib/napari-matplotlib/workflows/tests/badge.svg)](https://github.com/matplotlib/napari-matplotlib/actions) [![codecov](https://codecov.io/gh/matplotlib/napari-matplotlib/branch/main/graph/badge.svg)](https://codecov.io/gh/matplotlib/napari-matplotlib) -[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/matplotlib/pytest-mpl/master.svg)](https://results.pre-commit.ci/latest/github/matplotlib/pytest-mpl/master) [![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-matplotlib)](https://napari-hub.org/plugins/napari-matplotlib) +[![SPEC 0 — Minimum Supported Dependencies](https://img.shields.io/badge/SPEC-0-green?labelColor=%23004811&color=%235CA038)](https://scientific-python.org/specs/spec-0000/) A plugin to create Matplotlib plots from napari layers ----------------------------------- +--- ## Introduction + `napari-matplotlib` is a bridge between `napari` and `matplotlib`, making it easy to create publication quality `Matplotlib` plots based on the data loaded in `napari` layers. Documentation can be found at https://napari-matplotlib.github.io/ @@ -33,9 +34,7 @@ If you encounter any problems, please [file an issue] along with a detailed desc [@napari]: https://github.com/napari [BSD-3]: http://opensource.org/licenses/BSD-3-Clause - [file an issue]: https://github.com/dstansby/napari-matplotlib/issues - [napari]: https://github.com/napari/napari [tox]: https://tox.readthedocs.io/en/latest/ [pip]: https://pypi.org/project/pip/ diff --git a/pyproject.toml b/pyproject.toml index f76831a..a53b658 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,8 +14,6 @@ filterwarnings = [ "ignore:`np.bool8` is a deprecated alias for `np.bool_`:DeprecationWarning", # Coming from pydantic via napari "ignore:Pickle, copy, and deepcopy support will be removed from itertools in Python 3.14.:DeprecationWarning", - # Until we stop supporting older numpy versions (<2.1) - "ignore:(?s).*`newshape` keyword argument is deprecated.*$:DeprecationWarning", ] qt_api = "pyqt6" addopts = [ diff --git a/setup.cfg b/setup.cfg index 5ccef5c..a8224da 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,7 +29,7 @@ packages = find: install_requires = matplotlib napari>=0.5 - numpy>=1.23 + numpy>=2 tinycss2 python_requires = >=3.11 include_package_data = True @@ -56,6 +56,7 @@ docs = sphinx-gallery testing = napari[pyqt6_experimental]>=0.4.18 + numpy>=2.1 pooch pyqt6 pytest diff --git a/src/napari_matplotlib/tests/helpers.py b/src/napari_matplotlib/tests/helpers.py index b00c0af..e1fcb81 100644 --- a/src/napari_matplotlib/tests/helpers.py +++ b/src/napari_matplotlib/tests/helpers.py @@ -15,7 +15,7 @@ def fig_to_array(fig: Figure) -> npt.NDArray[np.uint8]: io_buf.seek(0) img_arr: npt.NDArray[np.uint8] = np.reshape( np.frombuffer(io_buf.getvalue(), dtype=np.uint8), - newshape=(int(fig.bbox.bounds[3]), int(fig.bbox.bounds[2]), -1), + shape=(int(fig.bbox.bounds[3]), int(fig.bbox.bounds[2]), -1), ) return img_arr diff --git a/tox.ini b/tox.ini index 1ad69a4..e347ead 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{310,311,312} +envlist = py{311,312,313} isolated_build = true [gh-actions]