Skip to content

Fix Cubed workflow: Python 3.12 and dict chunks - #1345

Merged
tomwhite merged 2 commits into
sgkit-dev:mainfrom
Billyzhang1229:ci-cubed-py312
Sep 4, 2026
Merged

tomwhite merged 2 commits into
sgkit-dev:mainfrom
Billyzhang1229:ci-cubed-py312

Conversation

@Billyzhang1229

Copy link
Copy Markdown
Contributor

The Cubed workflow has been red for a while. Two independent problems:

  1. cubed and cubed-xarray now require Python >= 3.12, so the install step failed:

    ERROR: Package 'cubed' requires a different Python: 3.11.16 not in '>=3.12'
    

    First commit bumps the job to 3.12.

  2. With that fixed, 10 tests failed because xarray main now warns on tuple chunks and warnings are errors:

    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.
    

    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 in pca.py to 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

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.
@Billyzhang1229 Billyzhang1229 mentioned this pull request Sep 3, 2026
@Billyzhang1229
Billyzhang1229 marked this pull request as ready for review September 3, 2026 16:22

@jeromekelleher jeromekelleher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seems like a clear win too. Would you like to take a look @tomwhite?

@tomwhite
tomwhite merged commit b6bb28c into sgkit-dev:main Sep 4, 2026
8 of 10 checks passed
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.

3 participants