taco-eo 0.6.2__tar.gz → 0.6.3__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.
- {taco_eo-0.6.2 → taco_eo-0.6.3}/CHANGELOG.md +7 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/PKG-INFO +1 -1
- {taco_eo-0.6.2 → taco_eo-0.6.3}/pyproject.toml +1 -1
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/metadata/_base.py +1 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/metadata/derived.py +1 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/writer/metadata_tables.py +9 -1
- {taco_eo-0.6.2 → taco_eo-0.6.3}/tests/test_extension_contract.py +37 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/tests/test_metadata.py +2 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/.gitignore +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/LICENSE +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/README.md +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/examples/change_detection.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/examples/geospatial.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/examples/minimal.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/examples/numpy_minimal.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/examples/oceantaco_istac.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/examples/partitioned.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/examples/sequence.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/examples/stac_segmentation.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/examples/time_series.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/__init__.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/_graph.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/_parquet.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/_publish.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/_repr.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/_source.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/_view.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/contract/__init__.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/contract/collection.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/contract/contract.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/contract/naming.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/contract/sample.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/contract/structure.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/contract/types.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/cozip.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/dataset.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/errors.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/extensions/__init__.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/extensions/rumi.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/extensions/spatiotemporal.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/metadata/__init__.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/metadata/asset.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/metadata/collection.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/metadata/data/admin/admin0.parquet +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/metadata/data/admin/admin1.parquet +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/metadata/data/admin/admin2.parquet +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/metadata/folder.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/metadata/sample.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/metadata/spatiotemporal.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/metadata/split.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/py.typed +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/reader/__init__.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/reader/engine.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/schema.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/tacocat.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/validate.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/writer/__init__.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/writer/archive.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/writer/core.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/writer/folder.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/writer/progress.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/taco/writer/staging.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/tests/__init__.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/tests/conftest.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/tests/datasets.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/tests/test_collection.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/tests/test_contract.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/tests/test_examples.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/tests/test_extension_rumi.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/tests/test_extension_spatiotemporal.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/tests/test_parquet.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/tests/test_progress.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/tests/test_publish.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/tests/test_reader.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/tests/test_tacocat.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/tests/test_types.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/tests/test_validate.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/tests/test_writer.py +0 -0
- {taco_eo-0.6.2 → taco_eo-0.6.3}/tests/test_writer_cases.py +0 -0
|
@@ -5,6 +5,13 @@ All notable changes to `taco` are documented here. The format follows
|
|
|
5
5
|
|
|
6
6
|
## Unreleased
|
|
7
7
|
|
|
8
|
+
## 0.6.3 - 2026-09-13
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- `GeoEnrich` now receives the complete metadata level before applying the
|
|
13
|
+
same globally sorted, concurrent Earth Engine batching used by Taco v2.
|
|
14
|
+
|
|
8
15
|
## 0.6.2 - 2026-09-13
|
|
9
16
|
|
|
10
17
|
### Removed
|
|
@@ -177,6 +177,7 @@ class GeoEnrich(DerivedMetadata):
|
|
|
177
177
|
"""Fetch selected Earth Engine variables and resolve administrative names."""
|
|
178
178
|
|
|
179
179
|
__taco_scopes__: ClassVar[frozenset[str]] = frozenset({"sample"})
|
|
180
|
+
__taco_complete_level__: ClassVar[bool] = True
|
|
180
181
|
|
|
181
182
|
variables: tuple[str, ...]
|
|
182
183
|
scale_m: float
|
|
@@ -111,6 +111,14 @@ class MetadataTableWriter:
|
|
|
111
111
|
self._writers: dict[str, pq.ParquetWriter] = {}
|
|
112
112
|
self._next_id = dict.fromkeys(contract.levels, 0)
|
|
113
113
|
self._verified_extensions: set[str] = set()
|
|
114
|
+
self._complete_levels = {
|
|
115
|
+
level
|
|
116
|
+
for level in contract.levels
|
|
117
|
+
if any(
|
|
118
|
+
group.extension is not None and group.extension.__taco_complete_level__
|
|
119
|
+
for group in contract._groups[level]
|
|
120
|
+
)
|
|
121
|
+
}
|
|
114
122
|
self._summaries = _collection_summaries(contract)
|
|
115
123
|
self.paths = {level: directory / level_to_filename(level) for level in contract.levels}
|
|
116
124
|
directory.mkdir(parents=True, exist_ok=True)
|
|
@@ -183,7 +191,7 @@ class MetadataTableWriter:
|
|
|
183
191
|
self._buffers[level].append(row)
|
|
184
192
|
self._asset_buffers[level].append(asset)
|
|
185
193
|
self._next_id[level] += 1
|
|
186
|
-
if len(self._buffers[level]) >= self.batch_size:
|
|
194
|
+
if level not in self._complete_levels and len(self._buffers[level]) >= self.batch_size:
|
|
187
195
|
self._flush(level)
|
|
188
196
|
|
|
189
197
|
def _parquet_writer(self, level: str) -> pq.ParquetWriter:
|
|
@@ -57,6 +57,27 @@ class Generated(taco.Extension):
|
|
|
57
57
|
return {"value": context.columns[self.dependency]}
|
|
58
58
|
|
|
59
59
|
|
|
60
|
+
COMPLETE_BATCHES: list[int] = []
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
@dataclass(frozen=True)
|
|
64
|
+
class CompleteGenerated(taco.Extension):
|
|
65
|
+
__taco_scopes__: ClassVar[frozenset[str]] = frozenset({"sample"})
|
|
66
|
+
__taco_complete_level__: ClassVar[bool] = True
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def requires(self) -> tuple[str, ...]:
|
|
70
|
+
return ()
|
|
71
|
+
|
|
72
|
+
@property
|
|
73
|
+
def fields(self) -> pa.Schema:
|
|
74
|
+
return pa.schema([pa.field("value", pa.int64(), nullable=False)])
|
|
75
|
+
|
|
76
|
+
def run(self, context: taco.ExtensionContext) -> Mapping[str, Sequence[Any]]:
|
|
77
|
+
COMPLETE_BATCHES.append(len(context))
|
|
78
|
+
return {"value": list(range(len(context)))}
|
|
79
|
+
|
|
80
|
+
|
|
60
81
|
@dataclass(frozen=True)
|
|
61
82
|
class Broken(taco.Extension):
|
|
62
83
|
behavior: str
|
|
@@ -114,6 +135,22 @@ def test_extension_combines_inputs_with_local_assets(tmp_path: Path) -> None:
|
|
|
114
135
|
assert row["value:asset_name"] == "value.bin"
|
|
115
136
|
|
|
116
137
|
|
|
138
|
+
def test_complete_level_extension_receives_all_rows(tmp_path: Path) -> None:
|
|
139
|
+
COMPLETE_BATCHES.clear()
|
|
140
|
+
contract = taco.Contract(
|
|
141
|
+
structure=None,
|
|
142
|
+
metadata=taco.MetadataSchema(taco.Level("sample", complete=CompleteGenerated())),
|
|
143
|
+
)
|
|
144
|
+
with taco.open_writer(collection(contract), tmp_path / "complete", batch_size=1) as writer:
|
|
145
|
+
writer.extend([taco.Sample(assets=b"x") for _ in range(3)])
|
|
146
|
+
writer.run()
|
|
147
|
+
|
|
148
|
+
# The second call is the writer's one-row independence check.
|
|
149
|
+
assert COMPLETE_BATCHES == [3, 1]
|
|
150
|
+
values = open_view(tmp_path / "complete").level("sample").column("complete:value").to_pylist()
|
|
151
|
+
assert values == [0, 1, 2]
|
|
152
|
+
|
|
153
|
+
|
|
117
154
|
def test_executable_extensions_reject_a_dependency_cycle() -> None:
|
|
118
155
|
with pytest.raises(ContractError, match="cycle"):
|
|
119
156
|
taco.Contract(
|
|
@@ -306,6 +306,8 @@ def test_geoenrich_batches_requests(monkeypatch: pytest.MonkeyPatch) -> None:
|
|
|
306
306
|
|
|
307
307
|
|
|
308
308
|
def test_geoenrich_configuration() -> None:
|
|
309
|
+
assert taco.metadata.sample.GeoEnrich.__taco_complete_level__
|
|
310
|
+
assert not taco.metadata.sample.MajorTOM.__taco_complete_level__
|
|
309
311
|
with pytest.raises(ValueError, match="unknown"):
|
|
310
312
|
taco.metadata.sample.GeoEnrich(["nope"])
|
|
311
313
|
with pytest.raises(ValueError, match="positive"):
|
|
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
|