Skip to content

Commit

Permalink
Add Pyproject pre-commit hooks (#9840)
Browse files Browse the repository at this point in the history
* add taplo pre-commit hook

* move TODO

tamasfe/taplo#706

* add validate-pyproject pre-commit hook
  • Loading branch information
VeckoTheGecko authored Dec 3, 2024
1 parent 66e13a2 commit 99ee8c6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,13 @@ repos:
rev: ebf0b5e44d67f8beaa1cd13a0d0393ea04c6058d
hooks:
- id: validate-cff
- repo: https://github.com/ComPWA/taplo-pre-commit
rev: v0.9.3
hooks:
- id: taplo-format
args: ["--option", "array_auto_collapse=false"]
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.23
hooks:
- id: validate-pyproject
additional_dependencies: ["validate-pyproject-schema-store[all]"]
21 changes: 16 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
authors = [
{name = "xarray Developers", email = "xarray@googlegroups.com"},
{ name = "xarray Developers", email = "xarray@googlegroups.com" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand All @@ -16,7 +16,7 @@ classifiers = [
]
description = "N-D labeled arrays and datasets in Python"
dynamic = ["version"]
license = {text = "Apache-2.0"}
license = { text = "Apache-2.0" }
name = "xarray"
readme = "README.md"
requires-python = ">=3.10"
Expand Down Expand Up @@ -50,7 +50,16 @@ dev = [
"sphinx_autosummary_accessors",
"xarray[complete]",
]
io = ["netCDF4", "h5netcdf", "scipy", 'pydap; python_version<"3.10"', "zarr", "fsspec", "cftime", "pooch"]
io = [
"netCDF4",
"h5netcdf",
"scipy",
'pydap; python_version<"3.10"',
"zarr",
"fsspec",
"cftime",
"pooch",
]
etc = ["sparse"]
parallel = ["dask[complete]"]
viz = ["cartopy", "matplotlib", "nc-time-axis", "seaborn"]
Expand Down Expand Up @@ -249,7 +258,7 @@ extend-select = [
"RUF",
]
extend-safe-fixes = [
"TID252", # absolute imports
"TID252", # absolute imports
]
ignore = [
"E402", # module level import not at top of file
Expand Down Expand Up @@ -327,7 +336,9 @@ filterwarnings = [
"default:the `pandas.MultiIndex` object:FutureWarning:xarray.tests.test_variable",
"default:Using a non-tuple sequence for multidimensional indexing is deprecated:FutureWarning",
"default:Duplicate dimension names present:UserWarning:xarray.namedarray.core",
"default:::xarray.tests.test_strategies", # TODO: remove once we know how to deal with a changed signature in protocols

# TODO: remove once we know how to deal with a changed signature in protocols
"default:::xarray.tests.test_strategies",
]

log_cli_level = "INFO"
Expand Down

0 comments on commit 99ee8c6

Please sign in to comment.