diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 246e735..1d23fa0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -31,7 +31,7 @@ jobs: - name: Install Dependencies run: | python -m pip install --upgrade pip - python -m pip install ".[docs]" + python -m pip install "." --group docs sudo apt install graphviz --yes - name: Build Docs diff --git a/pyproject.toml b/pyproject.toml index f76831a..72c8dd1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,9 +2,58 @@ requires = ["setuptools", "setuptools_scm"] build-backend = "setuptools.build_meta" +[project] +name = "napari-matplotlib" +description = "A plugin to use Matplotlib with napari" +readme = "README.md" +requires-python = ">=3.11" +license = { text = "BSD-3-Clause" } +authors = [ + { name = "David Stansby", email = "d.stansby@ucl.ac.uk" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Framework :: napari", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Software Development :: Testing", +] +dependencies = [ + "matplotlib", + "napari>=0.5", + "numpy>=1.23", + "tinycss2", +] +dynamic = ["version"] + +[project.urls] +"Bug Tracker" = "https://github.com/matplotlib/napari-matplotlib/issues" +Documentation = "https://napari-matplotlib.github.io" +"Source Code" = "https://github.com/matplotlib/napari-matplotlib" +"User Support" = "https://github.com/matplotlib/napari-matplotlib/issues" + +[project.entry-points."napari.manifest"] +"napari-matplotlib" = "napari_matplotlib:napari.yaml" + [tool.setuptools_scm] write_to = "src/napari_matplotlib/_version.py" +[tool.setuptools] +include-package-data = true + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.setuptools.package-dir] +"" = "src" + +[tool.setuptools.package-data] +"*" = ["*.yaml"] + [tool.pytest.ini_options] filterwarnings = [ "error", @@ -74,3 +123,31 @@ enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] [[tool.mypy.overrides]] module = ["napari_matplotlib/tests/*"] disallow_untyped_defs = false + +[dependency-groups] +docs = [ + "napari[all]", + "numpydoc", + "pydantic<2", + "pydata-sphinx-theme", + "sphinx", + "sphinx-automodapi", + "sphinx-gallery", +] +testing = [ + "napari[pyqt6_experimental]>=0.4.18", + "pooch", + "pyqt6", + "pytest", + "pytest-cov", + "pytest-mock", + "pytest-mpl", + "pytest-qt", + "tox", + "tox-uv", + "pytest-xvfb; sys_platform == 'linux'", +] +dev = [ + {include-group = "testing"}, + {include-group = "docs"}, +] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 5ccef5c..0000000 --- a/setup.cfg +++ /dev/null @@ -1,70 +0,0 @@ -[metadata] -name = napari-matplotlib -description = A plugin to use Matplotlib with napari -long_description = file: README.md -long_description_content_type = text/markdown -url = https://github.com/matplotlib/napari-matplotlib -author = David Stansby -author_email = d.stansby@ucl.ac.uk -license = BSD-3-Clause -license_files = LICENSE -classifiers = - Development Status :: 5 - Production/Stable - Framework :: napari - Intended Audience :: Developers - License :: OSI Approved :: BSD License - Operating System :: OS Independent - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: 3 :: Only - Topic :: Software Development :: Testing -project_urls = - Bug Tracker = https://github.com/matplotlib/napari-matplotlib/issues - Documentation = https://napari-matplotlib.github.io - Source Code = https://github.com/matplotlib/napari-matplotlib - User Support = https://github.com/matplotlib/napari-matplotlib/issues - -[options] -packages = find: -install_requires = - matplotlib - napari>=0.5 - numpy>=1.23 - tinycss2 -python_requires = >=3.11 -include_package_data = True -package_dir = - =src -setup_requires = - setuptools-scm - -[options.packages.find] -where = src - -[options.entry_points] -napari.manifest = - napari-matplotlib = napari_matplotlib:napari.yaml - -[options.extras_require] -docs = - napari[all] - numpydoc - pydantic<2 - pydata-sphinx-theme - sphinx - sphinx-automodapi - sphinx-gallery -testing = - napari[pyqt6_experimental]>=0.4.18 - pooch - pyqt6 - pytest - pytest-cov - pytest-mock - pytest-mpl - pytest-qt - tox - pytest-xvfb;sys_platform == 'linux' - -[options.package_data] -* = *.yaml diff --git a/tox.ini b/tox.ini index 1ad69a4..881ca61 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] @@ -9,6 +9,6 @@ python = 3.13: py313 [testenv] -extras = testing +dependency_groups = testing commands = python -m pytest --mpl --mpl-generate-summary=html --mpl-results-path={toxinidir}/reports -v --color=yes --cov=napari_matplotlib --cov-report=xml