Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pyproject pre-commit hooks #9840

Merged
merged 4 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = "[email protected]"},
{ name = "xarray Developers", email = "[email protected]" },
]
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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't know that empty lines are allowed, nice.

# 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
Loading