Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ disable = [

[dependency-groups]
dev = [
"black>=25.1.0",
"coverage>=7.6.7",
"geopandas>=1.0.1",
"isort>=6.0.1",
"mypy>=1.13.0",
"pre-commit>=4.0.1",
"pytest>=8.3.3",
Expand Down
1 change: 1 addition & 0 deletions src/odc/loader/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from concurrent.futures import ThreadPoolExecutor
from typing import Callable, Iterable, Iterator, Sized, TypeVar, Union

from typing_extensions import override

T = TypeVar("T")
Expand Down
2 changes: 1 addition & 1 deletion src/odc/loader/test_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
def _full_tyx_bins(
tiles: GeoboxTiles, nsrcs=1, nt=1
) -> Dict[tuple[int, int, int], list[int]]:
return {idx: list(range(nsrcs)) for idx in np.ndindex((nt, *tiles.shape.yx))} # type: ignore
return {idx: list(range(nsrcs)) for idx in np.ndindex((nt, *tiles.shape.yx))}


def _num_chunks(chunk: int, sz: int) -> int:
Expand Down
6 changes: 6 additions & 0 deletions src/odc/loader/test_memreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import json
from datetime import datetime
from importlib.metadata import version

import numpy as np
import pytest
Expand All @@ -16,6 +17,7 @@
from odc.geo.gcp import GCPGeoBox
from odc.geo.geobox import GeoBox, GeoboxTiles
from odc.geo.xr import ODCExtensionDa, ODCExtensionDs, rasterize
from packaging.version import parse as parse_version

from odc.loader import chunked_load
from odc.loader._zarr import (
Expand Down Expand Up @@ -221,6 +223,10 @@ def test_memreader_zarr(sample_ds: xr.Dataset) -> None:

zarr = pytest.importorskip("zarr")
assert zarr is not None
# FIXME: update test for Zarr v3, links to more information in:
# https://github.com/opendatacube/odc-loader/pull/29#issuecomment-3258611734
if parse_version(version("zarr")) > parse_version("2"):
pytest.skip("Consolidated metadata is located elsewhere for Zarr v3")
_gbox = sample_ds.odc.geobox
assert _gbox is not None
gbox = _gbox.approx if isinstance(_gbox, GCPGeoBox) else _gbox
Expand Down
Loading