diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 69a1ba6..f132fba 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,7 +27,7 @@ repos: - id: blackdoc - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.3 + rev: v0.4.7 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -39,7 +39,7 @@ repos: language_version: python3 - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell args: @@ -51,7 +51,7 @@ repos: - id: add-trailing-comma - repo: https://github.com/tox-dev/pyproject-fmt - rev: "1.8.0" + rev: "2.1.3" hooks: - id: pyproject-fmt diff --git a/pyproject.toml b/pyproject.toml index 8da54a8..c85886f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ build-backend = "setuptools.build_meta" requires = [ "setuptools>=42", - "setuptools_scm[toml]>=3.4", + "setuptools-scm[toml]>=3.4", "wheel", ] @@ -10,9 +10,9 @@ requires = [ name = "xpublish-intake-provider" description = "Use Intake catalogs to load datasets into Xpublish" readme = "README.md" -license = {file = "LICENSE.txt"} +license = { file = "LICENSE.txt" } authors = [ - {name = "Alex Kerney", email = "akerney@gmri.org"}, + { name = "Alex Kerney", email = "akerney@gmri.org" }, ] requires-python = ">=3.9" classifiers = [ @@ -26,17 +26,20 @@ dynamic = [ "dependencies", "version", ] -[project.urls] -homepage = "https://github.com/xpublish-community/xpublish-intake-provider" -repository = "https://github.com/xpublish-community/xpublish-intake-provider" +urls.homepage = "https://github.com/xpublish-community/xpublish-intake-provider" +urls.repository = "https://github.com/xpublish-community/xpublish-intake-provider" [tool.setuptools] -packages = ["xpublish_intake_provider"] +packages = [ + "xpublish_intake_provider", +] zip-safe = false include-package-data = true [tool.setuptools.dynamic] -dependencies = { file = ["requirements.txt"] } +dependencies = { file = [ + "requirements.txt", +] } [tool.setuptools_scm] write_to = "xpublish_intake_provider/_version.py" @@ -46,37 +49,43 @@ write_to_template = "__version__ = '{version}'" line-length = 100 [tool.ruff] -select = [ - "A", # flake8-builtins - "B", # flake8-bugbear - "C4", # flake8-comprehensions - "D", # pydocstyle - "E", # pycodestyle - "F", # pyflakes - "I", # isort - "PL", # pylint - "T20", # flake8-print - "UP", # pyupgrade - "W", # pycodestyle warnings -] line-length = 100 -[tool.ruff.per-file-ignores] -"docs/source/conf.py" = ["E402", "D100", "A001"] -"tests/*.py" = ["PLR2004", "D103", "D100"] - -[tool.ruff.pydocstyle] -# Use Google-style docstrings. -convention = "google" - -[tool.ruff.flake8-bugbear] +select = [ + "A", # flake8-builtins + "B", # flake8-bugbear + "C4", # flake8-comprehensions + "D", # pydocstyle + "E", # pycodestyle + "F", # pyflakes + "I", # isort + "PL", # pylint + "T20", # flake8-print + "UP", # pyupgrade + "W", # pycodestyle warnings +] # Allow fastapi.Depends and other dependency injection style function arguments -extend-immutable-calls = ["fastapi.Depends", "fastapi.Query"] +flake8-bugbear.extend-immutable-calls = [ + "fastapi.Depends", + "fastapi.Query", +] +per-file-ignores."docs/source/conf.py" = [ + "E402", + "D100", + "A001", +] +per-file-ignores."tests/*.py" = [ + "PLR2004", + "D103", + "D100", +] +# Use Google-style docstrings. +pydocstyle.convention = "google" [tool.check-manifest] ignore = [ "xpublish_intake_provider/_version.py", - "xpublish_intake_provider/**/__pycache__/*.pyc" + "xpublish_intake_provider/**/__pycache__/*.pyc", ] [tool.interrogate] @@ -87,7 +96,11 @@ ignore-semiprivate = false ignore-private = false ignore-module = false fail-under = 95 -exclude = ["setup.py", "docs", "tests"] +exclude = [ + "setup.py", + "docs", + "tests", +] verbose = 1 quiet = false color = true