-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add out-of-tree Pyodide builds in CI for numcodecs
#529
base: main
Are you sure you want to change the base?
Add out-of-tree Pyodide builds in CI for numcodecs
#529
Conversation
This commit makes the following changes: 1. Formatting and whitespace changes 2. Removes outdated Python version references and adds references to the current supported version of Python for NumCodecs 3. Removes references to Travis and AppVeyor since GitHub Actions is being used in favour of them as a CI provider.
numcodecs
numcodecs
numcodecs
numcodecs
The workflow is currently going to fail because the file system access in Emscripten has a bug with saving @rgommers and I had fixed a similar error in PyWavelets/pywt#701 by converting all of the |
Thanks, @agriyakhetarpal. I've launched the workflows. |
Ah, I think the |
Never mind, looks like #528 is already on it – I can wait and rebase later after that gets merged. For the relevant jobs here, the Pyodide wheel build succeeds while the tests fail because of the reasons described above, and the rest of the test suite passes. |
Marking this PR as a draft till there is a fix for this on the Pyodide and Emscripten ends. I will put my focus on an accompanying CI job and associated fixes for the Zarr repository. |
It's been a while since this PR has been opened, could we get the ball rolling by temporarily skipping the previously failing test for now? I feel that |
I've created pyodide/pyodide#5169 and pyodide/pyodide#5172 (please see above) for adding some missing dependencies to Pyodide. As a temporary measure, I've skipped the sole test that requires an updated version of the |
54f0db8
to
bf42491
Compare
https://github.com/agriyakhetarpal/numcodecs/actions/runs/11746955955 via my fork is the first passing workflow run, with a few caveats:
The rest of the skips/xfails are the usual WASM limitations where the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update from my previous comment above: I've cleaned up and merged the latest changes from the main
branch, and agriyakhetarpal/numcodecs/actions/runs/12572995519/job/35045552245 via my fork passes all tests. We released https://github.com/pyodide/pyodide/releases/tag/0.27.0 yesterday, and I've bumped to it here.
crc32c
was upgraded to version 2.7.1 in Bumpcrc32c
to version 2.7.1 pyodide/pyodide#5169 to fulfill the requirement, and is now available as a part of Pyodide 0.27.- I did add
zfpy
in Addzfp
andzfpy
pyodide/pyodide#5172, but it appears that an upper bound on NumPy has been added here because it doesn't support it yet (Numpy 2.0 LLNL/zfp#210). Though, FWIW, via Update to NumPy v2 and bump versions for several dependent packages pyodide/pyodide#4925, we bumped to NumPy v2 and did not find any problems with building and/or testingzfpy
against it in specific. Unfortunately, we don't have support for multiple versions per package yet in the Pyodide distribution since it contains the distribution and all the WASM wheels together, so thezfpy
-specific test(s) will have to remain disabled. Work is in progress to unvendor the packages from the Pyodide runtime and is one of our goals with Pyodide 0.28 later in the year.
Overall, this is the result from the test suite: 786 passed, 49 skipped, 36 xfailed in 23.22s
, which does seem quite promising.
Gentle ping, @joshmoore!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am also happy to upstream this patch (and the one below) to Blosc if it is suggested to do so. :)
# Install the built numcodecs WASM wheel and relevant dependencies | ||
pip install $(ls dist/*.whl)"[msgpack,crc32c,test,test_extras]" | ||
# TODO: get zfpy built in Pyodide and install it here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zfpy
has been built in Pyodide, but against NumPy v2 (as described above). There is a chance that the tests should work with NumPy >=2, too if I were to install it separately instead of using the [zfpy]
extra. I'm open to test that out if asked.
on: | ||
# TODO: refine after this is ready to merge | ||
[push, pull_request, workflow_dispatch] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on: | |
# TODO: refine after this is ready to merge | |
[push, pull_request, workflow_dispatch] | |
on: [push, pull_request] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
This PR adds a CI job (
emscripten-ci.yaml
) that builds WASM wheels for numcodecs for use in Pyodide-based environments using the Emscripten toolchain. This was discussed in one of the community meetings for Zarr where it was said that this change would be welcome as a pull request, and follow-up work after this is complete is planned:TODO:
Additional context
Some xrefs for reviewers and project maintainers:
scikit-image
): Build and test PyWavelets Pyodide wheels in CI PyWavelets/pywt#701 and Upload dev wheels to Anaconda.org + revamp wheels publishing workflow PyWavelets/pywt#714pandas
repository BLD, TST: Build and test Pyodide wheels forpandas
in CI pandas-dev/pandas#57896scikit-image
scikit-image/scikit-image#7350