Skip to content

[pull] main from pydata:main#992

Merged
pull[bot] merged 1 commit intoIllviljan:mainfrom
pydata:main
Apr 24, 2026
Merged

[pull] main from pydata:main#992
pull[bot] merged 1 commit intoIllviljan:mainfrom
pydata:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Apr 24, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

#10718)

* Fix assert_equal with check_dim_order=False for Datasets with mixed dimension orders

Fixes #10704

The bug: assert_equal with check_dim_order=False was failing when comparing
Datasets containing variables with different dimension orders. It would even
fail when comparing a Dataset to itself.

The fix: Transpose both objects to a canonical dimension order using the
intersection of their dimensions. The ellipsis (...) handles any dimensions
unique to either object, making the solution general and elegant.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Address review feedback: avoid sorting non-sortable dimension names

- Use list(common_dims) instead of sorted(common_dims) since dimensions
  only need to be hashable, not sortable
- Add test case for datasets with non-sortable dimension names (e.g., int and str)
- Transpose both a and b to the same canonical order for consistency

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add full test coverage for maybe_transpose_dims changes

- Add test for no common dimensions path
- Add test for Variable type specifically (not just DataArray)
- Now all code paths in maybe_transpose_dims are covered

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix DataTree handling in maybe_transpose_dims

The reviewer was correct - the DataTree handling was wrong. We were only
transposing b, but for consistency we need to transpose both a and b
to the same canonical order, just like we do for Dataset.

This fixes the issue and adds a comprehensive test case.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Trigger CI re-run for flaky Zarr test

* Simplify DataTree handling in maybe_transpose_dims

Use single map_over_datasets call instead of two separate calls.
map_over_datasets supports tuple returns and unpacks them automatically,
making the explicit lambda extraction unnecessary.

Co-authored-by: Claude <noreply@anthropic.com>

* Fix RTD builds by restricting test-nightly to linux/macOS platforms

The `test-nightly` environment uses pandas nightly wheels from PyPI,
which currently don't have win-64 builds available. This causes
`pixi lock` to fail when solving for all platforms.

RTD builds fail because they have no lock file cache (unlike GitHub
Actions CI which caches pixi.lock). When RTD runs `pixi install -e doc`,
pixi must generate the lock file from scratch, which fails on the
unsolvable test-nightly/win-64 combination.

This restriction can be removed once pandas nightly provides win-64
wheels again.

Co-authored-by: Claude <noreply@anthropic.com>

* Remove redundant numpy imports in test functions

Co-authored-by: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Mathias Hauser <mathause@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators Apr 24, 2026
@pull pull Bot added the ⤵️ pull label Apr 24, 2026
@pull pull Bot merged commit d9ef1f0 into Illviljan:main Apr 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant