From a8270007fae24ab9bf638af1676ab98ce05155a7 Mon Sep 17 00:00:00 2001 From: "Garth N. Wells" Date: Mon, 16 Oct 2023 15:33:51 +0100 Subject: [PATCH 1/5] Remove setup.cfg --- .flake8 | 6 +++++ pyproject.toml | 52 +++++++++++++++++++++++++++++++++++- setup.cfg | 71 -------------------------------------------------- 3 files changed, 57 insertions(+), 72 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/pyproject.toml b/pyproject.toml index cfcfb19c9..c1b3e8778 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,54 @@ [build-system] requires = ["setuptools>=62", "wheel"] - build-backend = "setuptools.build_meta" + +[project] +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" +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.finiteelement", + "ufl.formatting", + "ufl.legacy", + "ufl.utils", +] + +[pydocstyle] +convention = google + +[isort] +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 From a4c2cfdbd35ff52fd2773ee3ee9d2fd318406831 Mon Sep 17 00:00:00 2001 From: "Garth N. Wells" Date: Mon, 16 Oct 2023 15:38:52 +0100 Subject: [PATCH 2/5] Fixes --- pyproject.toml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c1b3e8778..322976eec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,9 +5,8 @@ build-backend = "setuptools.build_meta" [project] name = "fenics-ufl" version = "2023.3.0.dev0" -author = "FEniCS Project Contributors" -email = "fenics-dev@googlegroups.com" -maintainer = "FEniCS Project Steering Council" +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"} @@ -39,7 +38,7 @@ ci = [ packages = [ "ufl", "ufl.algorithms", - "ufl.core, + "ufl.core", "ufl.corealg", "ufl.finiteelement", "ufl.formatting", @@ -48,7 +47,7 @@ packages = [ ] [pydocstyle] -convention = google +convention = "google" [isort] line_length = 120 From b767de3aa7e11c77017596389e10b1427e56019f Mon Sep 17 00:00:00 2001 From: "Garth N. Wells" Date: Mon, 16 Oct 2023 15:57:57 +0100 Subject: [PATCH 3/5] Update doc check --- pyproject.toml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 322976eec..bbed7bf18 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,11 +43,10 @@ packages = [ "ufl.finiteelement", "ufl.formatting", "ufl.legacy", - "ufl.utils", -] + "ufl.utils",] -[pydocstyle] +[tool.pydocstyle] convention = "google" -[isort] +[itool.sort] line_length = 120 From 86314cfcc124876c0313f4c6a3da9795de4d3ee6 Mon Sep 17 00:00:00 2001 From: "Garth N. Wells" Date: Mon, 16 Oct 2023 16:07:22 +0100 Subject: [PATCH 4/5] CI fix --- .github/workflows/pythonapp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] From 7921525a3d6b6fc4201eee99c700052a3fd573a3 Mon Sep 17 00:00:00 2001 From: "Garth N. Wells" Date: Mon, 16 Oct 2023 16:12:19 +0100 Subject: [PATCH 5/5] Update --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index bbed7bf18..4fcaab701 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,10 +40,10 @@ packages = [ "ufl.algorithms", "ufl.core", "ufl.corealg", - "ufl.finiteelement", "ufl.formatting", "ufl.legacy", - "ufl.utils",] + "ufl.utils", +] [tool.pydocstyle] convention = "google"