Skip to content

Conversation

@timothey-cs
Copy link
Collaborator

@timothey-cs timothey-cs commented Dec 3, 2025

Fixes #112

Add augment_from_xarray function to EOProduct.
It takes values from to_xarray and add cube:dimensions and cube:variables to product properties

@timothey-cs timothey-cs requested a review from sbrunato December 3, 2025 14:45
@timothey-cs timothey-cs self-assigned this Dec 3, 2025
@timothey-cs timothey-cs changed the title feat: add argument_from_xarray for EOProduct feat: add augment_from_xarray for EOProduct Dec 3, 2025
@timothey-cs timothey-cs force-pushed the feat/add_argument_from_xarray branch from 7d40d45 to 556fc1a Compare December 3, 2025 15:09
@timothey-cs timothey-cs force-pushed the feat/add_argument_from_xarray branch from 556fc1a to 9ec4e69 Compare December 3, 2025 15:11
@sbrunato sbrunato marked this pull request as draft December 8, 2025 09:59
@timothey-cs timothey-cs force-pushed the feat/add_argument_from_xarray branch from cb42244 to 2732f2d Compare December 8, 2025 14:48
@timothey-cs timothey-cs marked this pull request as ready for review December 8, 2025 14:55
@timothey-cs timothey-cs requested a review from sbrunato December 8, 2025 14:55
@timothey-cs timothey-cs force-pushed the feat/add_argument_from_xarray branch from e30a35c to 3d582f3 Compare December 15, 2025 14:25
@timothey-cs timothey-cs requested a review from sbrunato December 15, 2025 14:26
@sbrunato sbrunato marked this pull request as draft December 19, 2025 08:24
@timothey-cs timothey-cs force-pushed the feat/add_argument_from_xarray branch from e3d9642 to fa09195 Compare December 19, 2025 10:16
@timothey-cs timothey-cs force-pushed the feat/add_argument_from_xarray branch from fa09195 to aab2a24 Compare December 19, 2025 10:18
@timothey-cs timothey-cs marked this pull request as ready for review December 19, 2025 10:20
@timothey-cs timothey-cs requested a review from sbrunato December 19, 2025 10:20
@timothey-cs timothey-cs requested a review from sbrunato January 6, 2026 10:00
@timothey-cs timothey-cs force-pushed the feat/add_argument_from_xarray branch from bbea061 to 1a474f9 Compare January 6, 2026 10:42
Copy link
Collaborator

Choose a reason for hiding this comment

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

please add tests. Total coverage went from 86.54% to 66.51%

Copy link
Collaborator

Choose a reason for hiding this comment

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

please move new "sub-methods" to another file like utils/metadata.py

@timothey-cs timothey-cs force-pushed the feat/add_argument_from_xarray branch from 9e1ef7c to f790f7b Compare January 6, 2026 14:24
@timothey-cs timothey-cs force-pushed the feat/add_argument_from_xarray branch from 5c8cd2f to 662498a Compare January 6, 2026 15:27
@timothey-cs timothey-cs requested a review from sbrunato January 6, 2026 15:34
Comment on lines +105 to +106
"description": var.attrs.get("long_name", ""),
"nodata": var.attrs.get("nodata", -9999),
Copy link
Collaborator

Choose a reason for hiding this comment

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

do not use default values. If value is not found, do not add description / nodata

Comment on lines +105 to +106
"description": var.attrs.get("long_name", ""),
"nodata": var.attrs.get("nodata", -9999),
Copy link
Collaborator

@sbrunato sbrunato Jan 9, 2026

Choose a reason for hiding this comment

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

for nodata, please also check _FillValue and missing_value in data_array.encoding

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.

augment from xarray

3 participants