fix: don't mark missing multiscales metadata as processed#96
Open
wietzesuijker wants to merge 2 commits intoEOPF-Explorer:mainfrom
Open
fix: don't mark missing multiscales metadata as processed#96wietzesuijker wants to merge 2 commits intoEOPF-Explorer:mainfrom
wietzesuijker wants to merge 2 commits intoEOPF-Explorer:mainfrom
Conversation
Comment on lines
266
to
268
|
|
||
| if dt_multiscale is None: | ||
| log.warning("Multiscales metadata not added", base_path=base_path) |
Contributor
There was a problem hiding this comment.
Here processed_groups is never updated...
Contributor
Author
There was a problem hiding this comment.
Yes, that's intentional, @emmanuelmathot. I added 2b43aa0 to clarify why:
multiscales metadata is written as parent-group attrs (no dataset write).
processed_groupsis used to track dataset groups written (and is later used for consolidation), so it is intentionally not updated for the attrs-only step.
The naming is perhaps not the easiest here. I added some suggestions to the PR description above
6fca5cf to
2b43aa0
Compare
- Don’t treat attrs-only multiscales writes as processed dataset groups\n- Preserve existing group attrs during root consolidation (e.g. /measurements/reflectance multiscales)\n- Add CRS/bounds fallbacks so multiscales attrs can be written from fixtures
2b43aa0 to
5f09a93
Compare
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
add_multiscales_metadata_to_parent()can legitimately returnNonewhen inputs are insufficient to generate multiscales metadata, e.g.Previously, this “skipped” outcome was still recorded in
processed_groups["/measurements/reflectance"], making runs look complete even though no multiscales metadata was written.Fix
add_multiscales_metadata_to_parent()asxr.DataTree | None.None, log an info message and do not record it inprocessed_groups.multiscales/zarr_conventions)..rio.*metadata is unavailable (fixture-like inputs):rioxarrayfor CRS/bounds when availablecrsx/ycoords when.rio.bounds()is unavailableNotes
processed_groupsintentionally tracks leaf dataset groups written (used later for consolidation), so it should not be updated for the attrs-only step.Testing
uv run pytest -q tests/test_s2_multiscale.py tests/test_s2_multiscale_geo_metadata.pyuv run pytest -q tests/test_cli_e2e.py::test_convert_s2_optimized