ci: add pyodide (PyEmscripten) build and test#213
Conversation
|
Warning Review limit reached
Next review available in: 16 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAdds 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. ChangesPyEmscripten CI
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
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
8148c99 to
810f7c2
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
.github/pyodide/requirements.in (1)
3-3: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueClarify the
pylock.31x.tomlplaceholder.The
31xwildcard is ambiguous — it could be read as a literal string. Considerpylock.{python-version-without-dot}.tomlor an explicit example likepylock.314.tomlfor 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 winAdd PyEmscripten to the branch-protection gate
.github/workflows/CI.yml:180-182—checkonly needstestandlint, sotest-pyemscriptenis non-blocking for merges and the tag-release path. If that suite should gate PRs/releases, add it tocheck.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
📒 Files selected for processing (4)
.github/pyodide/pylock.314.toml.github/pyodide/requirements.in.github/workflows/CI.ymlpyproject.toml
| 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 |
There was a problem hiding this comment.
🎯 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.
| 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.
Summary by CodeRabbit