From f132188759a248d6edfc6eaf05e623b898bfcffd Mon Sep 17 00:00:00 2001 From: "Garth N. Wells" Date: Mon, 16 Oct 2023 17:22:16 +0100 Subject: [PATCH] Remove `setup.cfg` (#223) * Remove setup.cfg * Fixes * Update doc check * CI fix * Update --- .flake8 | 6 +++ .github/workflows/pythonapp.yml | 2 +- pyproject.toml | 50 ++++++++++++++++++++++- setup.cfg | 71 --------------------------------- 4 files changed, 56 insertions(+), 73 deletions(-) create mode 100644 .flake8 delete mode 100644 setup.cfg diff --git a/.flake8 b/.flake8 new file mode 100644 index 000000000..cd8e21ed8 --- /dev/null +++ b/.flake8 @@ -0,0 +1,6 @@ +[flake8] +max-line-length = 120 +builtins = ufl +exclude = doc/sphinx/source/conf.py +per-file-ignores = + */__init__.py: F401 diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index 1d916b7b5..032bec747 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -34,7 +34,7 @@ jobs: flake8 --statistics . - name: Check documentation style run: | - python -m pip install pydocstyle + python -m pip install pydocstyle[toml] python -m pydocstyle ufl/ - name: Install UFL run: python -m pip install .[ci] diff --git a/pyproject.toml b/pyproject.toml index cfcfb19c9..4fcaab701 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,52 @@ [build-system] requires = ["setuptools>=62", "wheel"] - build-backend = "setuptools.build_meta" + +[project] +name = "fenics-ufl" +version = "2023.3.0.dev0" +authors = [{email="fenics-dev@googlegroups.com"}, {name="FEniCS Project"}] +maintainers = [{email="fenics-dev@googlegroups.com"}, {name="FEniCS Project Steering Council"}] +description = "Unified Form Language" +readme = "README.rst" +license = {file = "LICENSE"} +requires-python = ">=3.8.0" +dependencies = ["numpy"] + +[project.urls] +homepage = "https://fenicsproject.org" +repository = "https://github.com/fenics/ufl.git" +documentation = "https://docs.fenicsproject.org" +issues = "https://github.com/FEniCS/ufl/issues" +funding = "https://numfocus.org/donate" + +[project.optional-dependencies] +lint = ["flake8", "pydocstyle[toml]"] +docs = ["sphinx", "sphinx_rtd_theme"] +test = ["pytest"] +ci = [ + "coveralls", + "coverage", + "pytest-cov", + "pytest-xdist", + "fenics-ufl[docs]", + "fenics-ufl[lint]", + "fenics-ufl[test]", +] + +[tool.setuptools] +packages = [ + "ufl", + "ufl.algorithms", + "ufl.core", + "ufl.corealg", + "ufl.formatting", + "ufl.legacy", + "ufl.utils", +] + +[tool.pydocstyle] +convention = "google" + +[itool.sort] +line_length = 120 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 4bbece177..000000000 --- a/setup.cfg +++ /dev/null @@ -1,71 +0,0 @@ -# Setuptools does not yet support modern pyproject.toml but will do so in the -# future -[metadata] -name = fenics-ufl -version = 2023.3.0.dev0 -author = FEniCS Project Contributors -email = fenics-dev@googlegroups.com -maintainer = FEniCS Project Steering Council -description = Unified Form Language -url = https://github.com/FEniCS/ufl -project_urls = - Homepage = https://fenicsproject.org - Documentation = https://fenics.readthedocs.io/projects/ufl - Issues = https://github.com/FEniCS/ufl/issues - Funding = https://numfocus.org/donate -long_description = file: README.rst -long_description_content_type = text/x-rst -license=LGPL-3.0-or-later -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - Intended Audience :: Science/Research - License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+) - Operating System :: POSIX - Operating System :: POSIX :: Linux - Operating System :: MacOS :: MacOS X - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Topic :: Scientific/Engineering :: Mathematics - Topic :: Software Development :: Libraries :: Python Modules - -[options] -packages = find: -include_package_data = True -zip_safe = False -python_requires = >= 3.8 -setup_requires = - setuptools >= 62 - wheel -install_requires = - numpy - -[options.extras_require] -docs = sphinx; sphinx_rtd_theme -lint = flake8; pydocstyle[toml] -test = pytest -ci = - coverage - coveralls - pytest-cov - pytest-xdist - fenics-ufl[docs] - fenics-ufl[lint] - fenics-ufl[test] - -[flake8] -max-line-length = 120 -builtins = ufl -exclude = doc/sphinx/source/conf.py -per-file-ignores = - */__init__.py: F401 - -[pydocstyle] -convention = google - -[isort] -line_length = 120