Skip to content

ci: add pyodide (PyEmscripten) build and test#213

Merged
dimastbk merged 1 commit into
masterfrom
add-pyodide
Jul 13, 2026
Merged

ci: add pyodide (PyEmscripten) build and test#213
dimastbk merged 1 commit into
masterfrom
add-pyodide

Conversation

@dimastbk

@dimastbk dimastbk commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added Pyodide/Emscripten build and test coverage to CI, including artifact upload/download and Pyodide venv-based test execution.
    • Introduced Pyodide build configuration in the project settings.
  • Tests
    • CI now builds WebAssembly wheels for the Pyodide target and runs the full test suite against the built package.
  • Chores
    • Added a Pyodide lockfile and dependency input to pin the Pyodide test runner stack (including pytest).

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@dimastbk, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 16 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bbef6477-3515-47be-b73a-c7675f74ab55

📥 Commits

Reviewing files that changed from the base of the PR and between 810f7c2 and d5cd2a4.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • .github/pyodide/pylock.314.toml
  • .github/pyodide/requirements.in
  • .github/workflows/CI.yml
  • pyproject.toml
📝 Walkthrough

Walkthrough

Adds Pyodide dependency metadata and configuration, plus CI jobs that build PyEmscripten wheels, transfer them between jobs, install them in a Pyodide environment, and run pytest.

Changes

PyEmscripten CI

Layer / File(s) Summary
Pyodide dependency configuration
.github/pyodide/requirements.in, .github/pyodide/pylock.314.toml, pyproject.toml
Defines pytest~=9.0, records pinned Pyodide packages and wheel hashes, and adds the pyodide-build configuration entry.
PyEmscripten build and test pipeline
.github/workflows/CI.yml
Adds workflow configuration and jobs to configure Emscripten, build and upload wasm32-unknown-emscripten artifacts, download them into a Pyodide virtual environment, and run pytest.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant MaturinAction
  participant ArtifactStorage
  participant PyodideVenv
  participant Pytest
  GitHubActions->>MaturinAction: Build wasm32-unknown-emscripten wheels
  MaturinAction->>ArtifactStorage: Upload PyEmscripten artifacts
  GitHubActions->>ArtifactStorage: Download build artifacts
  ArtifactStorage->>PyodideVenv: Provide dist/ packages
  PyodideVenv->>Pytest: Run test suite
Loading

Poem

I’m a rabbit in a wasm-built coat,
Hopping where the test wheels float.
Pyodide locks each package tight,
Emscripten builds them overnight.
Then pytest thumps its happy feet!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding Pyodide/PyEmscripten build and test support to CI.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-pyodide

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dimastbk dimastbk force-pushed the add-pyodide branch 2 times, most recently from 8148c99 to 810f7c2 Compare July 13, 2026 07:03

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
.github/pyodide/requirements.in (1)

3-3: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Clarify the pylock.31x.toml placeholder.

The 31x wildcard is ambiguous — it could be read as a literal string. Consider pylock.{python-version-without-dot}.toml or an explicit example like pylock.314.toml for Python 3.14.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/pyodide/requirements.in at line 3, Clarify the lockfile naming
placeholder in the generation comment by replacing “pylock.31x.toml” with an
explicit Python-version-without-dot pattern or a concrete Python 3.14 example
such as “pylock.314.toml”.
.github/workflows/CI.yml (1)

98-134: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add PyEmscripten to the branch-protection gate .github/workflows/CI.yml:180-182check only needs test and lint, so test-pyemscripten is non-blocking for merges and the tag-release path. If that suite should gate PRs/releases, add it to check.needs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/CI.yml around lines 98 - 134, Update the check job’s needs
configuration to include test-pyemscripten alongside test and lint, ensuring the
PyEmscripten suite gates PR merges and tag releases while preserving the
existing check behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/CI.yml:
- Line 130: Quote the pip version constraint in the CI install command so the
shell passes pip>=26.1.1 as a single argument instead of interpreting > as
redirection, preserving the required minimum version and preventing creation of
an unintended file.

---

Nitpick comments:
In @.github/pyodide/requirements.in:
- Line 3: Clarify the lockfile naming placeholder in the generation comment by
replacing “pylock.31x.toml” with an explicit Python-version-without-dot pattern
or a concrete Python 3.14 example such as “pylock.314.toml”.

In @.github/workflows/CI.yml:
- Around line 98-134: Update the check job’s needs configuration to include
test-pyemscripten alongside test and lint, ensuring the PyEmscripten suite gates
PR merges and tag releases while preserving the existing check behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 387f7cfa-b3f6-40f6-8533-c84406e86296

📥 Commits

Reviewing files that changed from the base of the PR and between 67f72b7 and c2ce5f0.

📒 Files selected for processing (4)
  • .github/pyodide/pylock.314.toml
  • .github/pyodide/requirements.in
  • .github/workflows/CI.yml
  • pyproject.toml

Comment thread .github/workflows/CI.yml
uv sync --only-group pyodide-build
uv run pyodide venv .venv-pyodide
source .venv-pyodide/bin/activate
python -m pip install --upgrade pip>=26.1.1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Quote pip>=26.1.1 to prevent shell redirect.

Bash interprets the unquoted > in pip>=26.1.1 as a stdout redirect to a file named =26.1.1. The version constraint is silently lost and pip is upgraded to the latest version without the minimum guarantee. A spurious file =26.1.1 is also created in the working directory.

🐛 Proposed fix
-          python -m pip install --upgrade pip>=26.1.1
+          python -m pip install --upgrade 'pip>=26.1.1'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
python -m pip install --upgrade pip>=26.1.1
python -m pip install --upgrade 'pip>=26.1.1'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/CI.yml at line 130, Quote the pip version constraint in
the CI install command so the shell passes pip>=26.1.1 as a single argument
instead of interpreting > as redirection, preserving the required minimum
version and preventing creation of an unintended file.

@dimastbk dimastbk merged commit d2fb617 into master Jul 13, 2026
32 checks passed
@dimastbk dimastbk deleted the add-pyodide branch July 13, 2026 07:50
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.

1 participant