diff --git a/ci/minimum_versions.py b/ci/minimum_versions.py index cc115789d0f..08808d002d9 100644 --- a/ci/minimum_versions.py +++ b/ci/minimum_versions.py @@ -20,6 +20,12 @@ channels = ["conda-forge"] platforms = ["noarch", "linux-64"] +# these packages don't fail the CI, but will be printed in the report +ignore_failure_packages = [ + # remove when we can pin to pydap 3.5.1 without error + "pydap", +] +# these packages are completely ignored ignored_packages = [ "coveralls", "pip", @@ -171,7 +177,11 @@ def compare_versions(environments, policy_versions): status = {} for env, specs in environments.items(): env_status = any( - spec.version > policy_versions[spec.name].version for spec in specs + ( + (spec.version > policy_versions[spec.name].version) + and (spec.name not in ignore_failure_packages) + ) + for spec in specs ) status[env] = env_status return status diff --git a/ci/requirements/min-all-deps.yml b/ci/requirements/min-all-deps.yml index fc55280a17b..03e14773d53 100644 --- a/ci/requirements/min-all-deps.yml +++ b/ci/requirements/min-all-deps.yml @@ -42,7 +42,7 @@ dependencies: - pandas=2.1 - pint=0.22 - pip - - pydap=3.5.0 + - pydap=3.5 - pytest - pytest-cov - pytest-env diff --git a/pyproject.toml b/pyproject.toml index 5494d4ab484..8fb1975c232 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -346,6 +346,8 @@ 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", + # Zarr 2 V3 implementation + "ignore:Zarr-Python is not in alignment with the final V3 specification", # TODO: this is raised for vlen-utf8, consolidated metadata, U1 dtype "ignore:is currently not part .* the Zarr version 3 specification.", # TODO: remove once we know how to deal with a changed signature in protocols diff --git a/xarray/tests/test_backends.py b/xarray/tests/test_backends.py index e37f73c8004..1d9c90b37b1 100644 --- a/xarray/tests/test_backends.py +++ b/xarray/tests/test_backends.py @@ -2320,6 +2320,9 @@ def roundtrip( with self.open(store_target, **open_kwargs) as ds: yield ds + def test_roundtrip_bytes_with_fill_value(self): + pytest.xfail("Broken by Zarr 3.0.7") + @pytest.mark.parametrize("consolidated", [False, True, None]) def test_roundtrip_consolidated(self, consolidated) -> None: expected = create_test_data() @@ -3548,6 +3551,10 @@ def test_append(self) -> None: ) @requires_dask + @pytest.mark.skipif( + sys.version_info.major == 3 and sys.version_info.minor < 11, + reason="zarr too old", + ) def test_region_write(self) -> None: ds = Dataset({"foo": ("x", [1, 2, 3])}, coords={"x": [1, 2, 3]}).chunk() with self.create_zarr_target() as store: diff --git a/xarray/tests/test_dataarray.py b/xarray/tests/test_dataarray.py index febf89cc0ab..8d0d5011026 100644 --- a/xarray/tests/test_dataarray.py +++ b/xarray/tests/test_dataarray.py @@ -3608,8 +3608,8 @@ def test_to_and_from_dict( return_data = array.to_numpy() coords_data = np.array(["a", "b"]) if data == "list" or data is True: - return_data = return_data.tolist() # type:ignore[assignment] - coords_data = coords_data.tolist() # type:ignore[assignment] + return_data = return_data.tolist() + coords_data = coords_data.tolist() expected: dict[str, Any] = { "name": "foo", diff --git a/xarray/tests/test_duck_array_wrapping.py b/xarray/tests/test_duck_array_wrapping.py index 59928dce370..42440385928 100644 --- a/xarray/tests/test_duck_array_wrapping.py +++ b/xarray/tests/test_duck_array_wrapping.py @@ -101,6 +101,14 @@ }, } +try: + import jax + + # enable double-precision + jax.config.update("jax_enable_x64", True) +except ImportError: + pass + class _BaseTest: def setup_for_test(self, request, namespace): diff --git a/xarray/tests/test_variable.py b/xarray/tests/test_variable.py index 388f51bc568..8569cb093e7 100644 --- a/xarray/tests/test_variable.py +++ b/xarray/tests/test_variable.py @@ -2444,7 +2444,8 @@ def test_to_index(self): def test_to_index_multiindex_level(self): midx = pd.MultiIndex.from_product([["a", "b"], [1, 2]], names=("one", "two")) - ds = Dataset(coords={"x": midx}) + with pytest.warns(FutureWarning): + ds = Dataset(coords={"x": midx}) assert ds.one.variable.to_index().equals(midx.get_level_values("one")) def test_multiindex_default_level_names(self):