Skip to content
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

Support for pyodide 0.27.1, including pyarrow + pandas #2901

Merged
merged 4 commits into from
Feb 2, 2025

Conversation

tomjakubowski
Copy link
Contributor

@tomjakubowski tomjakubowski commented Jan 23, 2025

  • Switch to using global CMAKE_CXX_FLAGS to ensure every target we
    need to link, including all Arrow components, is built with Emscripten
    exceptions support. The build already does the same thing for wasm
    exceptions so it's at least more consistent now.
  • Add two regression tests to the pytest-pyodide suite for pyarrow and
    pandas examples, which were previously crashing due to inconsistent
    Emscripten exceptions support between the object files

Also includes:

  • small devex fix for the setup script when using Pyodide
  • splits CI job for Pyodide wheel into build/test, uploads the artifact even when test suite fails

Pull Request Checklist

  • Description which clearly states what problems the PR solves.
  • Description contains a link to the Github Issue, and any relevent
    Discussions, this PR applies to. (N/A)
  • Include new tests that fail without this PR but passes with it.
  • Include any relevent Documentation changes related to this change.
  • Verify all commits have been signed in accordance with the DCO policy.
  • Reviewed PR commit history to remove unnecessary changes.
  • Make sure your PR passes build, test and lint steps completely.

@tomjakubowski tomjakubowski force-pushed the bugfix/pyodide-0.27 branch 2 times, most recently from 5e18b93 to 5e5eb22 Compare January 23, 2025 03:27
@@ -168,7 +168,14 @@ async function focus_package() {
message: "Focus NPM package(s)?",
default: () => {
if (CONFIG["PACKAGE"]) {
return CONFIG["PACKAGE"].split(",");
const packages = CONFIG["PACKAGE"].split(",");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

to test this, runpnpm -w run setup, select perspective-pyodide. then run setup again. perspective-pyodide should be still selected in the menu.

previously the menu selected perspective-python on the second go - which made it easy to accidentally switch back to cpython

@tomjakubowski tomjakubowski force-pushed the bugfix/pyodide-0.27 branch 2 times, most recently from e0b1bfc to 5e40a9e Compare January 24, 2025 02:35
Signed-off-by: Tom Jakubowski <tom@prospective.dev>
@tomjakubowski tomjakubowski force-pushed the bugfix/pyodide-0.27 branch 2 times, most recently from 6b1ab04 to 63ee460 Compare January 28, 2025 00:27
@tomjakubowski tomjakubowski marked this pull request as ready for review January 28, 2025 01:48
- Switch to using global `CMAKE_CXX_FLAGS` to ensure every target we
  need to link, including all Arrow components, is built with Emscripten
  exceptions support.  The build already does the same thing for wasm
  exceptions so it's at least more consistent now.
- Add two regression tests to the pytest-pyodide suite for pyarrow and
  pandas examples, which were previously crashing due to inconsistent
  Emscripten exceptions support between the object files

Signed-off-by: Tom Jakubowski <tom@prospective.dev>
Signed-off-by: Tom Jakubowski <tom@prospective.dev>
Signed-off-by: Tom Jakubowski <tom@prospective.dev>
@tomjakubowski
Copy link
Contributor Author

I think that's a spurious test failure. I can't restart Actions runs in this repo, but I did do a manual dispatch on my fork: https://github.com/tomjakubowski/perspective/actions/runs/13041122245

shell: bash
run: python -m playwright install
if: ${{ inputs.pyodide == 'true' }}

Copy link
Member

Choose a reason for hiding this comment

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

Why did we move these?

@@ -338,6 +338,15 @@ if(PSP_PYODIDE)
string(APPEND CMAKE_CXX_FLAGS "${RELOCATABLE_FLAGS}")
endif()

if(PSP_PYODIDE)
Copy link
Member

Choose a reason for hiding this comment

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

I propose we set this for everything.

@texodus texodus merged commit 3ccef43 into finos:master Feb 2, 2025
14 checks passed
@texodus texodus added the internal Internal refactoring and code quality improvement label Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Internal refactoring and code quality improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants