tensogram-xarray 0.17.0__tar.gz → 0.18.0__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.
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/.gitignore +2 -0
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/PKG-INFO +2 -2
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/pyproject.toml +2 -2
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/src/tensogram_xarray/store.py +16 -1
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/tests/test_backend.py +1 -1
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/tests/test_coverage.py +3 -1
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/README.md +0 -0
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/src/tensogram_xarray/__init__.py +0 -0
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/src/tensogram_xarray/array.py +0 -0
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/src/tensogram_xarray/backend.py +0 -0
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/src/tensogram_xarray/coords.py +0 -0
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/src/tensogram_xarray/mapping.py +0 -0
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/src/tensogram_xarray/merge.py +0 -0
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/src/tensogram_xarray/scanner.py +0 -0
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/tests/__init__.py +0 -0
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/tests/conftest.py +0 -0
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/tests/test_array.py +0 -0
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/tests/test_coords.py +0 -0
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/tests/test_edge_cases.py +0 -0
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/tests/test_issue_67_descriptor_name_fallback.py +0 -0
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/tests/test_mapping.py +0 -0
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/tests/test_merge.py +0 -0
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/tests/test_nd_range.py +0 -0
- {tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/tests/test_remote.py +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
.DS_Store
|
|
1
2
|
.claude/*
|
|
2
3
|
!.claude/commands/
|
|
3
4
|
.weave/
|
|
@@ -20,3 +21,4 @@ rust/tensogram-wasm/Cargo.lock
|
|
|
20
21
|
python/bindings/python/tensogram/tensogram*.so
|
|
21
22
|
# TODO do we want to have uv.locks ignored?
|
|
22
23
|
**/uv.lock
|
|
24
|
+
examples/jupyter/tensogram_jupyter_examples.egg-info/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tensogram-xarray
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.18.0
|
|
4
4
|
Summary: xarray backend engine for tensogram .tgm files
|
|
5
5
|
Project-URL: Homepage, https://sites.ecmwf.int/docs/tensogram/main
|
|
6
6
|
Project-URL: Repository, https://github.com/ecmwf/tensogram
|
|
@@ -14,7 +14,7 @@ Classifier: Topic :: Scientific/Engineering
|
|
|
14
14
|
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
|
|
15
15
|
Requires-Python: >=3.11
|
|
16
16
|
Requires-Dist: numpy
|
|
17
|
-
Requires-Dist: tensogram<0.
|
|
17
|
+
Requires-Dist: tensogram<0.19,>=0.18.0
|
|
18
18
|
Requires-Dist: xarray>=2022.06
|
|
19
19
|
Provides-Extra: dask
|
|
20
20
|
Requires-Dist: dask[array]; extra == 'dask'
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "tensogram-xarray"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.18.0"
|
|
8
8
|
description = "xarray backend engine for tensogram .tgm files"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -18,7 +18,7 @@ classifiers = [
|
|
|
18
18
|
"Topic :: Scientific/Engineering :: Atmospheric Science",
|
|
19
19
|
]
|
|
20
20
|
dependencies = [
|
|
21
|
-
"tensogram>=0.
|
|
21
|
+
"tensogram>=0.18.0,<0.19",
|
|
22
22
|
"xarray>=2022.06",
|
|
23
23
|
"numpy",
|
|
24
24
|
]
|
|
@@ -264,7 +264,22 @@ class TensogramDataStore:
|
|
|
264
264
|
extra = getattr(self._meta, "extra", None)
|
|
265
265
|
if extra and isinstance(extra, dict):
|
|
266
266
|
attrs.update(strip_structural_keys(extra))
|
|
267
|
-
|
|
267
|
+
# The wire-format version lives in the preamble (see
|
|
268
|
+
# ``plans/WIRE_FORMAT.md`` §3). ``meta.version`` sources from
|
|
269
|
+
# that preamble-derived value; we surface it as a namespaced
|
|
270
|
+
# attribute so downstream xarray tooling knows which wire
|
|
271
|
+
# format the file was encoded against. The attribute name
|
|
272
|
+
# changed from ``tensogram_version`` to
|
|
273
|
+
# ``tensogram_wire_version`` in 0.17 to avoid collisions with
|
|
274
|
+
# any user-supplied ``version`` key, which now flows through
|
|
275
|
+
# ``_extra_`` like every other free-form annotation.
|
|
276
|
+
attrs["tensogram_wire_version"] = getattr(
|
|
277
|
+
self._meta,
|
|
278
|
+
"version",
|
|
279
|
+
# Fallback for producers that somehow decoded without a
|
|
280
|
+
# preamble — should never happen in practice.
|
|
281
|
+
3,
|
|
282
|
+
)
|
|
268
283
|
return attrs
|
|
269
284
|
|
|
270
285
|
def _get_per_object_meta(self, obj_index: int, desc: Any) -> dict[str, Any]:
|
|
@@ -61,7 +61,7 @@ class TestOpenDatasetSimple:
|
|
|
61
61
|
|
|
62
62
|
def test_metadata_in_attrs(self, simple_tgm: Path):
|
|
63
63
|
ds = xr.open_dataset(str(simple_tgm), engine="tensogram")
|
|
64
|
-
assert "
|
|
64
|
+
assert "tensogram_wire_version" in ds.attrs
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
class TestOpenDatasetWithDimNames:
|
|
@@ -1211,7 +1211,9 @@ class TestScanMessageWithExtra:
|
|
|
1211
1211
|
def test_scan_message_no_extra(self):
|
|
1212
1212
|
"""scan_message with no extra returns empty common_meta."""
|
|
1213
1213
|
data = np.ones((3,), dtype=np.float32)
|
|
1214
|
-
|
|
1214
|
+
# Free-form CBOR metadata: the wire-format version lives in the
|
|
1215
|
+
# preamble, not in the CBOR frame.
|
|
1216
|
+
msg = bytes(tensogram.encode({}, [(_desc([3]), data)]))
|
|
1215
1217
|
|
|
1216
1218
|
objects = scan_message(msg)
|
|
1217
1219
|
assert len(objects) == 1
|
|
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
|
{tensogram_xarray-0.17.0 → tensogram_xarray-0.18.0}/tests/test_issue_67_descriptor_name_fallback.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|