-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BLD, TST: Build and test Pyodide wheels for pandas
in CI
#57896
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
Merged
Merged
Changes from 14 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
748432e
Create initial Pyodide workflow
agriyakhetarpal 05b2400
Do not import pandas folder from the repo
agriyakhetarpal f159469
Install hypothesis for testing
agriyakhetarpal 1713c86
Add pytest decorator to skip tests on WASM
agriyakhetarpal 47f48a6
Skip `time.tzset()` tests on WASM platforms
agriyakhetarpal 6cf568e
Skip file system access tests on WASM
agriyakhetarpal 9fe1904
Skip two more tzset test failures
agriyakhetarpal 3f07fa9
Skip two more FS failures on WASM
agriyakhetarpal bbc8868
Resolve last two tzset failures on WASM
agriyakhetarpal f049ac2
Add a `WASM` constant for Emscripten platform checks
agriyakhetarpal 4d4c017
Fix floating point imprecision with `np.timedelta64`
agriyakhetarpal feaac77
Mark tz OverflowError as xfail on WASM
agriyakhetarpal f8b5831
Merge branch 'main' into add-emscripten-ci
agriyakhetarpal d54d198
Try to fix OverflowError with date ranges
agriyakhetarpal 294ab6e
Move job to unit tests workflow, withdraw env vars
agriyakhetarpal cc233e4
Fix up a few style errors, use WASM variable
agriyakhetarpal dab4675
Merge branch 'main' into add-emscripten-ci
agriyakhetarpal a944f52
Bump Pyodide to `0.25.1`
agriyakhetarpal 8a61292
Merge latest changes from main
agriyakhetarpal 6ba8636
Use shorter job name
agriyakhetarpal 75da87f
Skip test where warning is not raised properly
agriyakhetarpal 8c357a3
Don't run `test_date_time` loc check on WASM
agriyakhetarpal 2a3270f
Don't run additional loc checks in `test_sas7bdat`
agriyakhetarpal e1002f5
Disable WASM OverflowError
agriyakhetarpal 13973bb
Skip tests requiring fp exception support
agriyakhetarpal 24b3e6d
xfail tests that require stricter tolerances
agriyakhetarpal dce2705
xfail test where `OverflowError`s are received
agriyakhetarpal 029de34
Merge branch 'main' into add-emscripten-ci
agriyakhetarpal 7f4715f
Remove upper-pin from `pydantic`
agriyakhetarpal 9f46528
Better skip messages via `pytest.skipif` decorator
agriyakhetarpal 51f8893
Import `WASM` var via public API where possible
agriyakhetarpal ab911d1
Unpin `pytest` for Pyodide job
agriyakhetarpal b262b35
Merge main again
agriyakhetarpal 7371f64
Add reason attr when using boolean to skip test
agriyakhetarpal 05b19a4
Merge branch 'main' into add-emscripten-ci
agriyakhetarpal ef7a3ab
Don't xfail, skip tests that bring `OverflowError`s
agriyakhetarpal c089852
Skip timedelta test that runs well only on 64-bit
agriyakhetarpal 6a907c1
Skip tests that use `np.timedelta64`
agriyakhetarpal 96488f4
Merge branch 'main' into add-emscripten-ci
mroeschke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Test Emscripten/Pyodide build | ||
|
||
on: | ||
# TODO: refine when this workflow should run when this | ||
# is ready for use or before merging | ||
pull_request: | ||
push: | ||
workflow_dispatch: | ||
|
||
env: | ||
FORCE_COLOR: 3 | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-wasm-emscripten: | ||
name: Build pandas distribution for Pyodide | ||
runs-on: ubuntu-22.04 | ||
# To enable this workflow on a fork, comment out: | ||
# if: github.repository == 'pandas-dev/pandas' | ||
env: | ||
PYODIDE_VERSION: 0.25.0 | ||
# PYTHON_VERSION and EMSCRIPTEN_VERSION are determined by PYODIDE_VERSION. | ||
# The appropriate versions can be found in the Pyodide repodata.json | ||
# "info" field, or in Makefile.envs: | ||
# https://github.com/pyodide/pyodide/blob/main/Makefile.envs#L2 | ||
PYTHON_VERSION: 3.11.3 | ||
EMSCRIPTEN_VERSION: 3.1.46 | ||
NODE_VERSION: 18 | ||
agriyakhetarpal marked this conversation as resolved.
Show resolved
Hide resolved
|
||
steps: | ||
- name: Checkout pandas | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python ${{ env.PYTHON_VERSION }} | ||
id: setup-python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Set up Emscripten toolchain | ||
uses: mymindstorm/setup-emsdk@v14 | ||
with: | ||
version: ${{ env.EMSCRIPTEN_VERSION }} | ||
actions-cache-folder: emsdk-cache | ||
|
||
- name: Install pyodide-build | ||
run: pip install "pydantic<2" pyodide-build==${{ env.PYODIDE_VERSION }} | ||
|
||
- name: Build pandas for Pyodide | ||
run: | | ||
# pyodide build -Ceditable-verbose=true | ||
pyodide build | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Set up Pyodide virtual environment | ||
run: | | ||
pyodide venv .venv-pyodide | ||
source .venv-pyodide/bin/activate | ||
pip install dist/*.whl | ||
|
||
- name: Test pandas for Pyodide | ||
run: | | ||
source .venv-pyodide/bin/activate | ||
export PANDAS_CI=1 | ||
pip install "pytest<8.1.0" hypothesis | ||
# do not import pandas from the checked out repo | ||
cd .. | ||
python -c 'import pandas as pd; pd.test(extra_args=["-m not clipboard and not single_cpu and not slow and not network and not db"])' |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.