Skip to content

SWR pydata__xarray-10219 - #34

Open
richeshgupta wants to merge 2 commits into
swr-base-daa73a5from
swr-head-daa73a5
Open

richeshgupta wants to merge 2 commits into
swr-base-daa73a5from
swr-head-daa73a5

Conversation

@richeshgupta

Copy link
Copy Markdown

SWRBench case pydata__xarray-10219: pinned base aa9e2bd to head daa73a5 of pydata#10219. Benchmark replay, not for merge.

@razorpay-slash razorpay-slash Bot 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.

Automated code review

Reviewed up to daa73a5.
All 5 reviewers completed.

Comment thread xarray/core/datatree.py
# TODO Refactor xarray upstream to avoid needing to overwrite this.
# TODO This copied version will drop all attrs - the keep_attrs stuff should be re-instated
if keep_attrs is None:
keep_attrs = _get_keep_attrs(default=False)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[MEDIUM] Global keep_attrs option is never tested with DatasetView.map()

Issue

map() now resolves keep_attrs=None through _get_keep_attrs(default=False), which respects the global keep_attrs option, but no test exercises this with xr.set_options(keep_attrs=True). Only the default resolution is covered, so a regression that ignores the global option would go undetected.

Evidence

CONFIRMED: the only new test, test_map_keep_attrs in xarray/tests/test_datatree.py, passes explicit keep_attrs=True or relies on the unset default; no test addition calls set_options. The removed TODO stating the copied version 'will drop all attrs' confirms keep_attrs support in map() is new in this PR, so no pre-existing test covers the global-option path.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants