Skip to content

chore: replace ObjectStore type requirement with ObspecInput#60

Merged
hrodmn merged 3 commits into
mainfrom
fix/obspec
May 18, 2026
Merged

chore: replace ObjectStore type requirement with ObspecInput#60
hrodmn merged 3 commits into
mainfrom
fix/obspec

Conversation

@hrodmn
Copy link
Copy Markdown
Collaborator

@hrodmn hrodmn commented May 16, 2026

resolves #28

@github-actions github-actions Bot added the chore label May 16, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 16, 2026

Benchmark Comparison

Test Baseline (ms) PR (ms) Change
test_band_access_pattern[multi_band] 1325.1 1339.2 +1.1%
test_band_access_pattern[single_band] 1202.6 1239.0 +3.0%
test_full_compute 627.2 658.4 +5.0%
test_mosaic_method[first] 613.3 617.8 +0.7%
test_mosaic_method[median] 641.4 680.7 +6.1%
test_native_crs_resolution 10757.3 11923.2 +10.8% ⚠️
test_open_overhead 270.5 298.9 +10.5% ⚠️
test_reproject_workers[1] 1354.0 1419.4 +4.8%
test_reproject_workers[4] 1348.5 1384.9 +2.7%
test_time_step_parallelism[dask_time_1] 1331.2 1332.8 +0.1%
test_time_step_parallelism[no_dask] 914.6 954.0 +4.3%

@hrodmn hrodmn requested a review from kylebarron May 18, 2026 14:49
Comment thread docs/guides/cloud-storage.md Outdated

## Custom store contract

When you pass `store=` explicitly, lazycogs forwards that object to `async-geotiff`. The object does not need to be an obstore `ObjectStore`; it only needs to satisfy the obspec-compatible async range-read contract accepted by `GeoTIFF.open()`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a link here would be good. You can link to https://developmentseed.org/async-geotiff/latest/api/geotiff/#async_geotiff.GeoTIFF.open, and then potentially also to the ObspecInput type

Comment thread src/lazycogs/_backend.py Outdated
if TYPE_CHECKING:
from collections.abc import Callable

from async_tiff import ObspecInput
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, perhaps we should re-export ObspecInput through the async-geotiff API too? 🤷‍♂️

I don't really like the name ObspecInput either. I think just Store would be more descriptive. Any thoughts?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems a little odd to be importing from async-tiff but it was already an indirect dependency so it's not a big deal.

Store would be a more intuitive name. ObspecInput says a lot about what the class is but not very much about what it does.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

developmentseed/async-geotiff#161

With 0.5.1 you should be able to use the Store protocol defined in async-geotiff

@hrodmn hrodmn enabled auto-merge (squash) May 18, 2026 19:04
@hrodmn hrodmn merged commit ea2837a into main May 18, 2026
6 checks passed
@hrodmn hrodmn deleted the fix/obspec branch May 18, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch obstore requirement to obspec protocol

2 participants