Skip to content

Commit 0a0f800

Browse files
authored
Merge branch 'main' into depr-groupby-squeeze-2
2 parents 33c8033 + 41d33f5 commit 0a0f800

File tree

3 files changed

+26
-13
lines changed

3 files changed

+26
-13
lines changed

.github/workflows/ci-additional.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,10 @@ jobs:
7676
# Raise an error if there are warnings in the doctests, with `-Werror`.
7777
# This is a trial; if it presents an problem, feel free to remove.
7878
# See https://github.com/pydata/xarray/issues/7164 for more info.
79-
80-
# ignores:
81-
# 1. h5py: see https://github.com/pydata/xarray/issues/8537
82-
python -m pytest --doctest-modules xarray --ignore xarray/tests -Werror \
83-
-W "ignore:h5py is running against HDF5 1.14.3:UserWarning"
79+
#
80+
# If dependencies emit warnings we can't do anything about, add ignores to
81+
# `xarray/tests/__init__.py`.
82+
python -m pytest --doctest-modules xarray --ignore xarray/tests -Werror
8483
8584
mypy:
8685
name: Mypy

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,24 @@ repos:
1818
files: ^xarray/
1919
- repo: https://github.com/astral-sh/ruff-pre-commit
2020
# Ruff version.
21-
rev: 'v0.1.6'
21+
rev: 'v0.1.9'
2222
hooks:
2323
- id: ruff
2424
args: ["--fix"]
2525
# https://github.com/python/black#version-control-integration
26-
- repo: https://github.com/psf/black
27-
rev: 23.11.0
26+
- repo: https://github.com/psf/black-pre-commit-mirror
27+
rev: 23.12.1
2828
hooks:
2929
- id: black-jupyter
3030
- repo: https://github.com/keewis/blackdoc
3131
rev: v0.3.9
3232
hooks:
3333
- id: blackdoc
3434
exclude: "generate_aggregations.py"
35-
additional_dependencies: ["black==23.11.0"]
35+
additional_dependencies: ["black==23.12.1"]
3636
- id: blackdoc-autoupdate-black
3737
- repo: https://github.com/pre-commit/mirrors-mypy
38-
rev: v1.7.1
38+
rev: v1.8.0
3939
hooks:
4040
- id: mypy
4141
# Copied from setup.cfg

xarray/tests/__init__.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,17 @@ def _importorskip(
7171
message="'cgi' is deprecated and slated for removal in Python 3.13",
7272
category=DeprecationWarning,
7373
)
74-
7574
has_pydap, requires_pydap = _importorskip("pydap.client")
7675
has_netCDF4, requires_netCDF4 = _importorskip("netCDF4")
77-
has_h5netcdf, requires_h5netcdf = _importorskip("h5netcdf")
76+
with warnings.catch_warnings():
77+
# see https://github.com/pydata/xarray/issues/8537
78+
warnings.filterwarnings(
79+
"ignore",
80+
message="h5py is running against HDF5 1.14.3",
81+
category=UserWarning,
82+
)
83+
84+
has_h5netcdf, requires_h5netcdf = _importorskip("h5netcdf")
7885
has_pynio, requires_pynio = _importorskip("Nio")
7986
has_cftime, requires_cftime = _importorskip("cftime")
8087
has_dask, requires_dask = _importorskip("dask")
@@ -84,7 +91,14 @@ def _importorskip(
8491
has_fsspec, requires_fsspec = _importorskip("fsspec")
8592
has_iris, requires_iris = _importorskip("iris")
8693
has_numbagg, requires_numbagg = _importorskip("numbagg", "0.4.0")
87-
has_seaborn, requires_seaborn = _importorskip("seaborn")
94+
with warnings.catch_warnings():
95+
warnings.filterwarnings(
96+
"ignore",
97+
message="is_categorical_dtype is deprecated and will be removed in a future version.",
98+
category=DeprecationWarning,
99+
)
100+
# seaborn uses the deprecated `pandas.is_categorical_dtype`
101+
has_seaborn, requires_seaborn = _importorskip("seaborn")
88102
has_sparse, requires_sparse = _importorskip("sparse")
89103
has_cupy, requires_cupy = _importorskip("cupy")
90104
has_cartopy, requires_cartopy = _importorskip("cartopy")

0 commit comments

Comments
 (0)