From 964048e868e877721bef2cfe701de70537b574f5 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Fri, 12 Jul 2024 17:02:46 +0300 Subject: [PATCH] pyproject: move tool configurations --- pyproject.toml | 78 +++++++++++++++++++++++++++++++++++----- pytest.ini | 4 --- setup.cfg | 98 -------------------------------------------------- 3 files changed, 70 insertions(+), 110 deletions(-) delete mode 100644 pytest.ini delete mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml index aa8ab5bb..5e17361a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,4 @@ -[build-system +[build-system] build-backend = "setuptools.build_meta" requires = [ "setuptools>=63", @@ -22,7 +22,7 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python", - "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Information Analysis", "Topic :: Scientific/Engineering :: Mathematics", @@ -32,7 +32,7 @@ classifiers = [ ] dependencies = [ "arraycontext>=2021.1", - "gmsh_interop>=2021.1", + "gmsh-interop>=2021.1", "loopy>=2024.1", "modepy>=2021.1", "numpy", @@ -44,12 +44,8 @@ dependencies = [ [project.optional-dependencies] doc = [ "furo", - "sphinx-copybutton", "sphinx>=4", -] -visualization = [ - "h5py", - "pyvisfile>=2022.1", + "sphinx-copybutton", ] test = [ "mypy", @@ -57,6 +53,10 @@ test = [ "pytest", "ruff", ] +visualization = [ + "h5py", + "pyvisfile>=2022.1", +] [project.urls] Documentation = "https://documen.tician.de/meshmode" @@ -66,3 +66,65 @@ Repository = "https://github.com/inducer/meshmode" include = [ "meshmode*", ] + +[tool.isort] +known_firstparty = [ + "pytools", + "pyopencl", + "loopy", + "arraycontext", + "gmsh_interop", + "pyvisfile", + "modepy", + "pytato", + "pymbolic", + "pymetis", + "firedrake", +] +known_local_folder = [ "meshmode" ] +line_length = 85 +lines_after_imports = 2 +combine_as_imports = true +multi_line_output = 4 + +[tool.pytest.ini_options] +markers = [ + "mpi: test requires MPI", + "octave: test requires Octave", +] + +[tool.mypy] +python_version = "3.8" +warn_unused_ignores = true + +[[tool.mypy.overrides]] +module = [ + "meshmode.discretization.*", + "meshmode.dof_array.*", + "meshmode.interop.*", + "meshmode.mesh.*", +] +ignore_errors = true + +[[tool.mypy.overrides]] +module = [ + "FIAT.*", + "finat.*", + "firedrake.*", + "gmsh_interop.*", + "h5py.*", + "loopy.*", + "matplotlib.*", + "mayavi.*", + "mpl_toolkits.*", + "oct2py.*", + "pymbolic.*", + "pymetis.*", + "pyop2.*", + "pyopencl.*", + "pytential.*", + "pyvisfile.*", + "recursivenodes.*", + "scipy.*", +] +ignore_missing_imports = true diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index 51a2dab3..00000000 --- a/pytest.ini +++ /dev/null @@ -1,4 +0,0 @@ -[pytest] -markers = - mpi: test requires MPI - octave: test requires Octave diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index aba7af88..00000000 --- a/setup.cfg +++ /dev/null @@ -1,98 +0,0 @@ -[flake8] -ignore = E126,E127,E128,E123,E226,E241,E242,E265,W503,E402 -max-line-length=85 -exclude=meshmode/mesh/refinement/__init__.py - -inline-quotes = " -docstring-quotes = """ -multiline-quotes = """ - -# enable-flake8-bugbear -# enable-flake8-isort -# -[isort] -known_firstparty=pytools,pyopencl,loopy,arraycontext,gmsh_interop,pyvisfile,modepy,pytato,pymbolic,pymetis,firedrake -known_local_folder=meshmode -line_length = 85 -lines_after_imports = 2 -combine_as_imports = True -multi_line_output = 4 - -[mypy] -python_version = 3.8 -warn_unused_ignores = True - -[mypy-meshmode.discretization.*] -ignore_errors = True - -[mypy-meshmode.mesh] -ignore_errors = True - -[mypy-meshmode.mesh.generation] -ignore_errors = True - -[mypy-meshmode.mesh.visualization] -ignore_errors = True - -[mypy-meshmode.mesh.refinement.*] -ignore_errors = True - -[mypy-meshmode.interop.*] -ignore_errors = True - -[mypy-meshmode.dof_array] -ignore_errors = True - -[mypy-pyvisfile.*] -ignore_missing_imports = True - -[mypy-matplotlib.*] -ignore_missing_imports = True - -[mypy-mpl_toolkits.*] -ignore_missing_imports = True - -[mypy-firedrake.*] -ignore_missing_imports = True - -[mypy-pyop2.*] -ignore_missing_imports = True - -[mypy-finat.*] -ignore_missing_imports = True - -[mypy-FIAT.*] -ignore_missing_imports = True - -[mypy-loopy.*] -ignore_missing_imports = True - -[mypy-gmsh_interop.*] -ignore_missing_imports = True - -[mypy-scipy.*] -ignore_missing_imports = True - -[mypy-pymetis.*] -ignore_missing_imports = True - -[mypy-pymbolic.*] -ignore_missing_imports = True - -[mypy-recursivenodes.*] -ignore_missing_imports = True - -[mypy-mayavi.*] -ignore_missing_imports = True - -[mypy-h5py.*] -ignore_missing_imports = True - -[mypy-oct2py.*] -ignore_missing_imports = True - -[mypy-pyopencl.*] -ignore_missing_imports = True - -[mypy-pytential.*] -ignore_missing_imports = True -- GitLab