Skip to content

Pretty _repr_html_ of cube dimension metadata - #955

Draft
soxofaan wants to merge 10 commits into
masterfrom
issue827-cube-metadata-viz
Draft

soxofaan wants to merge 10 commits into
masterfrom
issue827-cube-metadata-viz

Conversation

@soxofaan

@soxofaan soxofaan commented Oct 9, 2026

Copy link
Copy Markdown
Member

for #827

@soxofaan
soxofaan force-pushed the issue827-cube-metadata-viz branch from c24bb72 to fbbf322 Compare October 9, 2026 13:01
@soxofaan

soxofaan commented Oct 9, 2026

Copy link
Copy Markdown
Member Author

Current state of the visualization (just table for now):

image

note that the temporal and spatial extents are still the unfiltered extents of the original collection, instead of the actual cube extents

@soxofaan soxofaan changed the title Rudimentary _repr_html_ of cube dimension metadata Pretty _repr_html_ of cube dimension metadata Oct 9, 2026
@soxofaan
soxofaan requested a balanced review from Copilot October 9, 2026 21:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Temporal extent handling and HTML rendering contain runtime failures for supported metadata and open-ended intervals.

7 open findings
What changed in this PR

Adds richer Jupyter rendering for cube metadata, addressing #827, while tracking temporal extents through filtering operations.

Changes:

  • Adds HTML dimension tables to raster and vector cube representations.
  • Introduces temporal interval intersection and extent markers.
  • Adds rendering tests and a changelog entry.
File Description
CHANGELOG.md Documents the Jupyter representation.
openeo/​dates.py Adds datetime migration note.
openeo/​metadata/​__init__.py Adds rendering and temporal filtering.
openeo/​metadata/​_extents.py Defines special extent markers.
openeo/​metadata/​_jupyter.py Renders dimension metadata tables.
openeo/​rest/​_datacube.py Names process-graph HTML output.
openeo/​rest/​datacube.py Combines metadata and graph rendering.
openeo/​rest/​vectorcube.py Adds metadata rendering to vector cubes.
openeo/​util.py Adds datetime migration notes.
openeo/​utils/​datetime.py Implements datetime intervals.
tests/​metadata/​test_jupyter.py Tests table rendering.
tests/​metadata/​test_metadata.py Tests metadata HTML output.
tests/​rest/​datacube/​test_datacube.py Tests cube HTML composition.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread openeo/metadata/__init__.py Outdated
Comment thread openeo/metadata/_jupyter.py
Comment thread openeo/utils/datetime.py Outdated
Comment thread openeo/utils/datetime.py
Comment thread openeo/metadata/__init__.py
Comment thread openeo/metadata/_extents.py Outdated
Comment thread openeo/rest/vectorcube.py
@soxofaan
soxofaan force-pushed the issue827-cube-metadata-viz branch from 54f4316 to 9b9f13f Compare October 12, 2026 10:19
@soxofaan
soxofaan requested a balanced review from Copilot October 12, 2026 10:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Comment thread openeo/utils/datetime.py Outdated
Comment thread openeo/metadata/__init__.py
@soxofaan
soxofaan force-pushed the issue827-cube-metadata-viz branch 2 times, most recently from 281ce2b to a2ab17a Compare October 12, 2026 13:16
@soxofaan
soxofaan requested a balanced review from Copilot October 12, 2026 13:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Half-open temporal filters can currently produce a non-empty metadata extent when the query contains no matching instants.

5 open findings
2 resolved since last review

🧠 Review effort: Balanced

Comment thread openeo/metadata/__init__.py Outdated
Comment thread openeo/metadata/__init__.py Outdated
Comment thread openeo/utils/datetime.py
Comment thread openeo/utils/datetime.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Dynamic temporal bounds can raise errors, and successive filters lose exclusive-end semantics.

1 open finding
5 resolved since last review

🧠 Review effort: Balanced

Comment thread openeo/metadata/__init__.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Successive temporal filters lose end-exclusive semantics and can produce an incorrect non-empty extent.

1 open finding
1 resolved since last review

🧠 Review effort: Balanced

Comment thread openeo/metadata/__init__.py
@soxofaan soxofaan self-assigned this Oct 13, 2026
soxofaan added a commit that referenced this pull request Oct 15, 2026
soxofaan added a commit that referenced this pull request Oct 15, 2026
(re)group test functions in relevant test classes
for better overview and easier future evolution

refs #949 #827 #955
@soxofaan
soxofaan marked this pull request as draft October 15, 2026 13:53
@soxofaan
soxofaan requested a balanced review from Copilot October 16, 2026 12:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Supported unnamed STAC bands cause the new notebook renderer to raise TypeError.

1 open finding

🧠 Review effort: Balanced

Comment thread openeo/metadata/_jupyter.py Outdated
Trying to keep all this into account:
- keep existing public API
- support for parameterized/dynamic `filter_temporal`
- handle empty temporal extent properly
- calculate real temporal intersection
- don't require metadata


refs #827, #949
(re)group test functions in relevant test classes
for better overview and easier future evolution

refs #949 #827 #955
@soxofaan
soxofaan force-pushed the issue827-cube-metadata-viz branch from 2c9608e to 1cb1141 Compare October 16, 2026 15:42
@soxofaan
soxofaan requested a balanced review from Copilot October 16, 2026 15:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Spatial metadata propagation has correctness regressions, and existing REST test expectations remain incompatible with the new representation.

5 open findings
1 resolved since last review

🧠 Review effort: Balanced

Comment thread openeo/metadata/__init__.py
Comment thread openeo/metadata/__init__.py Outdated
Comment thread openeo/metadata/__init__.py
Comment thread openeo/metadata/__init__.py
Comment thread openeo/rest/datacube.py
@soxofaan
soxofaan force-pushed the issue827-cube-metadata-viz branch from fc3d941 to fc76003 Compare October 19, 2026 10:15
soxofaan added a commit that referenced this pull request Oct 19, 2026
@soxofaan
soxofaan force-pushed the issue827-cube-metadata-viz branch from b37c6bb to 868cdc8 Compare October 20, 2026 14:07
@soxofaan
soxofaan requested a balanced review from Copilot October 20, 2026 14:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Comment thread openeo/metadata/__init__.py

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Cubes with a z axis lose horizontal-dimension detection and can lose spatial metadata during resampling.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment on lines +411 to +413
if spatial_dims := sorted((d for d in dimensions if isinstance(d, SpatialDimension)), key=lambda d: d.axis):
if [d.axis for d in spatial_dims] == ["x", "y"]:
self._spatial_dimensions = SpatialDimensionsXY(x=spatial_dims[0], y=spatial_dims[1])

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