Fix Cubed workflow: Python 3.12 and dict chunks - #1345
Merged
Merged
Conversation
cubed and cubed-xarray now require Python >=3.12, so the install step
has been failing with:
ERROR: Package 'cubed' requires a different Python: 3.11.16 not in '>=3.12'
With xarray installed from main, the Cubed workflow fails because
warnings are treated as errors and DataArray.chunk() now warns when
given a dimension-ordered tuple:
FutureWarning: Supplying chunks as dimension-order tuples is
deprecated. It will raise an error in the future. Instead use a
dict with dimension names as keys.
Spell out the dimension names in the test parametrizations instead,
and update the hint in pca.py to match.
Closed
Billyzhang1229
marked this pull request as ready for review
September 3, 2026 16:22
jeromekelleher
approved these changes
Sep 4, 2026
jeromekelleher
left a comment
Member
There was a problem hiding this comment.
This seems like a clear win too. Would you like to take a look @tomwhite?
tomwhite
approved these changes
Sep 4, 2026
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 free
to 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.
The Cubed workflow has been red for a while. Two independent problems:
cubedandcubed-xarraynow require Python >= 3.12, so the install step failed:First commit bumps the job to 3.12.
With that fixed, 10 tests failed because xarray main now warns on tuple chunks and warnings are errors:
Second commit rewrites the test parametrizations to use dimension names (
{"variants": 100, "samples": 10, "ploidy": -1}instead of(100, 10, -1)), so the call sites stay as they were. Also updates the rechunking hint inpca.pyto the dict form. Tests pass locally against both the pinned xarray 2025.3.0 and xarray main.Verified green on my fork: https://github.com/Billyzhang1229/sgkit/actions/runs/33771138386