Skip to content

Improve reusability of cube size estimation - #997

Open
soxofaan wants to merge 2 commits into
masterfrom
ogd1104-cube-size-estimation-reuse
Open

soxofaan wants to merge 2 commits into
masterfrom
ogd1104-cube-size-estimation-reuse

Conversation

@soxofaan

@soxofaan soxofaan commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

for example in openeo-geopyspark-driver

refs #827 Open-EO/openeo-geopyspark-driver#1104

dependency for Open-EO/openeo-geopyspark-driver#2053

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The cached-failure branch returns without logging, but the updated test_get_failure_shared expects a “skipping request to ... after cached failure” message in caplog.text. No existing log emits that message, so the test assertion fails.

1 open issue
What changed in this PR

Makes STAC cube-size estimation easier to reuse in backend code by allowing custom request caches.

Changes:

  • Adds a minimal cache interface and dictionary-backed implementation.
  • Supports injected caches and explicit cached-failure markers in the estimator, with additional tests.
  • Bumps the version to 0.56.0a3.
File Description
tests/​utils/​test_caching.py Tests cache storage, defaults, keys, and clearing.
tests/​metadata/​test_estimates.py Tests custom caches and cached failures.
openeo/​utils/​caching.py Defines the cache protocol, miss sentinel, and dictionary cache.
openeo/​metadata/​_estimates.py Adds cache injection and failure markers.
openeo/​_version.py Advances the prerelease version.

Review effort: Balanced

Comment thread openeo/metadata/_estimates.py Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No actionable issues were found in the reviewed changes.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants