diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0f5d5e3c..9ebed4fa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,17 +40,12 @@ repos: rev: 5.12.0 hooks: - id: isort - # - repo: https://github.com/dhruvmanila/remove-print-statements - # rev: 'v0.5.0' - # hooks: - # - id: remove-print-statements - # args: ['--verbose'] # Show all the print statements to be removed - repo: https://github.com/psf/black - rev: 23.9.1 + rev: 23.10.0 hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.0.292' + rev: 'v0.1.1' hooks: - id: ruff - repo: https://github.com/PyCQA/flake8 @@ -90,7 +85,7 @@ repos: # - flake8-use-fstring - pep8-naming - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.6.0 + rev: v1.6.1 hooks: - id: mypy # - repo: https://github.com/Lucas-C/pre-commit-hooks-markup @@ -101,14 +96,22 @@ repos: rev: "0.49" hooks: - id: check-manifest + - repo: https://github.com/abravalheri/validate-pyproject + rev: v0.15 + hooks: + - id: validate-pyproject + - repo: https://github.com/kieran-ryan/pyprojectsort + rev: v0.3.0 + hooks: + - id: pyprojectsort - repo: https://github.com/python-jsonschema/check-jsonschema rev: "0.27.0" hooks: - id: check-github-workflows - id: check-github-actions - id: check-readthedocs - # - repo: https://github.com/regebro/pyroma - # rev: "4.1" - # hooks: - # - id: pyroma + - repo: https://github.com/regebro/pyroma + rev: "4.2" + hooks: + - id: pyroma ... diff --git a/pyproject.toml b/pyproject.toml index a0b606d2..4cee34cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,16 +1,18 @@ [build-system] -requires = ["setuptools>=61.2"] build-backend = "setuptools.build_meta" +requires = [ + "setuptools>=61.2", +] [project] -name = "pygeoif" -version = "1.1.1" -authors = [{name = "Christian Ledermann", email = "christian.ledermann@gmail.com"}] -license = {text = "LGPL"} -description = "A basic implementation of the __geo_interface__" -keywords = ["GIS", "Spatial", "WKT"] +authors = [ + { email = "christian.ledermann@gmail.com", name = "Christian Ledermann" }, +] classifiers = [ - "Topic :: Scientific/Engineering :: GIS", + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", + "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", @@ -21,78 +23,103 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", - "Intended Audience :: Developers", - "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", - "Development Status :: 5 - Production/Stable", - "Operating System :: OS Independent", + "Topic :: Scientific/Engineering :: GIS", +] +dependencies = [ + "typing_extensions", +] +description = "A basic implementation of the __geo_interface__" +keywords = [ + "GIS", + "Spatial", + "WKT", ] -urls = {Homepage = "https://github.com/cleder/pygeoif/"} +name = "pygeoif" requires-python = ">=3.7" -dependencies = ["typing_extensions"] +version = "1.1.1" -[project.readme] -file = "README.rst" -content-type = "text/x-rst" +[project.license] +text = "LGPL" [project.optional-dependencies] -testing = ["pytest"] +testing = [ + "pytest", +] -[tool.setuptools] -zip-safe = true -include-package-data = true +[project.readme] +content-type = "text/x-rst" +file = "README.rst" -[tool.setuptools.packages.find] -exclude = ["ez_setup", "docs"] # examples; tests -namespaces = false +[project.urls] +Homepage = "https://github.com/cleder/pygeoif/" [tool.check-manifest] -ignore = [".*", "mutmut_config.py", "test-requirements.txt", "tox.ini"] +ignore = [ + ".*", + "mutmut_config.py", + "test-requirements.txt", + "tox.ini", +] [tool.flake8] max_line_length = 88 [tool.isort] -line_length = 88 force_single_line = true +line_length = 88 [tool.mypy] disallow_any_generics = true -disallow_untyped_calls = true -disallow_untyped_defs = true disallow_incomplete_defs = true +disallow_untyped_calls = true disallow_untyped_decorators = true +disallow_untyped_defs = true ignore_errors = false ignore_missing_imports = false implicit_reexport = false -strict_optional = true -strict_equality = true no_implicit_optional = true -warn_unused_ignores = true -warn_redundant_casts = true -warn_unused_configs = true -warn_unreachable = true +overrides = [ + { disallow_untyped_defs = false, ignore_errors = true, module = "tests.*" }, +] +show_error_codes = true +strict_equality = true +strict_optional = true warn_no_return = true +warn_redundant_casts = true warn_return_any = true -show_error_codes = true - -[[tool.mypy.overrides]] -module = "tests.*" -disallow_untyped_defs = false -ignore_errors = true +warn_unreachable = true +warn_unused_configs = true +warn_unused_ignores = true [tool.pyright] -include = ["pygeoif"] -exclude = ["**/node_modules", +exclude = [ "**/__pycache__", - ".pytype", + "**/node_modules", ".pyre", - "pygeoif/tests" + ".pytype", + "pygeoif/tests", +] +include = [ + "pygeoif", ] reportMissingImports = true reportMissingTypeStubs = true -[tool.ruff] - [tool.ruff.per-file-ignores] -"tests/*.py" = ["D103"] -"setup.py" = ["E501"] +"setup.py" = [ + "E501", +] +"tests/*.py" = [ + "D103", +] + +[tool.setuptools] +include-package-data = true +zip-safe = true + +[tool.setuptools.packages.find] +exclude = [ + "docs", + "ez_setup", +] +namespaces = false