From 87399a2ff517dcfd771382e867e5571de34e7b8b Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Sat, 30 Nov 2024 00:43:10 +0800 Subject: [PATCH 1/3] add taplo pre-commit hook --- .pre-commit-config.yaml | 5 +++++ pyproject.toml | 19 ++++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d543a36edd3..06e0fff574b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -63,3 +63,8 @@ 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"] diff --git a/pyproject.toml b/pyproject.toml index 3ac1a024195..05b6b7596c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", @@ -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" @@ -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"] @@ -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 @@ -327,7 +336,7 @@ 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 + "default:::xarray.tests.test_strategies", # TODO: remove once we know how to deal with a changed signature in protocols ] log_cli_level = "INFO" From a72decf7c74de23ff96b10a6f638a94241afc390 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Sat, 30 Nov 2024 00:43:58 +0800 Subject: [PATCH 2/3] move TODO https://github.com/tamasfe/taplo/issues/706 --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 05b6b7596c3..e6c63c4d010 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -336,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" From c98af19c307d9b4ad84869d143396749fb26140f Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Sun, 1 Dec 2024 09:58:01 +0800 Subject: [PATCH 3/3] add validate-pyproject pre-commit hook --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 06e0fff574b..dc5895c1e57 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -68,3 +68,8 @@ repos: 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]"]
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: