Skip to content
Merged
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
11 changes: 6 additions & 5 deletions xrspatial/geotiff/tests/golden_corpus/test_dask_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,12 @@
# xrspatial reader. The base-IFD parity check still runs; the
# overview-level loop driven by ``candidate_factory`` is skipped for
# these ids. See the eager module for the rationale.
_OVERVIEW_READER_GAPS: dict[str, str] = {
"overview_external_ovr_uint16": (
"External .ovr sidecar reader is not implemented in xrspatial."
),
}
#
# Empty now that the dask+GPU reader resolves the sibling ``.tif.ovr``
# pyramid through the shared ``_sidecar`` discovery the eager numpy
# backend uses, so the overview-level comparison runs for
# ``overview_external_ovr_uint16`` on this backend too.
_OVERVIEW_READER_GAPS: dict[str, str] = {}

_INTENTIONAL_SKIPS: dict[str, str] = {
"nodata_miniswhite_uint8": (
Expand Down
11 changes: 6 additions & 5 deletions xrspatial/geotiff/tests/golden_corpus/test_dask_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,12 @@
# xrspatial reader. The base-IFD parity check still runs; the
# overview-level loop driven by ``candidate_factory`` is skipped for
# these ids. See the eager module for the rationale.
_OVERVIEW_READER_GAPS: dict[str, str] = {
"overview_external_ovr_uint16": (
"External .ovr sidecar reader is not implemented in xrspatial."
),
}
#
# Empty now that the dask reader resolves the sibling ``.tif.ovr``
# pyramid through the shared ``_sidecar`` discovery the eager numpy
# backend uses, so the overview-level comparison runs for
# ``overview_external_ovr_uint16`` on this backend too.
_OVERVIEW_READER_GAPS: dict[str, str] = {}

_INTENTIONAL_SKIPS: dict[str, str] = {
"nodata_miniswhite_uint8": (
Expand Down
18 changes: 11 additions & 7 deletions xrspatial/geotiff/tests/golden_corpus/test_fsspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,7 @@
# xrspatial reader. The base-IFD parity check still runs; the
# overview-level loop driven by ``candidate_factory`` is skipped for
# these ids. See the eager module for the rationale.
_OVERVIEW_READER_GAPS: dict[str, str] = {
"overview_external_ovr_uint16": (
"External .ovr sidecar reader is not implemented in xrspatial. "
"The base IFD still parity-checks; the overview levels live in "
"a sibling .tif.ovr that the reader does not open."
),
}
_OVERVIEW_READER_GAPS: dict[str, str] = {}

_INTENTIONAL_SKIPS: dict[str, str] = {
"nodata_miniswhite_uint8": (
Expand Down Expand Up @@ -152,13 +146,23 @@ def _serve_via_memory(payload: bytes, fixture_id: str) -> str:
Returns the ``memory:///corpus/<fixture_id>.tif`` URL the reader
should open. The three-slash form is required: ``memory://`` writes
must use a path beginning with ``/`` or fsspec rejects them.

When the fixture ships a sibling ``.tif.ovr`` sidecar on disk, push
it under the matching ``.tif.ovr`` URL so the reader's fsspec
sidecar discovery (``_probe_fsspec`` -> ``load_sidecar``) can resolve
the external overview levels. Without it the memory filesystem holds
only the base ``.tif`` and ``overview_level>=1`` fails as out of
range, which is a test-harness gap rather than a reader limitation.
"""
fs = fsspec.filesystem("memory")
url = f"memory:///corpus/{fixture_id}.tif"
# ``pipe`` is the idiomatic single-shot byte writer for fsspec
# filesystems; ``test_cloud_read_byte_limit_1928.py`` uses the
# same pattern.
fs.pipe(f"/corpus/{fixture_id}.tif", payload)
sidecar_path = FIXTURES_DIR / f"{fixture_id}.tif.ovr"
if sidecar_path.exists():
fs.pipe(f"/corpus/{fixture_id}.tif.ovr", sidecar_path.read_bytes())
return url


Expand Down
11 changes: 6 additions & 5 deletions xrspatial/geotiff/tests/golden_corpus/test_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,12 @@
# xrspatial reader. The base-IFD parity check still runs; the
# overview-level loop driven by ``candidate_factory`` is skipped for
# these ids. See the eager module for the rationale.
_OVERVIEW_READER_GAPS: dict[str, str] = {
"overview_external_ovr_uint16": (
"External .ovr sidecar reader is not implemented in xrspatial."
),
}
#
# Empty now that the GPU reader resolves the sibling ``.tif.ovr``
# pyramid through the shared ``_sidecar`` discovery the eager numpy
# backend uses, so the overview-level comparison runs for
# ``overview_external_ovr_uint16`` on this backend too.
_OVERVIEW_READER_GAPS: dict[str, str] = {}

# Fixtures whose codec is not implemented on the GPU read path and
# legitimately need to fall back to CPU. The test routes these through
Expand Down
Loading