Repository navigation
4.0.0: run on the pyjs npm package's JavaScript (pyjs >= 6); pixi - #20
Merged
Merged
Conversation
The runner broke with pyjs 5.2 (the classic init API it used is gone). It now drives pyjs through the npm package's JavaScript (`initializePyjsRuntime`), with the same surface API (`pyjs_code_runner run script ...`, `run(...)`), so pytester keeps working unchanged. Where pyjs and python come from: - `--conda-env`: an emscripten-forge env with pyjs >= 6. Its runtime and the npm JavaScript (lib_js/pyjs/npm, shipped by the pyjs conda package) are used and the env is packed with empack: exactly what is installed runs, e.g. a python, pyjs and package that were just built locally. - `--pyjs-npm <spec | dir | .tgz>`: the npm package with its own runtime and environment; extra conda packages via `--package` (repeatable), `--arch`. Simplified: one browser backend (playwright, main thread or worker, stdlib http server; web/index.html, worker.js, run.js) instead of the per-backend html / js / servers; the node backend and appdirs are gone. Uncaught errors and unhandled rejections in the page end the run instead of hanging. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pixi.toml / pixi.lock replace dev-env.yml / dev-env-pip.yml:
`pixi run test [browsers]` installs the playwright browsers and runs the
tests; the CI runs the same task (one job per browser, setup-pixi).
playwright (node driver) and playwright-python are pinned to the same
minor version: a mismatch fails every browser launch ("timeout: expected
float, got undefined"). The tests create their emscripten env with the
micromamba of the pixi env (or $MAMBA_EXE).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…st-conda The CI runs the npm mode (pixi run test, @derthorsten/pyjs@6.0.1, PYJS_CODE_RUNNER_TEST_NPM): pyjs-dev >= 6 is not on the emscripten-forge channel yet. The conda mode (pixi run test-conda, an emscripten-forge env with pyjs-dev >= 6, e.g. a local recipe build) runs locally. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DerThorsten
marked this pull request as ready for review
November 27, 2026 09:48
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
pyjs >= 6 (the classic init API the runner used is gone since pyjs 5.2): the runner drives pyjs through the JavaScript of the pyjs npm package (
initializePyjsRuntime), with the same CLI /run(...)surface, so pytester keeps working.--conda-env: an emscripten-forge env with pyjs >= 6; its runtime + the npm JavaScript (lib_js/pyjs/npm, shipped by the pyjs conda package) are used, the env is packed with empack--pyjs-npm <spec | dir | .tgz>: an npm package with its own runtime and env, extra conda packages via--packagepixi replaces
dev-env.yml/dev-env-pip.yml:pixi run test [browsers](local == CI, setup-pixi, one job per browser). playwright and playwright-python are pinned to the same minor version (a mismatch fails every launch).Tested locally with a local pyjs 6 recipe build (
PYJS_CODE_RUNNER_TEST_CHANNEL): chromium, firefox, webkit, main + worker, all pass.Draft until pyjs-dev 6 is on the emscripten-forge 6x channel (the tests install it). The recipes pin pytester to
pyjs_code_runner 3.2.*(emscripten-forge/recipes#8721), so releasing 4.0.0 does not affect recipe tests until the pin is bumped.🤖 Generated with Claude Code