Uh oh!
There was an error while loading. Please reload this page.
Expression not assigned - #10507
Merged
Merged
Conversation
DimitriPapadopoulosforce-pushed
the
PYL-W0106
branch
2 times, most recently
from
July 5, 2025 11:04
ac4ab7e to
7f1bf4eCompareUh oh!
There was an error while loading. Please reload this page.
DimitriPapadopoulosforce-pushed
the
PYL-W0106
branch
from
July 6, 2025 15:15
7f1bf4e to
5f93e2dComparedcherian
reviewed
Jul 6, 2025
| unified = obj.unify_chunks() | ||
| assert_identical(obj, unified) and obj is not obj.unify_chunks() | ||
| assert_identical(obj, unified) | ||
| # assert obj is not obj.unify_chunks() |
Contributor
There was a problem hiding this comment.
Suggested change
| # assert obj is not obj.unify_chunks() | |
| assertobjisnotobj.unify_chunks() |
I think this may be right
ContributorAuthor
There was a problem hiding this comment.
The test doesn't work, that's why it has been commented out. I should probably improve the comment in commit 5f93e2d.
Besides I think it should have been:
Suggested change
| # assert obj is not obj.unify_chunks() | |
| assertobjisnotunified |
ContributorAuthor
There was a problem hiding this comment.
Uncommenting the test demonstrates the CI issue:
=========================== short test summary info ============================
FAILED xarray/tests/test_dask.py::test_unify_chunks_shallow_copy[<lambda>0-obj0] - assert <xarray.Dataset> Size: 9kB\nDimensions: (x: 10, y: 20, z: 4)\nCoordinates:\n * x (x) int64 80B 0 1 2 3 4 5 6 7 8...2B 1 1 1 1\n e (x, y) int64 2kB 100 101 102 103 104 105 ... 124 125 126 127 128\nAttributes:\n test: test is not <xarray.Dataset> Size: 9kB\nDimensions: (x: 10, y: 20, z: 4)\nCoordinates:\n * x (x) int64 80B 0 1 2 3 4 5 6 7 8...2B 1 1 1 1\n e (x, y) int64 2kB 100 101 102 103 104 105 ... 124 125 126 127 128\nAttributes:\n test: test
FAILED xarray/tests/test_dask.py::test_unify_chunks_shallow_copy[<lambda>0-obj1] - AssertionError: assert <xarray.DataArray 'a' (x: 10, y: 20)> Size: 2kB\narray([[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1....2 14 16 18\n cxy (x, y) int64 2kB 0 0 0 0 0 0 0 ... 1026 1035 1044 1053 1062 1071\nAttributes:\n test: test is not <xarray.DataArray 'a' (x: 10, y: 20)> Size: 2kB\narray([[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1....2 14 16 18\n cxy (x, y) int64 2kB 0 0 0 0 0 0 0 ... 1026 1035 1044 1053 1062 1071\nAttributes:\n test: test
= 2 failed, 19121 passed, 1041 skipped, 195 xfailed, 33 xpassed, 2864 warnings in 348.89s (0:05:48) =
Error: Process completed with exit code 1.
See for example https://github.com/pydata/xarray/actions/runs/16135835929/job/45531837533?pr=10507.
DimitriPapadopoulos
marked this pull request as ready for review
July 7, 2025 17:38
DimitriPapadopoulosforce-pushed
the
PYL-W0106
branch
from
July 7, 2025 21:00
5f93e2d to
d055a27CompareDimitriPapadopoulosforce-pushed
the
PYL-W0106
branch
from
July 8, 2025 06:31
d055a27 to
1a088aaCompareI guess the `and` was meant to disable the assertion. Commenting it out with `#` instead.
DimitriPapadopoulosforce-pushed
the
PYL-W0106
branch
from
July 8, 2025 06:35
1a088aa to
ec818f8CompareDimitriPapadopoulos
marked this pull request as draft
July 8, 2025 06:36
DimitriPapadopoulosforce-pushed
the
PYL-W0106
branch
from
July 8, 2025 07:04
0e185ee to
ec818f8CompareDimitriPapadopoulos
marked this pull request as ready for review
July 8, 2025 07:06
dcherian added a commit
to jsignell/xarray
that referenced
this pull request
Jul 18, 2025
* main: (94 commits) Restructure API documentation into organized sections (pydata#10540) Fix convert calendar with different dimension name (pydata#10544) Fix kerchunk error in docs build (pydata#10545) Call super().__init__() in st.SearchStrategy subclasses (pydata#10543) CI: update actions location (pydata#10529) meta: Fix labeler topic-documentation (pydata#10524) drop_vars: use emit_user_level_warning (pydata#10528) Pydap flaky tests (pydata#10525) Remove test skip (pydata#10523) Improve warning message and tests for timedelta decoding (pydata#10508) Add dev whats-new (pydata#10522) Add release notes for v2025.07.1 (pydata#10520) Updates for Zarr 3 Dtypes (pydata#10456) Update Custom Indexes section in api.rst (pydata#10517) Expression not assigned (pydata#10507) Raise if `Index.create_variables` returns more variables than passed in through `set_xindex` (pydata#10503) Allow setting (or skipping) new indexes in open_dataset (pydata#8051) doc: add Pandas(Multi)Index to api reference (pydata#10515) Update pre-commit hooks (pydata#10510) Update pre-commit ruff legacy alias (pydata#10511) ...
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 freeto 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.
whats-new.rstapi.rst