diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dcc24e..fb07c8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ ### Internal changes +- Consolidate package metadata and configuration in *pyproject.toml* ([#165](https://github.com/mpytools/mplotutils/pull/165)). - Replace deprecated `matplotlib.rcsetup.all_backends` with `matplotlib.backends.backend_registry.list_builtin()` ([#160](https://github.com/mpytools/mplotutils/pull/160)). - Also upload coverage report in upstream dev CI ([#162](https://github.com/mpytools/mplotutils/pull/162)). diff --git a/docs/installation.md b/docs/installation.md index 70af9aa..1fb1273 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -6,11 +6,11 @@ - [cartopy](http://scitools.org.uk/cartopy/) (0.23 or later) - [matplotlib](http://matplotlib.org/) (3.9 or later) - [numpy](http://www.numpy.org/) (1.26 or later) +- [xarray](http://xarray.pydata.org/) (2024.7 or later) ## Optional dependencies - [seaborn](https://seaborn.pydata.org/) (0.13 or later) -- [xarray](http://xarray.pydata.org/) (2024.7 or later) ## Instructions diff --git a/pyproject.toml b/pyproject.toml index d5bce08..a51a7ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,68 @@ +[project] +name = "mplotutils" +authors = [{name = "mplotutils developers", email = "mathias.hauser@env.ethz.com"}] +license = "GPL-3.0-only" +keywords = ['matplotlib cartopy plotting'] +description = "utilities for matplotlib and cartopy" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Operating System :: OS Independent", + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Topic :: Scientific/Engineering", + "Topic :: Scientific/Engineering :: Atmospheric Science", + "Topic :: Scientific/Engineering :: GIS", +] +requires-python = ">=3.11" +dependencies = [ + "cartopy >=0.23", + "matplotlib >=3.9", + "packaging >= 23.1", + "numpy >=1.26", + "xarray >=2024.7", +] +dynamic = ["version"] + +[project.readme] +file = "README.md" +content-type = "text/markdown" + +[project.urls] +Homepage = "https://github.com/mpytools/mplotutils" +Documentation = "https://github.com/mpytools/mplotutils" +Source = "https://github.com/mpytools/mplotutils" +BugReports = "https://github.com/mpytools/mplotutils/issues" + +[project.optional-dependencies] +full = [ + "seaborn", +] + +[dependency-groups] +# docs = [ + # "mplotutils[full]", + # dependencies to build the docs + # "numpydoc", + # "sphinx", +# ] +tests = [ + "pytest-cov", + "pytest-xdist", + "pytest", +] +dev = [ + "regionmask[full, tests]", # docs + "black !=23", + "ruff", +] + +[tool.setuptools.packages] +find = {namespaces = false} # Disable implicit namespaces + [build-system] requires = [ "setuptools>=42", @@ -42,3 +107,8 @@ log_cli_level = "INFO" filterwarnings = [ "ignore:numpy.ufunc size changed, may indicate binary incompatibility.:RuntimeWarning" ] + +[tool.coverage.run] +omit = [ + "*/mplotutils/tests/*", +] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index d006210..0000000 --- a/requirements.txt +++ /dev/null @@ -1,8 +0,0 @@ -# This file is redundant with setup.cfg; -# it exists to let GitHub build the repository dependency graph -# https://help.github.com/en/github/visualizing-repository-data-with-graphs/listing-the-packages-that-a-repository-depends-on - -cartopy >= 0.23 -matplotlib >= 3.9 -numpy >= 1.26 -xarray >= 2024.7 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 66e8299..0000000 --- a/setup.cfg +++ /dev/null @@ -1,34 +0,0 @@ -[metadata] -name = mplotutils -description = utilities for matplotlib and cartopy -author = mathause -author_email = mathias.hauser@env.ethz.com -license = GPLv3 -url = https://github.com/mpytools/mplotutils -long_description_content_type=text/markdown -long_description = file: README.md -classifiers = - Development Status :: 4 - Beta - License :: OSI Approved :: MIT License - Operating System :: OS Independent - Intended Audience :: Science/Research - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.11 - Programming Language :: Python :: 3.12 - Programming Language :: Python :: 3.13 - -[options] -packages = find: -zip_safe = False # https://mypy.readthedocs.io/en/latest/installed_packages.html -include_package_data = True -python_requires = >=3.11 -install_requires = - cartopy >=0.23 - matplotlib >=3.9 - numpy >=1.26 - xarray >=2024.7 - -[coverage:run] -omit = - */tests/*, diff --git a/setup.py b/setup.py deleted file mode 100644 index cfccdc5..0000000 --- a/setup.py +++ /dev/null @@ -1,3 +0,0 @@ -from setuptools import setup - -setup(use_scm_version={"fallback_version": "999", "version_scheme": "no-guess-dev"})