cf-xarray 0.10.5__tar.gz → 0.10.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/.github/workflows/ci.yaml +2 -2
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/.pre-commit-config.yaml +3 -3
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/PKG-INFO +1 -1
- cf_xarray-0.10.6/cf_xarray/_version.py +1 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/accessor.py +5 -5
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/geometry.py +5 -3
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/tests/test_geometry.py +3 -1
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray.egg-info/PKG-INFO +1 -1
- cf_xarray-0.10.5/cf_xarray/_version.py +0 -1
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/.binder/environment.yml +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/.deepsource.toml +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/.github/dependabot.yml +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/.github/release.yml +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/.github/workflows/parse_logs.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/.github/workflows/pypi.yaml +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/.github/workflows/testpypi-release.yaml +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/.github/workflows/upstream-dev-ci.yaml +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/.gitignore +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/.readthedocs.yml +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/.tributors +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/CITATION.cff +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/LICENSE +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/README.rst +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/__init__.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/coding.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/criteria.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/datasets.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/formatting.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/groupers.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/helpers.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/options.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/parametric.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/py.typed +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/scripts/make_doc.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/scripts/print_versions.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/sgrid.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/tests/__init__.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/tests/conftest.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/tests/test_accessor.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/tests/test_coding.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/tests/test_groupers.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/tests/test_helpers.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/tests/test_options.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/tests/test_parametric.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/tests/test_scripts.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/tests/test_units.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/units.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray/utils.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray.egg-info/SOURCES.txt +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray.egg-info/dependency_links.txt +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray.egg-info/requires.txt +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/cf_xarray.egg-info/top_level.txt +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/ci/doc.yml +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/ci/environment-all-min-deps.yml +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/ci/environment-no-optional-deps.yml +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/ci/environment.yml +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/ci/upstream-dev-env.yml +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/codecov.yml +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/2D_bounds_averaged.png +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/2D_bounds_error.png +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/2D_bounds_nonunique.png +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/Makefile +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/_static/dataset-diagram-logo.tex +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/_static/full-logo.png +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/_static/logo.png +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/_static/logo.svg +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/_static/rich-repr-example.png +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/_static/style.css +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/api.rst +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/bounds.md +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/cartopy_rotated_pole.png +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/coding.md +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/conf.py +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/contributing.rst +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/coord_axes.md +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/custom-criteria.md +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/dsg.md +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/examples/introduction.ipynb +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/faq.md +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/flags.md +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/geometry.md +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/grid_mappings.md +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/howtouse.md +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/index.rst +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/make.bat +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/parametricz.md +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/plotting.md +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/provenance.md +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/quickstart.md +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/roadmap.rst +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/selecting.md +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/sgrid_ugrid.md +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/units.md +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/doc/whats-new.rst +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/pyproject.toml +0 -0
- {cf_xarray-0.10.5 → cf_xarray-0.10.6}/setup.cfg +0 -0
|
@@ -70,7 +70,7 @@ jobs:
|
|
|
70
70
|
run: |
|
|
71
71
|
pytest -n auto --cov=./ --cov-report=xml
|
|
72
72
|
- name: Upload code coverage to Codecov
|
|
73
|
-
uses: codecov/codecov-action@v5.4.
|
|
73
|
+
uses: codecov/codecov-action@v5.4.3
|
|
74
74
|
with:
|
|
75
75
|
file: ./coverage.xml
|
|
76
76
|
flags: unittests
|
|
@@ -109,7 +109,7 @@ jobs:
|
|
|
109
109
|
run: |
|
|
110
110
|
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report cf_xarray/
|
|
111
111
|
- name: Upload mypy coverage to Codecov
|
|
112
|
-
uses: codecov/codecov-action@v5.4.
|
|
112
|
+
uses: codecov/codecov-action@v5.4.3
|
|
113
113
|
with:
|
|
114
114
|
file: mypy_report/cobertura.xml
|
|
115
115
|
flags: mypy
|
|
@@ -10,7 +10,7 @@ repos:
|
|
|
10
10
|
|
|
11
11
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
12
12
|
# Ruff version.
|
|
13
|
-
rev: 'v0.
|
|
13
|
+
rev: 'v0.11.4'
|
|
14
14
|
hooks:
|
|
15
15
|
- id: ruff
|
|
16
16
|
args: ["--fix", "--show-fixes"]
|
|
@@ -24,7 +24,7 @@ repos:
|
|
|
24
24
|
args: ['--config', 'pyproject.toml']
|
|
25
25
|
|
|
26
26
|
- repo: https://github.com/executablebooks/mdformat
|
|
27
|
-
rev: 0.7.
|
|
27
|
+
rev: 0.7.22
|
|
28
28
|
hooks:
|
|
29
29
|
- id: mdformat
|
|
30
30
|
additional_dependencies:
|
|
@@ -55,7 +55,7 @@ repos:
|
|
|
55
55
|
- id: validate-cff
|
|
56
56
|
|
|
57
57
|
- repo: https://github.com/abravalheri/validate-pyproject
|
|
58
|
-
rev: v0.
|
|
58
|
+
rev: v0.24.1
|
|
59
59
|
hooks:
|
|
60
60
|
- id: validate-pyproject
|
|
61
61
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.10.6"
|
|
@@ -39,8 +39,8 @@ except ImportError:
|
|
|
39
39
|
)
|
|
40
40
|
|
|
41
41
|
try:
|
|
42
|
-
from xarray.core.weighted import (
|
|
43
|
-
Weighted,
|
|
42
|
+
from xarray.core.weighted import ( # type:ignore[import-not-found,no-redef,unused-ignore]
|
|
43
|
+
Weighted,
|
|
44
44
|
)
|
|
45
45
|
except ImportError:
|
|
46
46
|
from xarray.computation.weighted import ( # type:ignore[import-not-found,no-redef,unused-ignore]
|
|
@@ -1376,7 +1376,7 @@ class CFAccessor:
|
|
|
1376
1376
|
|
|
1377
1377
|
def curvefit(
|
|
1378
1378
|
self,
|
|
1379
|
-
coords: Hashable |
|
|
1379
|
+
coords: Hashable | Iterable[Hashable],
|
|
1380
1380
|
func: Callable[..., Any],
|
|
1381
1381
|
reduce_dims: Hashable | Iterable[Hashable] | None = None,
|
|
1382
1382
|
skipna: bool = True,
|
|
@@ -1386,8 +1386,8 @@ class CFAccessor:
|
|
|
1386
1386
|
kwargs: dict[str, Any] | None = None,
|
|
1387
1387
|
):
|
|
1388
1388
|
if coords is not None:
|
|
1389
|
-
if isinstance(coords, Hashable
|
|
1390
|
-
coords_iter: Iterable[Hashable
|
|
1389
|
+
if isinstance(coords, Hashable):
|
|
1390
|
+
coords_iter: Iterable[Hashable] = [coords]
|
|
1391
1391
|
else:
|
|
1392
1392
|
coords_iter = coords
|
|
1393
1393
|
coords = [
|
|
@@ -298,8 +298,10 @@ def encode_geometries(ds: xr.Dataset):
|
|
|
298
298
|
geom_var_names = [
|
|
299
299
|
name
|
|
300
300
|
for name, var in ds._variables.items()
|
|
301
|
-
if var.dtype == "
|
|
301
|
+
if var.dtype == "geometry"
|
|
302
|
+
or (var.dtype == "O" and isinstance(var.data.flat[0], SHAPELY_TYPES))
|
|
302
303
|
]
|
|
304
|
+
|
|
303
305
|
if not geom_var_names:
|
|
304
306
|
return ds
|
|
305
307
|
|
|
@@ -410,8 +412,8 @@ def reshape_unique_geometries(
|
|
|
410
412
|
out = out.unstack(temp_name)
|
|
411
413
|
|
|
412
414
|
# geom_var was reshaped also, reconstruct it from the unique values.
|
|
413
|
-
|
|
414
|
-
out[geom_var] = ds[geom_var].isel({old_name:
|
|
415
|
+
unique_indexes_da = xr.DataArray(unique_indexes, dims=(new_dim,))
|
|
416
|
+
out[geom_var] = ds[geom_var].isel({old_name: unique_indexes_da})
|
|
415
417
|
if old_name not in ds.coords:
|
|
416
418
|
# If there was no coord before, drop the dummy one we made.
|
|
417
419
|
out = out.drop_vars(old_name) # type: ignore[arg-type,unused-ignore] # Hashable/str stuff
|
|
@@ -507,5 +507,7 @@ def test_encode_decode(geometry_ds, polygon_geometry):
|
|
|
507
507
|
)
|
|
508
508
|
multi_ds = xr.merge([polyds, geometry_ds[1]])
|
|
509
509
|
for ds in (geometry_ds[1], polygon_geometry.to_dataset(), geom_dim_ds, multi_ds):
|
|
510
|
-
|
|
510
|
+
encoded = encode_geometries(ds)
|
|
511
|
+
assert len(encoded.data_vars) > len(ds.data_vars)
|
|
512
|
+
roundtripped = decode_geometries(encoded)
|
|
511
513
|
xr.testing.assert_identical(ds, roundtripped)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.10.5"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|