diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 5ca319e..457f0f8 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -5,78 +5,25 @@ on: push: pull_request: - -defaults: - run: - shell: bash -l {0} - - jobs: - test_with_conda: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - browser: [chromium, firefox, webkit] - env: - PYJS_CODE_RUNNER_TEST_BROWSERS: ${{ matrix.browser }} - steps: - - uses: actions/checkout@v4 - - - name: Install mamba - uses: mamba-org/setup-micromamba@v2 - with: - environment-file: dev-env.yml - environment-name: dev-env - init-shell: >- - bash - - # installs the browser and the system libraries it needs (via apt) - - name: Install Playwright browser - shell: bash -el {0} - run: | - playwright install --with-deps ${{ matrix.browser }} - - - name: Install pyjs-code-runner - shell: bash -el {0} - run: | - python -m pip install . --no-deps - - - name: Run Tests - shell: bash -el {0} - run: | - pytest -s -vvvvv - - - test_with_pip: + test: runs-on: ubuntu-latest strategy: fail-fast: false matrix: browser: [chromium, firefox, webkit] - env: - PYJS_CODE_RUNNER_TEST_BROWSERS: ${{ matrix.browser }} steps: - uses: actions/checkout@v4 - - name: Install mamba - uses: mamba-org/setup-micromamba@v2 + # the environment of pixi.toml (pixi.lock), cached + - uses: prefix-dev/setup-pixi@v0.9.4 with: - environment-file: dev-env-pip.yml - environment-name: dev-env - - - name: Install pyjs-code-runner - shell: bash -el {0} - run: | - python -m pip install . + pixi-version: v0.84.2 + cache: true - # installs the browser and the system libraries it needs (via apt) - - name: Install Playwright browser - shell: bash -el {0} - run: | - playwright install --with-deps ${{ matrix.browser }} + # the browser + the system libraries it needs (apt) + - name: Install the browser + run: pixi run playwright install --with-deps ${{ matrix.browser }} - - name: Run Tests - shell: bash -el {0} - run: | - pytest -s -vvvvv + - name: Run tests + run: pixi run test ${{ matrix.browser }} diff --git a/.gitignore b/.gitignore index d9005f2..120e216 100644 --- a/.gitignore +++ b/.gitignore @@ -112,6 +112,7 @@ celerybeat.pid *.sage.py # Environments +.pixi/ .env .venv env/ diff --git a/README.md b/README.md index 563522b..75bd07b 100644 --- a/README.md +++ b/README.md @@ -4,43 +4,51 @@ A driver to run python code in a wasm environment, almost like running vanilla python code. -## Motivation +## How it works -Debugging, experimenting and testing python code from a dedicated conda environment -in browser environment is a complex process with a lot of (complicated) steps. +The script runs in a browser (playwright, main thread or web worker), driven by +the JavaScript of the pyjs npm package. Where pyjs and python come from: -* create the environment for emscripten -* pack the environemtn +* **a conda env** (`--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. So exactly what + is installed there runs, e.g. a python, pyjs and a package that were just + built locally. This is what `pytester` (emscripten-forge recipe tests) uses. +* **an npm package** (`--pyjs-npm @scope/pyjs@6.0.0`, or a local package + directory / `.tgz`): its own runtime and environment; extra conda packages + with `--package ` (repeatable) are installed at runtime. -## Installation +Directories are mounted with `--mount :`. +pyjs < 6 envs are not supported anymore (use pyjs-code-runner 3.x). -Currently `pyjs-code-runner` is not available on PyPI. To install it, clone the repository and install it with `pip`: +## Installation -We first recommend to create a new conda environment for `pyjs-code-runner`: +`pyjs_code_runner` is on conda-forge: ```bash -mamba create -n pyjs-code-runner -c conda-forge python -mamba activate pyjs-code-runner +mamba install -c conda-forge pyjs_code_runner +playwright install chromium ``` -Then install `pyjs-code-runner`: +You will then need an emscripten-forge environment for the code you want to run in the browser: ```bash -git clone https://github.com/emscripten-forge/pyjs-code-runner -cd pyjs-code-runner -python -m pip install -e . +micromamba create -n my_env --platform=emscripten-wasm32 \ + -c https://repo.prefix.dev/emscripten-forge/6x -c conda-forge \ + python numpy "pyjs-dev>=6" ``` -Then install the browser for use with Playwright: - -```bash -playwright install -``` +## Development -You will then need another conda environment for the code you want to run in the browser. Here we specify the `emscripten-forge` channel and the `emscripten-32` platform: +With [pixi](https://pixi.sh): ```bash -mamba create -n my_env -c https://repo.mamba.pm/emscripten-forge -c https://repo.mamba.pm/conda-forge --platform=emscripten-32 python numpy pyjs +# npm mode: pyjs from the published npm package (what the CI runs) +pixi run test # chromium +pixi run test "chromium firefox webkit" +# conda mode: an emscripten-forge env with pyjs-dev >= 6 (local); a local +# recipe build (e.g. a new pyjs) is searched first: +PYJS_CODE_RUNNER_TEST_CHANNEL=/path/to/recipes/output pixi run test-conda ``` You might want to add more dependencies to this environment, depending on the code you would like to run. diff --git a/dev-env-pip.yml b/dev-env-pip.yml deleted file mode 100644 index 657a9bd..0000000 --- a/dev-env-pip.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: ci-env -channels: - - conda-forge -dependencies: - - python - - pip - - pytest - - pytest-sugar - - typer - - appdirs - - empack >=3,<4 - - rich diff --git a/dev-env.yml b/dev-env.yml deleted file mode 100644 index b3aac02..0000000 --- a/dev-env.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: ci-env -channels: - - conda-forge -dependencies: - - python - - pip - - pytest - - pytest-sugar - - typer - - appdirs - - empack >=3,<4 - - playwright - - playwright-python - - emsdk - - rich diff --git a/pixi.lock b/pixi.lock new file mode 100644 index 0000000..0180ab5 --- /dev/null +++ b/pixi.lock @@ -0,0 +1,2230 @@ +version: 7 +platforms: +- name: linux-64 + virtual-packages: + - __unix=0 + - __linux=4.18 + - __glibc=2.28 + - __archspec=0=x86_64 +- name: osx-64 + virtual-packages: + - __unix=0 + - __osx=13.0 + - __archspec=0=x86_64 +- name: osx-arm64 + virtual-packages: + - __unix=0 + - __osx=13.0 + - __archspec=0=m1 +environments: + default: + channels: + - url: https://conda.anaconda.org/conda-forge/ + indexes: + - https://pypi.org/simple + packages: + linux-64: + - conda: https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-20_gnu.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-hda65f42_10.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/c-ares-1.34.9-hebe6cf0_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/charset-normalizer-3.5.3-h1114479_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/greenlet-3.5.6-py315hd4f243e_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/icu-79.1-py314hb486520_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.46.1-bootstrap_ha15bf96_3.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libabseil-20260817.0-cxx17_hbb87c76_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libbrotlicommon-1.2.1-h39a168f_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libbrotlidec-1.2.1-ha411449_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libbrotlienc-1.2.1-h018ffa1_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libedit-3.1.20260512-pl5321h373387f_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libev-4.33-h280c20c_3.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libexpat-2.11.0-hd2095e1_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libffi-3.7.0-h81df57d_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-16.2.0-ha9f2e26_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgomp-16.2.0-he0feb66_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/liblzma-5.8.3-hb03c661_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libmpdec-4.0.0-hb03c661_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libnghttp2-1.71.0-hc5e5977_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libsqlite-3.54.1-hf739112_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-16.2.0-h934c35e_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.42.4-hcfc3c73_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libuv-1.52.1-h280c20c_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.3.2-h25fd6f3_3.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/micromamba-2.10.0-0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.6-hdb14827_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/nodejs-26.13.1-h61f206c_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.6.5-h781a0a9_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/playwright-1.65.1-hd412ae8_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/pydantic-core-2.50.5-py315h9eb62c9_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.15.2-h6e52b48_102_cp315.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/pyyaml-6.0.3-py315h4aa9e2b_4.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.13-noxft_h1df4ec4_4.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/yaml-0.2.7-hebe6cf0_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.7-hb78ec9c_7.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_3.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/annotated-doc-0.0.7-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/annotated-types-0.8.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2026.11.20-hbd8a1cb_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/certifi-2026.11.20-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/click-8.1.8-pyh707e725_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/colorama-0.4.6-pyhd8ed1ab_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/cpython-3.15.2-py315hd8ed1ab_103.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/empack-6.0.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/exceptiongroup-1.3.2-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/idna-3.20-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/iniconfig-2.3.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/markdown-it-py-4.3.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/mdurl-0.1.2-pyhd8ed1ab_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/networkx-3.7-pyhc364b38_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/packaging-26.4-pyhc364b38_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.14.8-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/playwright-python-1.65.2-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.7.0-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pydantic-2.14.4-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pyee-13.0.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pygments-2.21.0-pyhcf101f3_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pytest-9.2.0-pyhc364b38_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/python-gil-3.15.2-h4df99d1_103.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/python_abi-3.15-9_cp315.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/requests-2.34.2-pyhcf101f3_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/rich-15.0.0-pyhcf101f3_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/shellingham-1.5.4-pyhd8ed1ab_2.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/tomli-2.5.0-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typer-0.29.3-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.16.0-h69aa097_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typing-inspection-0.4.5-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.16.0-pyhcf101f3_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2026e-h5d301ff_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/urllib3-2.8.0-pyh5ded981_1.conda + - pypi: ./ + osx-64: + - conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_3.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/annotated-doc-0.0.7-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/annotated-types-0.8.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2026.11.20-hbd8a1cb_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/certifi-2026.11.20-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/click-8.1.8-pyh707e725_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/colorama-0.4.6-pyhd8ed1ab_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/cpython-3.15.2-py315hd8ed1ab_103.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/empack-6.0.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/exceptiongroup-1.3.2-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/idna-3.20-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/iniconfig-2.3.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/markdown-it-py-4.3.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/mdurl-0.1.2-pyhd8ed1ab_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/networkx-3.7-pyhc364b38_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/packaging-26.4-pyhc364b38_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.14.8-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/playwright-python-1.65.2-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.7.0-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pydantic-2.14.4-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pyee-13.0.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pygments-2.21.0-pyhcf101f3_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pytest-9.2.0-pyhc364b38_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/python-gil-3.15.2-h4df99d1_103.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/python_abi-3.15-9_cp315.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/requests-2.34.2-pyhcf101f3_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/rich-15.0.0-pyhcf101f3_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/shellingham-1.5.4-pyhd8ed1ab_2.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/tomli-2.5.0-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typer-0.29.3-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.16.0-h69aa097_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typing-inspection-0.4.5-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.16.0-pyhcf101f3_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2026e-h5d301ff_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/urllib3-2.8.0-pyh5ded981_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/bzip2-1.0.8-h374f1ed_10.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/c-ares-1.34.9-had63097_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/charset-normalizer-3.5.3-h86c1381_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/greenlet-3.5.6-py315h5d28fca_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/howardhinnant_date-3.0.5-hc1436ee_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/icu-79.1-py314h75928e5_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libabseil-20260817.0-cxx17_h76dead1_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libbrotlicommon-1.2.1-he0616a4_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libbrotlidec-1.2.1-h4a2f56c_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libbrotlienc-1.2.1-h3d41943_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libcxx-23.1.6-h88b51c2_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libedit-3.1.20260512-pl5321hba2e2ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libev-4.33-ha3d0635_3.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libexpat-2.11.0-h3332baf_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libffi-3.7.0-h6b3a05b_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/liblzma-5.8.3-hbb4bfdb_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libmpdec-4.0.0-ha1e9b39_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libnghttp2-1.71.0-h180c657_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libsqlite-3.54.1-h84a4c17_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libuv-1.52.1-ha3d0635_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/libzlib-1.3.2-hbb4bfdb_3.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/micromamba-2.10.0-0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/osx-64/ncurses-6.6-hcc0dc9a_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/nodejs-26.13.1-h6f205f5_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/openssl-3.6.5-h332eb6d_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/playwright-1.65.1-h8549a9e_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/pydantic-core-2.50.5-py315h0397acc_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/python-3.15.2-h0abcc05_102_cp315.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/pyyaml-6.0.3-py315h0c08d44_4.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/tk-8.6.13-ha6c374e_4.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/yaml-0.2.7-h5a9b756_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.7-hbc1a06c_7.conda + - pypi: ./ + osx-arm64: + - conda: https://conda.anaconda.org/conda-forge/noarch/annotated-doc-0.0.7-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/annotated-types-0.8.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2026.11.20-hbd8a1cb_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/certifi-2026.11.20-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/charset-normalizer-3.5.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/click-8.1.8-pyh707e725_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/colorama-0.4.6-pyhd8ed1ab_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/empack-6.0.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/exceptiongroup-1.3.2-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/idna-3.20-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/iniconfig-2.3.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/markdown-it-py-4.3.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/mdurl-0.1.2-pyhd8ed1ab_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/networkx-3.7-pyhc364b38_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/packaging-26.4-pyhc364b38_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.14.8-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/playwright-python-1.65.2-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.7.0-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pydantic-2.14.4-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pyee-13.0.1-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pygments-2.21.0-pyhcf101f3_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/pytest-9.2.0-pyhc364b38_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/python_abi-3.15-9_cp315.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/requests-2.34.2-pyhcf101f3_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/rich-15.0.0-pyhcf101f3_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/shellingham-1.5.4-pyhd8ed1ab_2.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/tomli-2.5.0-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typer-0.29.3-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.16.0-h69aa097_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typing-inspection-0.4.5-pyh5ded981_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.16.0-pyhcf101f3_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2026e-h5d301ff_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/urllib3-2.8.0-pyh5ded981_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/bzip2-1.0.8-h4e30115_10.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/c-ares-1.34.9-h74c22ad_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/greenlet-3.5.6-py315he0f41fd_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/howardhinnant_date-3.0.5-h4ddebb9_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/icu-79.1-py311h7f96da7_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libabseil-20260817.0-cxx17_h08226d7_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libbrotlicommon-1.2.1-h1dcdb26_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libbrotlidec-1.2.1-h5295a6a_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libbrotlienc-1.2.1-h2ddc9cb_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libcxx-23.1.6-hc645fd0_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libedit-3.1.20260512-pl5321h26f1114_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libev-4.33-h1a92334_3.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libexpat-2.11.0-h367fcd6_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libffi-3.7.0-h47dc5ef_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/liblzma-5.8.3-h8088a28_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libmpdec-4.0.0-h84a0fba_2.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libnghttp2-1.71.0-h29223de_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libsqlite-3.54.1-h9f98c0b_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libuv-1.52.1-h1a92334_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/libzlib-1.3.2-h8088a28_3.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/micromamba-2.10.0-0.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/ncurses-6.6-he64c551_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/nodejs-26.13.1-he520db9_1.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/openssl-3.6.5-h55eecbc_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/playwright-1.65.1-h94f5d84_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/pydantic-core-2.50.5-py315hd6777a0_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/python-3.15.2-h2e4dbab_102_cp315.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/pyyaml-6.0.3-py315h0c34f12_4.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/tk-8.6.13-hbeba79b_4.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/yaml-0.2.7-h4c53d1a_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.7-hf451053_7.conda + - pypi: ./ +packages: +- conda: https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-20_gnu.conda + build_number: 20 + sha256: 1dd3fffd892081df9726d7eb7e0dea6198962ba775bd88842135a4ddb4deb3c9 + md5: a9f577daf3de00bca7c3c76c0ecbd1de + depends: + - __glibc >=2.17,<3.0.a0 + - libgomp >=7.5.0 + constrains: + - openmp_impl <0.0a0 + license: BSD-3-Clause + license_family: BSD + purls: [] + run_exports: + strong: + - _openmp_mutex >=4.5 + size: 28948 + timestamp: 1770939786096 +- conda: https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-hda65f42_10.conda + sha256: 1a0d382c515ebf55f8ee1f38c8b81bc95af5c2acc42ad53b66bc5df932032f96 + md5: e675fabcf81499adc7edf58124fb1e01 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + license: bzip2-1.0.6 + license_family: BSD + purls: [] + run_exports: + weak: + - bzip2 >=1.0.8,<2.0a0 + size: 257808 + timestamp: 1785906269155 +- conda: https://conda.anaconda.org/conda-forge/linux-64/c-ares-1.34.9-hebe6cf0_0.conda + sha256: bd95dd25b80b5c4faf5349542377bf89b2794e23d0f7aa7f1c431e4f3b633f3c + md5: 78b505af04bf7a87ca957ef0cb5946f5 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=15 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - c-ares >=1.34.9,<2.0a0 + size: 233759 + timestamp: 1792507024648 +- conda: https://conda.anaconda.org/conda-forge/linux-64/charset-normalizer-3.5.3-h1114479_0.conda + noarch: python + sha256: c8ecd41f15993ddc8a41612403f7df7506aa23993064beb29bcba9403eb853cf + md5: 75cade43c8565442523b42bd3c1f99bd + depends: + - python + - libgcc >=15 + - __glibc >=2.17,<3.0.a0 + - _python_abi3_support 1.* + - cpython >=3.9 + license: MIT + license_family: MIT + purls: + - pkg:pypi/charset-normalizer?source=compressed-mapping + run_exports: {} + size: 212812 + timestamp: 1795433160219 +- conda: https://conda.anaconda.org/conda-forge/linux-64/greenlet-3.5.6-py315hd4f243e_1.conda + sha256: cba851a45cb64753db0fa480bdf371ed37445c821ff94dc4e1b18faaca43586e + md5: 818053ec526eb497339f2142cbac605d + depends: + - python + - libstdcxx >=15 + - libgcc >=15 + - __glibc >=2.17,<3.0.a0 + - python_abi 3.15.* *_cp315 + license: MIT + license_family: MIT + purls: + - pkg:pypi/greenlet?source=hash-mapping + run_exports: {} + size: 278594 + timestamp: 1794830064047 +- conda: https://conda.anaconda.org/conda-forge/linux-64/icu-79.1-py314hb486520_0.conda + sha256: 9a339bedff62e63bb949383edc656956abef1f23663c879f7fcb66a004a18ef9 + md5: 0be836734696f6476615ef0e97b388a3 + depends: + - __glibc >=2.17,<3.0.a0 + - libstdcxx >=15 + - libgcc >=15 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - icu >=79.1,<80.0a0 + size: 14540104 + timestamp: 1792691528355 +- conda: https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.46.1-bootstrap_ha15bf96_3.conda + sha256: c3111ef2fcc5372d3c9fc36116f571107f7cd5de94a0f443a803fc037a5aeea7 + md5: e82d33173910cc8da8da4e51d732ff3e + depends: + - __glibc >=2.17,<3.0.a0 + constrains: + - binutils_impl_linux-64 2.46.1 + license: GPL-3.0-only + license_family: GPL + purls: [] + run_exports: {} + size: 745094 + timestamp: 1791565433030 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libabseil-20260817.0-cxx17_hbb87c76_2.conda + sha256: 478f0a05d1310dbf9e9a1887aeb482ebc0cb8fbe4ca9e206aec11479c0da89f9 + md5: f5add7cc38cf92a18783b41396f18df5 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=15 + - libstdcxx >=15 + constrains: + - abseil-cpp =20260817.0 + - libabseil-static =20260817.0=cxx17* + license: Apache-2.0 + license_family: Apache + purls: [] + run_exports: + weak: + - libabseil >=20260817.0,<20260818.0a0 + - libabseil =*=cxx17* + size: 1463775 + timestamp: 1791373726625 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libbrotlicommon-1.2.1-h39a168f_1.conda + sha256: c8e66e6987a9c604e4677cb044331039296b4824b0bab566d3ad0b6932eb613e + md5: 3e5df77c3184a1b3bd6209b1268b5bb1 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=15 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - libbrotlicommon >=1.2.1,<1.3.0a0 + size: 80692 + timestamp: 1794870569040 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libbrotlidec-1.2.1-ha411449_1.conda + sha256: 1c405e036e77b5ebdb5aec61cc3b36741fee0c96fe4d12509df255302d3d5c68 + md5: a4cbe7638dbdc3775078e0f13757cf80 + depends: + - __glibc >=2.17,<3.0.a0 + - libbrotlicommon 1.2.1 h39a168f_1 + - libgcc >=15 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - libbrotlidec >=1.2.1,<1.3.0a0 + size: 34983 + timestamp: 1794870574006 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libbrotlienc-1.2.1-h018ffa1_1.conda + sha256: f4546e1adc9edd339edf19c602ea6e1fdad7b6e9317e891c3db69fdbdbf2c7d0 + md5: 2dbf816843a01063fcd4cff2a3f3af63 + depends: + - __glibc >=2.17,<3.0.a0 + - libbrotlicommon 1.2.1 h39a168f_1 + - libgcc >=15 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - libbrotlienc >=1.2.1,<1.3.0a0 + size: 298309 + timestamp: 1794870580638 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libedit-3.1.20260512-pl5321h373387f_0.conda + sha256: 45301f14f4eb66da57cfaf2d265f3eeee73f8b07e99614ee3afc5b26eea91126 + md5: 27dbd7e2984b8fe48e069379636ccfdd + depends: + - ncurses + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + - ncurses >=6.6,<7.0a0 + license: BSD-2-Clause + license_family: BSD + purls: [] + run_exports: + weak: + - libedit >=3.1.20260512,<3.2.0a0 + size: 135877 + timestamp: 1791327370514 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libev-4.33-h280c20c_3.conda + sha256: e4418f68d01a6307c4431b585c71b584f40189877364e542ee87deb777f5e85b + md5: 7bc31538d6e3fb349e897353969237ec + depends: + - libgcc >=14 + - __glibc >=2.17,<3.0.a0 + license: BSD-2-Clause OR GPL-2.0-or-later + license_family: GPL + purls: [] + run_exports: + weak: + - libev >=4.33,<4.34.0a0 + size: 43220 + timestamp: 1785917328200 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libexpat-2.11.0-hd2095e1_0.conda + sha256: f81a13d80aa62aa6cba1ab54cce5262eea4f2a05979a0c35d0fe979f0ea94600 + md5: 47c5c4a042f288a54654ebe79bafd1b3 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=15 + constrains: + - expat 2.11.0.* + license: MIT + license_family: MIT + purls: [] + run_exports: {} + size: 83976 + timestamp: 1795647413550 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libffi-3.7.0-h81df57d_1.conda + sha256: c8c7583ef063bc3c430f1d48298e5ad24f796a35c22ed5b14183325825a61106 + md5: 6525a0b06aa4fd390795f0740636a9dd + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=15 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - libffi >=3.7.0,<3.8.0a0 + size: 68004 + timestamp: 1787753412298 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-16.2.0-ha9f2e26_7.conda + sha256: e031634c3a928f9594eba868bc46ef5230d6571a364a0c63215b06c4563bfcea + md5: 735629b400b70eeab21a2ba8f5b1c2ce + depends: + - __glibc >=2.17,<3.0.a0 + - _openmp_mutex >=4.5 + constrains: + - libgcc-ng ==16.2.0=*_7 + - libgomp 16.2.0 he0feb66_7 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + purls: [] + run_exports: {} + size: 1058444 + timestamp: 1790303109576 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libgomp-16.2.0-he0feb66_7.conda + sha256: 92a0bb350c7be6a4eedcb4e111c60aefd176018e6b1c009a6e025dbe9bbcd758 + md5: d904c7ddd95e026254b4b80808ee9e12 + depends: + - __glibc >=2.17,<3.0.a0 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + purls: [] + run_exports: + strong: + - _openmp_mutex >=4.5 + size: 640566 + timestamp: 1790303046034 +- conda: https://conda.anaconda.org/conda-forge/linux-64/liblzma-5.8.3-hb03c661_1.conda + sha256: 9787df8c22a59c9a70d3e5a10db9ad663485e75e9ccc3f09bd092cb7b95e0dab + md5: 1390b7c5ac0b1d8e447bc5efa6d3c8c2 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + constrains: + - xz 5.8.3.* + license: 0BSD + purls: [] + run_exports: + weak: + - liblzma >=5.8.3,<6.0a0 + size: 112995 + timestamp: 1786348617826 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libmpdec-4.0.0-hb03c661_2.conda + sha256: 46820b4a835e175940ae20bec00fdddaff804cda27a1408ab1b95e77a2196437 + md5: fcfed1dc5053eb1901b66e7b1fc32588 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + license: BSD-2-Clause + license_family: BSD + purls: [] + run_exports: {} + size: 92759 + timestamp: 1786650399772 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libnghttp2-1.71.0-hc5e5977_0.conda + sha256: a4386712ad6d5bc18943b198407c39e2f8ae2fa9c6418bb37bba96f1d382f109 + md5: 726df214814a8b06135a6a674bc54589 + depends: + - libev >=4.33,<5.0a0 + - __glibc >=2.17,<3.0.a0 + - libgcc >=15 + - libstdcxx >=15 + - libev >=4.33,<4.34.0a0 + - c-ares >=1.34.9,<2.0a0 + - libzlib >=1.3.2,<2.0a0 + - openssl >=3.5.9,<4.0a0 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - libnghttp2 >=1.71.0,<2.0a0 + size: 822778 + timestamp: 1793628201366 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libsqlite-3.54.1-hf739112_1.conda + sha256: 4166191b6e9322e8ea124400b7f063aba317ef46d4873f82ef472734f91ddd8c + md5: 5c95bcc875a77e89afab63821a504e3f + depends: + - __glibc >=2.17,<3.0.a0 + - icu >=79.1,<80.0a0 + - libgcc >=15 + - libzlib >=1.3.2,<2.0a0 + license: blessing + purls: [] + run_exports: + weak: + - libsqlite >=3.54.1,<4.0a0 + size: 984977 + timestamp: 1793051582594 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-16.2.0-h934c35e_7.conda + sha256: fa7018298629fc429971fffd6ecba3d27a7b02e4e890d6a93ea01ffebe8cb745 + md5: 9b6707e0caca917fa6ea9ee473f37a5d + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc 16.2.0 ha9f2e26_7 + constrains: + - libstdcxx-ng ==16.2.0=*_7 + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + purls: [] + run_exports: {} + size: 6615436 + timestamp: 1790303132935 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.42.4-hcfc3c73_1.conda + sha256: 0e2e8f2daa9306e67f046e31092d637431d8cf0a26c407ab22401d108c2d4631 + md5: d852293faea3c04a6e896b908b43aded + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=15 + license: BSD-3-Clause + license_family: BSD + purls: [] + run_exports: + weak: + - libuuid >=2.42.4,<3.0a0 + size: 36134 + timestamp: 1793891599274 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libuv-1.52.1-h280c20c_1.conda + sha256: 67761d0206f84140047a367eaf9befe03a7e157a29ee25aee0047b40801cc6b6 + md5: 01c4ed87826af55996768af6dbc936b4 + depends: + - libgcc >=14 + - __glibc >=2.17,<3.0.a0 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - libuv >=1.52.1,<2.0a0 + size: 420040 + timestamp: 1785914567661 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.3.2-h25fd6f3_3.conda + sha256: eb8a0db0aa570124f7d2a93d7c7f596e3390df5e047818d873baad32985fc736 + md5: 0de0122d9570a8ab637c6b73db268389 + depends: + - __glibc >=2.17,<3.0.a0 + constrains: + - zlib 1.3.2 *_3 + license: Zlib + license_family: Other + purls: [] + run_exports: + weak: + - libzlib >=1.3.2,<2.0a0 + size: 63713 + timestamp: 1785362952714 +- conda: https://conda.anaconda.org/conda-forge/linux-64/micromamba-2.10.0-0.tar.bz2 + sha256: 9a97976244929bbae28fb1fae504e74a3e7e6d1932870e3a03321f01b7fbd07b + md5: a530e01199c7b347122cb945151d599c + depends: + - __glibc >=2.17,<3.0.a0 + license: BSD-3-Clause AND MIT AND OpenSSL + license_family: BSD + purls: [] + run_exports: {} + size: 7317886 + timestamp: 1793024953931 +- conda: https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.6-hdb14827_1.conda + sha256: 5d46557214ed184381dafe835b7c94a474a1c3b307a08a250b1ea4779b44ffb3 + md5: ee6c0cd80a60961a1f48aa3e0b91f986 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + license: X11 AND BSD-3-Clause + purls: [] + run_exports: + weak: + - ncurses >=6.6,<7.0a0 + size: 911196 + timestamp: 1786355078102 +- conda: https://conda.anaconda.org/conda-forge/linux-64/nodejs-26.13.1-h61f206c_1.conda + sha256: 454deaf2bbf815de93eec70703e52d043a8e5f5423aa9ba87c6bdeb5f30e4ca2 + md5: 7e8355bb8b0bb7b859ad87b5565c2459 + depends: + - libgcc >=15 + - __glibc >=2.28,<3.0.a0 + - libstdcxx >=15 + - libnghttp2 >=1.71.0,<2.0a0 + - libabseil >=20260817.0,<20260818.0a0 + - libabseil * cxx17* + - libsqlite >=3.54.1,<4.0a0 + - c-ares >=1.34.9,<2.0a0 + - libuv >=1.52.1,<2.0a0 + - libzlib >=1.3.2,<2.0a0 + - icu >=79.1,<80.0a0 + - openssl >=3.5.9,<4.0a0 + - zstd >=1.5.7,<1.6.0a0 + - libbrotlicommon >=1.2.1,<1.3.0a0 + - libbrotlienc >=1.2.1,<1.3.0a0 + - libbrotlidec >=1.2.1,<1.3.0a0 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - nodejs >=26.13.1,<27.0a0 + size: 20660002 + timestamp: 1794558522772 +- conda: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.6.5-h781a0a9_0.conda + sha256: 9c1533f1cf784f0e250919c0c9762d0b0e6bc727a79290ffb7cea1ceca1d038c + md5: 5a51a2ea653f120240b1a9bf76e0aae9 + depends: + - __glibc >=2.17,<3.0.a0 + - ca-certificates + - libgcc >=15 + license: Apache-2.0 + license_family: Apache + purls: [] + run_exports: + weak: + - openssl >=3.6.5,<4.0a0 + size: 3195299 + timestamp: 1791098052301 +- conda: https://conda.anaconda.org/conda-forge/linux-64/playwright-1.65.1-hd412ae8_0.conda + sha256: 4a74af9ac757083daff42ab49c210a6b08b12c8b5c473471606ff726abd890e7 + md5: daefa88ccdf1cc64e985a0156fac4d50 + depends: + - nodejs + - nodejs >=26.13.1,<27.0a0 + license: Apache-2.0 + license_family: APACHE + purls: [] + run_exports: {} + size: 2963210 + timestamp: 1794636939368 +- conda: https://conda.anaconda.org/conda-forge/linux-64/pydantic-core-2.50.5-py315h9eb62c9_0.conda + sha256: 7ad3b7c49531e738b216fc70a5f94600fb10bce87d765f6b82d88fe33b12ab32 + md5: e956aad36286fb469c668428e69e2586 + depends: + - python + - typing-extensions >=4.16.0 + - __glibc >=2.17,<3.0.a0 + - libgcc >=15 + - python_abi 3.15.* *_cp315 + constrains: + - __glibc >=2.17 + license: MIT + license_family: MIT + purls: + - pkg:pypi/pydantic-core?source=hash-mapping + run_exports: {} + size: 2016163 + timestamp: 1795117600473 +- conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.15.2-h6e52b48_102_cp315.conda + build_number: 102 + sha256: 762877bb106a40d8204ddd17c5ac97a8bf7eeb7d99d58aa9907579b965242864 + md5: 4a75861a2be8fefcb4ce603e671b5ae0 + depends: + - __glibc >=2.17,<3.0.a0 + - bzip2 >=1.0.8,<2.0a0 + - ld_impl_linux-64 >=2.36.1 + - libedit >=3.1.20260512,<3.2.0a0 + - libexpat >=2.9.0,<3.0a0 + - libffi >=3.7.0,<3.8.0a0 + - libgcc >=15 + - liblzma >=5.8.3,<6.0a0 + - libmpdec >=4.0.0,<5.0a0 + - libsqlite >=3.54.1,<4.0a0 + - libuuid >=2.42.4,<3.0a0 + - libzlib >=1.3.2,<2.0a0 + - ncurses >=6.6,<7.0a0 + - openssl >=3.5.9,<4.0a0 + - python_abi 3.15.* *_cp315 + - tk >=8.6.13,<8.7.0a0 + - tzdata + - zstd >=1.5.7,<1.6.0a0 + license: Python-2.0 + purls: [] + run_exports: + weak: + - python_abi 3.15.* *_cp315 + noarch: + - python + size: 29344654 + timestamp: 1795565973195 + python_site_packages_path: lib/python3.15/site-packages +- conda: https://conda.anaconda.org/conda-forge/linux-64/pyyaml-6.0.3-py315h4aa9e2b_4.conda + sha256: cf0df1e8c8b8a57dd9497d1f4dffc8261b7a592338813694e3510a0d6a9f01a9 + md5: 025b75c6e75a3456bf4515caf3293f43 + depends: + - python + - yaml + - libgcc >=15 + - __glibc >=2.17,<3.0.a0 + - yaml >=0.2.5,<0.3.0a0 + - python_abi 3.15.* *_cp315 + license: MIT + license_family: MIT + purls: + - pkg:pypi/pyyaml?source=hash-mapping + run_exports: {} + size: 225944 + timestamp: 1795255203641 +- conda: https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.13-noxft_h1df4ec4_4.conda + build_number: 104 + sha256: a1a241d172c1ccab067ba245206dd048bc3c2d1b84504b53c9468e99adfc16a1 + md5: 676a2f9b1c4fcf57b70aa5c65f6c60d0 + depends: + - libgcc >=15 + - __glibc >=2.17,<3.0.a0 + - libzlib >=1.3.2,<2.0a0 + constrains: + - xorg-libx11 >=1.8.13,<2.0a0 + license: TCL + purls: [] + run_exports: + weak: + - tk >=8.6.13,<8.7.0a0 + size: 3566806 + timestamp: 1787272857910 +- conda: https://conda.anaconda.org/conda-forge/linux-64/yaml-0.2.7-hebe6cf0_0.conda + sha256: ddd9a2d5f0f792d3c030125a37ba5ce6e118277136b26f0f3a544956a069637a + md5: 5023d532a3077306e516472a5906bf33 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=15 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - yaml >=0.2.7,<0.3.0a0 + size: 85688 + timestamp: 1795512007714 +- conda: https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.7-hb78ec9c_7.conda + sha256: 47d682b9f6d6ec9eb1a6e6c3e75ea6273e899e78fb7fc59f81d39745009fbc60 + md5: aa459086047c0e5e27023ab19f8cb86a + depends: + - __glibc >=2.17,<3.0.a0 + - libzlib >=1.3.2,<2.0a0 + license: BSD-3-Clause + license_family: BSD + purls: [] + run_exports: + weak: + - zstd >=1.5.7,<1.6.0a0 + size: 601301 + timestamp: 1786599621503 +- conda: https://conda.anaconda.org/conda-forge/noarch/_python_abi3_support-1.0-hd8ed1ab_3.conda + sha256: 2a7204314663eeda5dec482a956f0e2eaf289bd5b9953eaaaad0e81aa64638f2 + md5: 3845f3d75991bae0fb90884662f4327c + depends: + - cpython + - python-gil + license: MIT + license_family: MIT + purls: [] + run_exports: {} + size: 8144 + timestamp: 1784221492234 +- conda: https://conda.anaconda.org/conda-forge/noarch/annotated-doc-0.0.7-pyh5ded981_0.conda + sha256: 65a864053fd0af87af651bef89d9be310642917d348a51cedb059021e7e60cbd + md5: dd8f5c3e084aafe50b3a71e94f96a398 + depends: + - python >=3.11 + - python + license: MIT + license_family: MIT + purls: + - pkg:pypi/annotated-doc?source=compressed-mapping + run_exports: {} + size: 16671 + timestamp: 1795105791412 +- conda: https://conda.anaconda.org/conda-forge/noarch/annotated-types-0.8.0-pyhd8ed1ab_0.conda + sha256: b8fcb994134d3918d1c64a9d62f4168ff85d5bfb89e698102fe4ed679fe0df24 + md5: 108c928d2a8551832dbc762b535e90bb + depends: + - python >=3.10 + - typing-extensions >=4.0.0 + license: MIT + license_family: MIT + purls: + - pkg:pypi/annotated-types?source=hash-mapping + run_exports: {} + size: 19461 + timestamp: 1784935220549 +- conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2026.11.20-hbd8a1cb_0.conda + sha256: 8c104262bf331b14478e36c6cedd63b558d4b7ff96f218742a91878353edeed1 + md5: 05f63e1cbcb57e737619f989a2b8c8b3 + depends: + - __unix + license: ISC + purls: [] + run_exports: {} + size: 123617 + timestamp: 1795239311426 +- conda: https://conda.anaconda.org/conda-forge/noarch/certifi-2026.11.20-pyhd8ed1ab_0.conda + sha256: 60d65913b729133a61c3dd0497155703d7549ee0032e845757629f7c364d28fd + md5: b2f5cabdd5426f1f88a3efe00cde8909 + depends: + - ca-certificates >=2026.11.20 + - python >=3.10 + license: ISC + purls: + - pkg:pypi/certifi?source=compressed-mapping + run_exports: {} + size: 13845 + timestamp: 1795250605936 +- conda: https://conda.anaconda.org/conda-forge/noarch/charset-normalizer-3.5.1-pyhd8ed1ab_0.conda + sha256: cb60ef3e0631c8bacb4f7057196dee4496091a22baa3bb4b9bccb12c7e1c921b + md5: e0ac3accc64e23e40969d660e5f58ac8 + depends: + - python >=3.10 + license: MIT + license_family: MIT + purls: + - pkg:pypi/charset-normalizer?source=compressed-mapping + run_exports: {} + size: 64487 + timestamp: 1786835648298 +- conda: https://conda.anaconda.org/conda-forge/noarch/click-8.1.8-pyh707e725_0.conda + sha256: c920d23cd1fcf565031c679adb62d848af60d6fbb0edc2d50ba475cea4f0d8ab + md5: f22f4d4970e09d68a10b922cbb0408d3 + depends: + - __unix + - python >=3.9 + license: BSD-3-Clause + license_family: BSD + purls: + - pkg:pypi/click?source=hash-mapping + run_exports: {} + size: 84705 + timestamp: 1734858922844 +- conda: https://conda.anaconda.org/conda-forge/noarch/colorama-0.4.6-pyhd8ed1ab_1.conda + sha256: ab29d57dc70786c1269633ba3dff20288b81664d3ff8d21af995742e2bb03287 + md5: 962b9857ee8e7018c22f2776ffa0b2d7 + depends: + - python >=3.9 + license: BSD-3-Clause + license_family: BSD + purls: + - pkg:pypi/colorama?source=hash-mapping + run_exports: {} + size: 27011 + timestamp: 1733218222191 +- conda: https://conda.anaconda.org/conda-forge/noarch/cpython-3.15.2-py315hd8ed1ab_103.conda + noarch: generic + sha256: c79f59f6c82e082b4340262b608653130eb4bebfc930c3e830ec41ef7bc11877 + md5: 863a7ea415583931b1d5557a1cd20b3b + depends: + - python >=3.15,<3.16.0a0 + - python_abi * *_cp315 + license: Python-2.0 + purls: [] + run_exports: {} + size: 53810 + timestamp: 1795751284571 +- conda: https://conda.anaconda.org/conda-forge/noarch/empack-6.0.1-pyhd8ed1ab_0.conda + sha256: f636ba342e320e51fb7b8a6772e904dc7a4baafbb1c94fbfe4b12d09f50a630f + md5: 963c5ca82166496523ddace8cb642fef + depends: + - click <8.2 + - networkx + - platformdirs + - python >=3.10 + - pyyaml + - requests + - typer + license: MIT + license_family: MIT + purls: + - pkg:pypi/empack?source=hash-mapping + run_exports: {} + size: 21374 + timestamp: 1781214797129 +- conda: https://conda.anaconda.org/conda-forge/noarch/exceptiongroup-1.3.2-pyh5ded981_0.conda + sha256: 91df6efaccbc119fc485d31bf6e32ca02b3f52e6def22b4fece6ddc1a98683a1 + md5: 0af4199bba4905751d25634be9caf7bc + depends: + - python >=3.11 + - typing_extensions >=4.6.0 + - python + license: MIT and PSF-2.0 + purls: + - pkg:pypi/exceptiongroup?source=compressed-mapping + run_exports: {} + size: 24576 + timestamp: 1795172939981 +- conda: https://conda.anaconda.org/conda-forge/noarch/idna-3.20-pyh5ded981_0.conda + sha256: e044b1ec829e2e24f971fa3f3408eb26f1db836e521a58f08b0fd9a03fee47be + md5: ee73be987f9de9ea5c2fdaeefa7b6491 + depends: + - python >=3.11 + - python + license: BSD-3-Clause + license_family: BSD + purls: + - pkg:pypi/idna?source=compressed-mapping + run_exports: {} + size: 178572 + timestamp: 1790020377150 +- conda: https://conda.anaconda.org/conda-forge/noarch/iniconfig-2.3.1-pyhd8ed1ab_0.conda + sha256: 8f53876d0fb3525235e39635dd55633abe0a4307b1b3ab1415c80a9e0bbdf663 + md5: c0a803d97dd09da7e2c8b0fdfaa5739b + depends: + - python >=3.11 + license: MIT + license_family: MIT + purls: + - pkg:pypi/iniconfig?source=compressed-mapping + run_exports: {} + size: 14485 + timestamp: 1791588553866 +- conda: https://conda.anaconda.org/conda-forge/noarch/markdown-it-py-4.3.0-pyhd8ed1ab_0.conda + sha256: 4ccea503ad204bba76b8911fce9245488456bf31249fc6e3d95c072602dc1143 + md5: 975dce37a9e7d56c4f56981666578b07 + depends: + - mdurl >=0.1,<1 + - python >=3.10 + license: MIT + license_family: MIT + purls: + - pkg:pypi/markdown-it-py?source=compressed-mapping + run_exports: {} + size: 74305 + timestamp: 1794422554733 +- conda: https://conda.anaconda.org/conda-forge/noarch/mdurl-0.1.2-pyhd8ed1ab_1.conda + sha256: 78c1bbe1723449c52b7a9df1af2ee5f005209f67e40b6e1d3c7619127c43b1c7 + md5: 592132998493b3ff25fd7479396e8351 + depends: + - python >=3.9 + license: MIT + license_family: MIT + purls: + - pkg:pypi/mdurl?source=hash-mapping + run_exports: {} + size: 14465 + timestamp: 1733255681319 +- conda: https://conda.anaconda.org/conda-forge/noarch/networkx-3.7-pyhc364b38_0.conda + sha256: 9458e13767779d5db48c035ba27a1af843fde5187d34c17b60076e18835e8637 + md5: ddc679d85e7c9c3738efd303b6580c69 + depends: + - python >=3.12 + - python + constrains: + - numpy >=1.25 + - scipy >=1.11.2 + - matplotlib-base >=3.8 + - pandas >=2.0 + license: BSD-3-Clause + license_family: BSD + purls: + - pkg:pypi/networkx?source=compressed-mapping + run_exports: {} + size: 1642541 + timestamp: 1790068597221 +- conda: https://conda.anaconda.org/conda-forge/noarch/packaging-26.4-pyhc364b38_0.conda + sha256: 168392f26ecbcf0156efa425ac730d19466ccffad55b15cb90b7f19683b18a31 + md5: df83250ef4f2a8c4ed3a3fea9f13f96f + depends: + - python >=3.10 + - python + license: Apache-2.0 + license_family: APACHE + purls: + - pkg:pypi/packaging?source=compressed-mapping + run_exports: {} + size: 123480 + timestamp: 1795582404902 +- conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.14.8-pyh5ded981_0.conda + sha256: b90d4f1eefe9d1d50925c0e12eac9e0d3ac5fa6167e5929fd249d0fbeca15a80 + md5: 931c5dbcadedadde154b21fddc8c951d + depends: + - python >=3.11 + - python + license: MIT + license_family: MIT + purls: + - pkg:pypi/platformdirs?source=compressed-mapping + run_exports: {} + size: 93566 + timestamp: 1795184777947 +- conda: https://conda.anaconda.org/conda-forge/noarch/playwright-python-1.65.2-pyh5ded981_0.conda + sha256: 89b9e82066ec5f89c32ae842a68f1c07a25ff44850b22dea6a1b542668585906 + md5: 8f94e667b0abe81e438dd9a49f0c5e61 + depends: + - greenlet >=3.1.1,<4 + - playwright + - pyee >=13,<14 + - python >=3.11 + - python + license: Apache-2.0 + license_family: APACHE + purls: + - pkg:pypi/playwright?source=hash-mapping + run_exports: {} + size: 280078 + timestamp: 1794637380918 +- conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.7.0-pyh5ded981_0.conda + sha256: 34c40106bc3172b3a47656e84837e13a5d4829d413d65f30fb214e7568a09cea + md5: 50c6bcd41b7ceaaeeea8852e3198663e + depends: + - python >=3.11 + - python + license: MIT + license_family: MIT + purls: + - pkg:pypi/pluggy?source=compressed-mapping + run_exports: {} + size: 30111 + timestamp: 1792063298993 +- conda: https://conda.anaconda.org/conda-forge/noarch/pydantic-2.14.4-pyh5ded981_0.conda + sha256: d010123c72bc95bd3e101b9f1a0ba345e82237f743fa8cb010931781867c4b44 + md5: 7d1c1c1a2f13cdd32eb4fafbef4d2ce7 + depends: + - typing-inspection >=0.4.4 + - typing_extensions >=4.16.0 + - python >=3.11 + - annotated-types >=0.6.0 + - pydantic-core ==2.50.5 + - python + license: MIT + license_family: MIT + purls: + - pkg:pypi/pydantic?source=compressed-mapping + run_exports: {} + size: 363491 + timestamp: 1795122247924 +- conda: https://conda.anaconda.org/conda-forge/noarch/pyee-13.0.1-pyhd8ed1ab_0.conda + sha256: 938ab8d67ec0183f0a920eccbf34677d1f10ad4e73377ee60b9635734e834bf5 + md5: eadf0f76d9121a6297be754e9d7cc099 + depends: + - python >=3.10 + - typing_extensions + license: MIT + license_family: MIT + purls: + - pkg:pypi/pyee?source=hash-mapping + run_exports: {} + size: 20049 + timestamp: 1771871117073 +- conda: https://conda.anaconda.org/conda-forge/noarch/pygments-2.21.0-pyhcf101f3_0.conda + sha256: f5f015ff1bc3e1b7fc08eee096b1865234189ae0b82bebdb86a5369116e42fa0 + md5: 2882dee445dfa45b0c5afce3ffb7730a + depends: + - python >=3.10 + - python + license: BSD-2-Clause + license_family: BSD + purls: + - pkg:pypi/pygments?source=compressed-mapping + run_exports: {} + size: 959376 + timestamp: 1786995678795 +- conda: https://conda.anaconda.org/conda-forge/noarch/pytest-9.2.0-pyhc364b38_1.conda + sha256: a9cf3571e80a4e86992502068eb1d29a109e88345c39babf03b10450895056af + md5: f0cfded84ced11a9dfb3790c4c1c0b63 + depends: + - colorama + - python >=3.10 + - exceptiongroup >=1 + - iniconfig >=2 + - packaging >=24 + - pluggy >=1.6,<2 + - pygments >=2.15 + - tomli >=2 + - python + constrains: + - pytest-faulthandler >=2 + license: MIT + license_family: MIT + purls: + - pkg:pypi/pytest?source=compressed-mapping + run_exports: {} + size: 326683 + timestamp: 1793214631903 +- conda: https://conda.anaconda.org/conda-forge/noarch/python-gil-3.15.2-h4df99d1_103.conda + sha256: 6764bb7cf2e666c1832596bf31be854207843e4955e94154266e7f08a62a04a3 + md5: 6b4c1316abab2925dbc0c9fd7e3b67b5 + depends: + - cpython 3.15.2.* + - python_abi * *_cp315 + license: Python-2.0 + purls: [] + run_exports: {} + size: 53799 + timestamp: 1795751291394 +- conda: https://conda.anaconda.org/conda-forge/noarch/python_abi-3.15-9_cp315.conda + build_number: 9 + sha256: 976c4a6db967a62385aa633daaab19a929f986b979a7ad836b8b70e15ca7aefd + md5: b23461631fe2abdbade0cb64babe7344 + constrains: + - python 3.15.* *_cp315 + license: BSD-3-Clause + license_family: BSD + purls: [] + run_exports: {} + size: 6800 + timestamp: 1788302827589 +- conda: https://conda.anaconda.org/conda-forge/noarch/requests-2.34.2-pyhcf101f3_0.conda + sha256: 1715246b19c9f85ee022933b4845f2fc14ac9184981b7b7d9b728bec8e9588da + md5: 4a85203c1d80c1059086ae860836ffb9 + depends: + - python >=3.10 + - certifi >=2023.5.7 + - charset-normalizer >=2,<4 + - idna >=2.5,<4 + - urllib3 >=1.26,<3 + - python + constrains: + - chardet >=3.0.2,<8 + license: Apache-2.0 + license_family: APACHE + purls: + - pkg:pypi/requests?source=hash-mapping + run_exports: {} + size: 68709 + timestamp: 1778851103479 +- conda: https://conda.anaconda.org/conda-forge/noarch/rich-15.0.0-pyhcf101f3_0.conda + sha256: 3d6ba2c0fcdac3196ba2f0615b4104e532525ffa1335b50a2878be5ff488814a + md5: 0242025a3c804966bf71aa04eee82f66 + depends: + - markdown-it-py >=2.2.0 + - pygments >=2.13.0,<3.0.0 + - python >=3.10 + - typing_extensions >=4.0.0,<5.0.0 + - python + license: MIT + license_family: MIT + purls: + - pkg:pypi/rich?source=hash-mapping + run_exports: {} + size: 208577 + timestamp: 1775991661559 +- conda: https://conda.anaconda.org/conda-forge/noarch/shellingham-1.5.4-pyhd8ed1ab_2.conda + sha256: 1d6534df8e7924d9087bd388fbac5bd868c5bf8971c36885f9f016da0657d22b + md5: 83ea3a2ddb7a75c1b09cea582aa4f106 + depends: + - python >=3.10 + license: MIT + license_family: MIT + purls: + - pkg:pypi/shellingham?source=hash-mapping + run_exports: {} + size: 15018 + timestamp: 1762858315311 +- conda: https://conda.anaconda.org/conda-forge/noarch/tomli-2.5.0-pyh5ded981_0.conda + sha256: 93b6f517fb7adff00b62be02b798d384a1b34d0e368fdb576fb248bcb3bb9ec7 + md5: 36d6a162326c52d6339c8b606f43932d + depends: + - python >=3.11 + - python + license: MIT + license_family: MIT + purls: + - pkg:pypi/tomli?source=compressed-mapping + run_exports: {} + size: 21687 + timestamp: 1791394576814 +- conda: https://conda.anaconda.org/conda-forge/noarch/typer-0.29.3-pyh5ded981_0.conda + sha256: 7ed3b32709ed52cbd9baad11698136e5a70edac9d4bdddd840d0948e4cfd4536 + md5: f77c9e3f0c309f97f5e4a27d4c37b5e6 + depends: + - annotated-doc >=0.0.2 + - colorama + - pydantic >=2.5.3 + - python >=3.11 + - rich >=13.8.0 + - shellingham >=1.3.0 + - python + license: MIT AND BSD-3-Clause + purls: + - pkg:pypi/typer?source=compressed-mapping + run_exports: {} + size: 187798 + timestamp: 1795705642530 +- conda: https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.16.0-h69aa097_0.conda + sha256: b141933ece3518f6d7b75dfb59451e2f26b405a44c18e2518a83e9a02e09315c + md5: c680b5747e8c4c8f23dca0bb7042a8fc + depends: + - typing_extensions ==4.16.0 pyhcf101f3_0 + license: PSF-2.0 + license_family: PSF + purls: [] + run_exports: {} + size: 94080 + timestamp: 1783002732887 +- conda: https://conda.anaconda.org/conda-forge/noarch/typing-inspection-0.4.5-pyh5ded981_0.conda + sha256: 88c08476c98f264047d6c6bfeb1e8545684dfbcf2c61da338f71033ec17e1f33 + md5: 9b49216bf058592d9ef924e64602f029 + depends: + - python >=3.11 + - typing_extensions >=4.15.0 + - python + license: MIT + license_family: MIT + purls: + - pkg:pypi/typing-inspection?source=compressed-mapping + run_exports: {} + size: 20983 + timestamp: 1793805183548 +- conda: https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.16.0-pyhcf101f3_0.conda + sha256: 2d888f90af0686044882c74193ec80a90ec1943145d94a7b1b048958acda1848 + md5: c70ad746c22219b9700931707482992c + depends: + - python >=3.10 + - python + license: PSF-2.0 + license_family: PSF + purls: + - pkg:pypi/typing-extensions?source=hash-mapping + run_exports: {} + size: 52631 + timestamp: 1783002732887 +- conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2026e-h5d301ff_0.conda + sha256: 2b7ca858879f183ce2dcc65b300f48a0133d5430550f35b23d80d405a0788dbf + md5: abccc3810d2b97e570dee487f2b46e38 + license: LicenseRef-Public-Domain + purls: [] + run_exports: {} + size: 119208 + timestamp: 1792758382821 +- conda: https://conda.anaconda.org/conda-forge/noarch/urllib3-2.8.0-pyh5ded981_1.conda + sha256: f892d267de12e031d887b90ea44718358f3558c052dfbac45b10b6cd4cee6705 + md5: 8ce0b6bfc873bf2c25b083dd5ee29489 + depends: + - python >=3.11 + - python + license: MIT + license_family: MIT + purls: + - pkg:pypi/urllib3?source=compressed-mapping + run_exports: {} + size: 113282 + timestamp: 1794575230703 +- conda: https://conda.anaconda.org/conda-forge/osx-64/bzip2-1.0.8-h374f1ed_10.conda + sha256: 4ed83961876dc8844a6f0df49c07b408efbaea275ffb0b37133e24c006990b3a + md5: 9d9a39212a876e4bb751c1cc3927b678 + depends: + - __osx >=11.0 + license: bzip2-1.0.6 + license_family: BSD + purls: [] + run_exports: + weak: + - bzip2 >=1.0.8,<2.0a0 + size: 133271 + timestamp: 1785906721507 +- conda: https://conda.anaconda.org/conda-forge/osx-64/c-ares-1.34.9-had63097_0.conda + sha256: 20d7f8249439164d0af1ffc9efbb7dc462b80a275e9dbc0476c51a72f52a5683 + md5: 41c450e89c9ba9ce32b9b264796d98c4 + depends: + - __osx >=11.0 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - c-ares >=1.34.9,<2.0a0 + size: 210374 + timestamp: 1792507129690 +- conda: https://conda.anaconda.org/conda-forge/osx-64/charset-normalizer-3.5.3-h86c1381_0.conda + noarch: python + sha256: 1953166e9827a324c2bb2abcda252856f1950973c5cd853102bf59822fcd8f46 + md5: d6af04b78552715690d5c1ecfa4b9503 + depends: + - python + - __osx >=11.0 + - _python_abi3_support 1.* + - cpython >=3.9 + license: MIT + license_family: MIT + purls: + - pkg:pypi/charset-normalizer?source=compressed-mapping + run_exports: {} + size: 203653 + timestamp: 1795433303321 +- conda: https://conda.anaconda.org/conda-forge/osx-64/greenlet-3.5.6-py315h5d28fca_1.conda + sha256: cbfdf7ca06a88ec10bd6c7d20fde04ea028ac376d55717e8dcc94787714c6a16 + md5: da4edeef3ed4b7dc853e3e281df048ae + depends: + - python + - libcxx >=21 + - __osx >=11.0 + - python_abi 3.15.* *_cp315 + license: MIT + license_family: MIT + purls: + - pkg:pypi/greenlet?source=hash-mapping + run_exports: {} + size: 266817 + timestamp: 1794830203118 +- conda: https://conda.anaconda.org/conda-forge/osx-64/howardhinnant_date-3.0.5-hc1436ee_0.conda + sha256: f7f6859757cf2e7a3feef30c435b438bd94390e1002a9220a79153f8a37b673e + md5: d3a54c3fd146185f9a4ba5aa05a6421f + depends: + - __osx >=11.0 + - libcxx >=19 + - tzdata + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - howardhinnant_date >=3.0.5,<3.1.0a0 + size: 101343 + timestamp: 1785223647644 +- conda: https://conda.anaconda.org/conda-forge/osx-64/icu-79.1-py314h75928e5_0.conda + sha256: 7fa4934226d42b1afb09734dc6269b1e03d15693568fbdc672e95e67e3bb24b9 + md5: d6d478de8efc8b0db0e4b830859f5323 + depends: + - __osx >=11.0 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - icu >=79.1,<80.0a0 + size: 14291048 + timestamp: 1792691706272 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libabseil-20260817.0-cxx17_h76dead1_2.conda + sha256: ee99f9a97d9c41a17f0aee5ec0454091d3a36f7a333fbc996b7a0ccc07eab4b8 + md5: 1b7f879d65ef3f7a719e4cd723483b15 + depends: + - __osx >=11.0 + - libcxx >=21 + constrains: + - abseil-cpp =20260817.0 + - libabseil-static =20260817.0=cxx17* + license: Apache-2.0 + license_family: Apache + purls: [] + run_exports: + weak: + - libabseil >=20260817.0,<20260818.0a0 + - libabseil =*=cxx17* + size: 1292573 + timestamp: 1791374508040 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libbrotlicommon-1.2.1-he0616a4_1.conda + sha256: 89a5276029cbe32d5723cf6707fad6335b0b84715372904b6b252fac4b8c176e + md5: 88ae1c698b03bd34fb955e075c2e0c1e + depends: + - __osx >=11.0 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - libbrotlicommon >=1.2.1,<1.3.0a0 + size: 79285 + timestamp: 1794871033692 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libbrotlidec-1.2.1-h4a2f56c_1.conda + sha256: c09406e933c5f3315a9722f05e98faa4eb297029755016057b17d84acf9b3190 + md5: 52f33587380a164ffc86c21015ce53aa + depends: + - __osx >=11.0 + - libbrotlicommon 1.2.1 he0616a4_1 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - libbrotlidec >=1.2.1,<1.3.0a0 + size: 31601 + timestamp: 1794871053758 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libbrotlienc-1.2.1-h3d41943_1.conda + sha256: e27bde9092452adf45802ed9bc45985c3ed137b079fc9b18230eaf51d98857cc + md5: 559c629076b7280a25159002fa055b84 + depends: + - __osx >=11.0 + - libbrotlicommon 1.2.1 he0616a4_1 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - libbrotlienc >=1.2.1,<1.3.0a0 + size: 312111 + timestamp: 1794871070088 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libcxx-23.1.6-h88b51c2_0.conda + sha256: a3c8011337fb36e3972152a2d18eaea0923dc4a67868f76c46792da7fbcb82f2 + md5: 9f6bab1d913d0b8fe6eb84010ba18caa + depends: + - __osx >=11.0 + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + purls: [] + run_exports: {} + size: 562036 + timestamp: 1794984465565 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libedit-3.1.20260512-pl5321hba2e2ab_0.conda + sha256: 3b664a2fcc69b0e2ed6622bfacdf408a31003e92191ace3f4f1ab086c384449d + md5: f9fefe52ca6fa0cdb62806f626b70d98 + depends: + - ncurses + - __osx >=11.0 + - ncurses >=6.6,<7.0a0 + license: BSD-2-Clause + license_family: BSD + purls: [] + run_exports: + weak: + - libedit >=3.1.20260512,<3.2.0a0 + size: 116143 + timestamp: 1791327578296 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libev-4.33-ha3d0635_3.conda + sha256: 223314a7476bdeb00f698937b6960fc51cb98627af2ac5a629e5150bcddb8abf + md5: 6d2f0447151b390bdaed846e143272e3 + depends: + - __osx >=11.0 + license: BSD-2-Clause OR GPL-2.0-or-later + license_family: GPL + purls: [] + run_exports: + weak: + - libev >=4.33,<4.34.0a0 + size: 40479 + timestamp: 1785917395373 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libexpat-2.11.0-h3332baf_0.conda + sha256: 865e6651370587a36e49e9bff35f35c4dd78a094f8482a7705de68d785e76943 + md5: f413eabf6886d16215e43966e5350c55 + depends: + - __osx >=11.0 + constrains: + - expat 2.11.0.* + license: MIT + license_family: MIT + purls: [] + run_exports: {} + size: 81098 + timestamp: 1795646365587 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libffi-3.7.0-h6b3a05b_1.conda + sha256: c4793041226c87f987b9903e6503b76f02f52855cc193be2729ac127e600529b + md5: e077b71ae65754eda067e4125364b905 + depends: + - __osx >=11.0 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - libffi >=3.7.0,<3.8.0a0 + size: 60786 + timestamp: 1787754056669 +- conda: https://conda.anaconda.org/conda-forge/osx-64/liblzma-5.8.3-hbb4bfdb_1.conda + sha256: 7915dac7c71c208e40e716e2f6d3eff41a8d5584e0e7c2d46f9bf9bd5f9aa739 + md5: daf49067580fbfeae3ac7f9535400494 + depends: + - __osx >=11.0 + constrains: + - xz 5.8.3.* + license: 0BSD + purls: [] + run_exports: + weak: + - liblzma >=5.8.3,<6.0a0 + size: 104919 + timestamp: 1786349094608 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libmpdec-4.0.0-ha1e9b39_2.conda + sha256: 6438d0ef76e81f2b75ad7599685a525407c1d9fb2d6a7c18f360614ae6807970 + md5: b10a43915a31193e06b2781b9d11aec3 + depends: + - __osx >=11.0 + license: BSD-2-Clause + license_family: BSD + purls: [] + run_exports: {} + size: 79639 + timestamp: 1786651070313 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libnghttp2-1.71.0-h180c657_0.conda + sha256: ae587300c51ce6235b14262c88e8b984cdc958cc9516b5627cf5a2ccc848bc82 + md5: 2e680347aae8242952611c5c21a59a2d + depends: + - libev >=4.33,<5.0a0 + - __osx >=11.0 + - libcxx >=21 + - openssl >=3.5.9,<4.0a0 + - libzlib >=1.3.2,<2.0a0 + - c-ares >=1.34.9,<2.0a0 + - libev >=4.33,<4.34.0a0 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - libnghttp2 >=1.71.0,<2.0a0 + size: 719372 + timestamp: 1793628350560 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libsqlite-3.54.1-h84a4c17_1.conda + sha256: 1074acb36b0d8495b97c6bed5ba1d72d787d3417d1c368eb62d6491d037d9de0 + md5: 24e75c43725ef17d0af7e7f4b2de7b49 + depends: + - __osx >=11.0 + - icu >=79.1,<80.0a0 + - libzlib >=1.3.2,<2.0a0 + license: blessing + purls: [] + run_exports: + weak: + - libsqlite >=3.54.1,<4.0a0 + size: 1024756 + timestamp: 1793052228706 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libuv-1.52.1-ha3d0635_1.conda + sha256: 4aacf651487bf2cd4dcfab49ea98a00a34305919ff3a09b66b7ddaa97d8b316f + md5: 17b0d6c818992264752f1a720be711fc + depends: + - __osx >=11.0 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - libuv >=1.52.1,<2.0a0 + size: 128560 + timestamp: 1785914631885 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libzlib-1.3.2-hbb4bfdb_3.conda + sha256: b2dba286dd6632292b12296e761193b5ef9fb0eaeecaa481f5ba9af72c0c18e1 + md5: 7d3fa28263bb7f8ea32db11f570a5bb6 + depends: + - __osx >=11.0 + constrains: + - zlib 1.3.2 *_3 + license: Zlib + license_family: Other + purls: [] + run_exports: + weak: + - libzlib >=1.3.2,<2.0a0 + size: 58993 + timestamp: 1785276808631 +- conda: https://conda.anaconda.org/conda-forge/osx-64/micromamba-2.10.0-0.tar.bz2 + sha256: 17b20c4271d65c030a5c86788f5ca86eb575187209f626edabdb8c6a875c6838 + md5: 33f0fdcddb7b7636e028d98a14f14d89 + depends: + - __osx >=11.0 + - howardhinnant_date >=3.0.5,<3.1.0a0 + - libcxx >=21 + license: BSD-3-Clause AND MIT AND OpenSSL + license_family: BSD + purls: [] + run_exports: {} + size: 7334472 + timestamp: 1793025462241 +- conda: https://conda.anaconda.org/conda-forge/osx-64/ncurses-6.6-hcc0dc9a_1.conda + sha256: 12c1d676b9a0e8109b576672519312c5428308f3f3d7706f8717e2f536d5d9e7 + md5: 88a79390f87c8f3334b9999a892e78d4 + depends: + - __osx >=11.0 + license: X11 AND BSD-3-Clause + purls: [] + run_exports: + weak: + - ncurses >=6.6,<7.0a0 + size: 834865 + timestamp: 1786356957789 +- conda: https://conda.anaconda.org/conda-forge/osx-64/nodejs-26.13.1-h6f205f5_1.conda + sha256: 54314aa048d21cbe29ece6826e1ec4c546c4ad8fed164409b1c85cb33067c4aa + md5: af1bac1a9aaa0fd35cc006556dd25c2b + depends: + - libcxx >=21 + - __osx >=12.0 + - libsqlite >=3.54.1,<4.0a0 + - libuv >=1.52.1,<2.0a0 + - libzlib >=1.3.2,<2.0a0 + - c-ares >=1.34.9,<2.0a0 + - libnghttp2 >=1.71.0,<2.0a0 + - zstd >=1.5.7,<1.6.0a0 + - openssl >=3.5.9,<4.0a0 + - libabseil >=20260817.0,<20260818.0a0 + - libabseil * cxx17* + - libbrotlicommon >=1.2.1,<1.3.0a0 + - libbrotlienc >=1.2.1,<1.3.0a0 + - libbrotlidec >=1.2.1,<1.3.0a0 + - icu >=79.1,<80.0a0 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - nodejs >=26.13.1,<27.0a0 + size: 19981861 + timestamp: 1794558667928 +- conda: https://conda.anaconda.org/conda-forge/osx-64/openssl-3.6.5-h332eb6d_0.conda + sha256: d992d27aec2f1beac81f792c85b449546c030f06937b5b3ea7cf58431861dde4 + md5: 615ac6cff316565b442cd1af8b94837f + depends: + - __osx >=11.0 + - ca-certificates + license: Apache-2.0 + license_family: Apache + purls: [] + run_exports: + weak: + - openssl >=3.6.5,<4.0a0 + size: 2786968 + timestamp: 1791099439455 +- conda: https://conda.anaconda.org/conda-forge/osx-64/playwright-1.65.1-h8549a9e_0.conda + sha256: e8e7494adc6341e457a0c38a0d715c2b52d4b52bed2f8da81f58c296999c8cdf + md5: d29e2fbcbb97f00af0c22915e2e97dab + depends: + - nodejs + - nodejs >=26.13.1,<27.0a0 + license: Apache-2.0 + license_family: APACHE + purls: [] + run_exports: {} + size: 2962631 + timestamp: 1794636988686 +- conda: https://conda.anaconda.org/conda-forge/osx-64/pydantic-core-2.50.5-py315h0397acc_0.conda + sha256: 4f5d02ac0b8589d87695a912a944ee3e4d3cc406613e50c1bf72962c7db4e7f5 + md5: e635fe11cfe797644f167d4731dec298 + depends: + - python + - typing-extensions >=4.16.0 + - __osx >=11.0 + - python_abi 3.15.* *_cp315 + constrains: + - __osx >=11.0 + license: MIT + license_family: MIT + purls: + - pkg:pypi/pydantic-core?source=hash-mapping + run_exports: {} + size: 2007665 + timestamp: 1795117707769 +- conda: https://conda.anaconda.org/conda-forge/osx-64/python-3.15.2-h0abcc05_102_cp315.conda + build_number: 102 + sha256: 4845209a873cf35b519f2566d225c8ae8e325662d3887cd6cfcb8a3e03192f36 + md5: f2108d33f65fe71a91c9b19c81a0d2ad + depends: + - __osx >=11.0 + - bzip2 >=1.0.8,<2.0a0 + - libedit >=3.1.20260512,<3.2.0a0 + - libexpat >=2.11.0,<3.0a0 + - libffi >=3.7.0,<3.8.0a0 + - liblzma >=5.8.3,<6.0a0 + - libmpdec >=4.0.0,<5.0a0 + - libsqlite >=3.54.1,<4.0a0 + - libzlib >=1.3.2,<2.0a0 + - ncurses >=6.6,<7.0a0 + - openssl >=3.5.9,<4.0a0 + - python_abi 3.15.* *_cp315 + - tk >=8.6.13,<8.7.0a0 + - tzdata + - zstd >=1.5.7,<1.6.0a0 + license: Python-2.0 + purls: [] + run_exports: + weak: + - python_abi 3.15.* *_cp315 + noarch: + - python + size: 13692750 + timestamp: 1795682807993 + python_site_packages_path: lib/python3.15/site-packages +- conda: https://conda.anaconda.org/conda-forge/osx-64/pyyaml-6.0.3-py315h0c08d44_4.conda + sha256: 1185ae79bfd3622c33672b015664bf638d7e0e3364bd1407e534e9b257ca965a + md5: 05e779312413d84bfc953dd37986cabb + depends: + - python + - yaml + - __osx >=11.0 + - yaml >=0.2.5,<0.3.0a0 + - python_abi 3.15.* *_cp315 + license: MIT + license_family: MIT + purls: + - pkg:pypi/pyyaml?source=hash-mapping + run_exports: {} + size: 211098 + timestamp: 1795255257023 +- conda: https://conda.anaconda.org/conda-forge/osx-64/tk-8.6.13-ha6c374e_4.conda + sha256: 74e5fabcaf6ca0db052c645646ea04ded98a5eb7540483217f8101a819eb3107 + md5: 71c9f1f0267f2639523e898c6b50a4dc + depends: + - __osx >=11.0 + - libzlib >=1.3.2,<2.0a0 + license: TCL + purls: [] + run_exports: + weak: + - tk >=8.6.13,<8.7.0a0 + size: 3512384 + timestamp: 1787272935349 +- conda: https://conda.anaconda.org/conda-forge/osx-64/yaml-0.2.7-h5a9b756_0.conda + sha256: 5503449dddce56ef8c73bc1b4a6e38aecb0f0ac91547771cfcb9eb5784120fd5 + md5: 1f86404176afd78663d162674d76113a + depends: + - __osx >=11.0 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - yaml >=0.2.7,<0.3.0a0 + size: 75972 + timestamp: 1795512087181 +- conda: https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.7-hbc1a06c_7.conda + sha256: 5277886d9704a624dc9b79ac985861e1e431bdb39a57c082507ab577a138ec6c + md5: c1d11f04327e40537ffe6cad5b131019 + depends: + - __osx >=11.0 + - libzlib >=1.3.2,<2.0a0 + license: BSD-3-Clause + license_family: BSD + purls: [] + run_exports: + weak: + - zstd >=1.5.7,<1.6.0a0 + size: 528228 + timestamp: 1786599702092 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/bzip2-1.0.8-h4e30115_10.conda + sha256: 8ec22f0ba25cbfc2e64d70cf29459eccd7ffdf6436f6a6ff15bbfef799f7d4f6 + md5: b50612e7d190b8061ab4e7dc119cf4d5 + depends: + - __osx >=11.0 + license: bzip2-1.0.6 + license_family: BSD + purls: [] + run_exports: + weak: + - bzip2 >=1.0.8,<2.0a0 + size: 124965 + timestamp: 1785906749812 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/c-ares-1.34.9-h74c22ad_0.conda + sha256: 74b52d784b3576643da3aea1240a4120c1f25ee057f14ae5a89e8a7b3fb2e69f + md5: 84dac5da92970cdde9789fcbfe63cb3a + depends: + - __osx >=11.0 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - c-ares >=1.34.9,<2.0a0 + size: 201979 + timestamp: 1792507050139 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/greenlet-3.5.6-py315he0f41fd_1.conda + sha256: 3775fd29255340ff92d5301fcdc70ed9f74457017d1905161400c6b93b1350a6 + md5: c05f20a225f9bf4311cfe153b45982ba + depends: + - python + - __osx >=11.0 + - libcxx >=21 + - python_abi 3.15.* *_cp315 + license: MIT + license_family: MIT + purls: + - pkg:pypi/greenlet?source=hash-mapping + run_exports: {} + size: 265494 + timestamp: 1794830079557 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/howardhinnant_date-3.0.5-h4ddebb9_0.conda + sha256: 2bdb719e10f3a91d950e2513335b43ed90390233475aad895d33c109ba0bdf2c + md5: 0ac7d02474228d3fb20f063fc937eb43 + depends: + - __osx >=11.0 + - libcxx >=19 + - tzdata + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - howardhinnant_date >=3.0.5,<3.1.0a0 + size: 98678 + timestamp: 1785223784507 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/icu-79.1-py311h7f96da7_0.conda + sha256: 45c4961b3bdf4e95b9f37f69fe9531449789a3737dc4006b8e582747c6c2dc09 + md5: 401fd0e9c5a5dad761b9088dd437a0b2 + depends: + - __osx >=11.0 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - icu >=79.1,<80.0a0 + size: 14115951 + timestamp: 1792691562690 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libabseil-20260817.0-cxx17_h08226d7_2.conda + sha256: 38aa78938c0d4e19a6fdab2b808b9a5ccc4f22902e93a4cf5d8b516fd21bdb17 + md5: 3099ca3278f83bc2de6a4e5b2f15b231 + depends: + - __osx >=11.0 + - libcxx >=21 + constrains: + - abseil-cpp =20260817.0 + - libabseil-static =20260817.0=cxx17* + license: Apache-2.0 + license_family: Apache + purls: [] + run_exports: + weak: + - libabseil >=20260817.0,<20260818.0a0 + - libabseil =*=cxx17* + size: 1301595 + timestamp: 1791373732340 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libbrotlicommon-1.2.1-h1dcdb26_1.conda + sha256: 21eb0f62d75c11e4d85b2502eae8978f6f5f918121ac114bb62fb23ed627fcfe + md5: 48e56134b60deb4ccb8049cd3aee42d6 + depends: + - __osx >=11.0 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - libbrotlicommon >=1.2.1,<1.3.0a0 + size: 79726 + timestamp: 1794870559720 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libbrotlidec-1.2.1-h5295a6a_1.conda + sha256: 52c76b52f9dabe3ef66f146f2abf5c9a42fc119b74885eae7fde269d5194baa6 + md5: 2dd7c01a81eb132b3619827a56b21539 + depends: + - __osx >=11.0 + - libbrotlicommon 1.2.1 h1dcdb26_1 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - libbrotlidec >=1.2.1,<1.3.0a0 + size: 29996 + timestamp: 1794879864066 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libbrotlienc-1.2.1-h2ddc9cb_1.conda + sha256: b69e43362ea2ec100983f25d414ee7d7d3d852230e130de0784072a8b8548468 + md5: d4256e11a1445d020b0ce7cb0cac4789 + depends: + - __osx >=11.0 + - libbrotlicommon 1.2.1 h1dcdb26_1 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - libbrotlienc >=1.2.1,<1.3.0a0 + size: 295939 + timestamp: 1794870575262 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libcxx-23.1.6-hc645fd0_0.conda + sha256: 822b2a88313977594230b7be745324e4c50293a35cf9244bb19ecc9c2c385288 + md5: fcd64d8eae3a3e5a5883da0f7602832e + depends: + - __osx >=11.0 + license: Apache-2.0 WITH LLVM-exception + license_family: Apache + purls: [] + run_exports: {} + size: 566632 + timestamp: 1794983965400 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libedit-3.1.20260512-pl5321h26f1114_0.conda + sha256: 5692a969e49b200c7874d1e869d281753361980b2ecfe9191b571d7e550f8b92 + md5: ef2ab2462744ec6ba3a54c34dcc6a06e + depends: + - ncurses + - __osx >=11.0 + - ncurses >=6.6,<7.0a0 + license: BSD-2-Clause + license_family: BSD + purls: [] + run_exports: + weak: + - libedit >=3.1.20260512,<3.2.0a0 + size: 108512 + timestamp: 1791327440683 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libev-4.33-h1a92334_3.conda + sha256: c0100064506ae8abb432c5a506d474f10af2cf48c33d62bc221fb28b6d6ff6ac + md5: 19e86c8a6a47e92bb2e70ca12e758c5c + depends: + - __osx >=11.0 + license: BSD-2-Clause OR GPL-2.0-or-later + license_family: GPL + purls: [] + run_exports: + weak: + - libev >=4.33,<4.34.0a0 + size: 39991 + timestamp: 1785917376956 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libexpat-2.11.0-h367fcd6_0.conda + sha256: d65a925b2a1c9356d37ee9417ff6e03bf31b91dfb0c3dc519ca5948488b17305 + md5: 1652250d9ee91ee93a0e6377e8a2178c + depends: + - __osx >=11.0 + constrains: + - expat 2.11.0.* + license: MIT + license_family: MIT + purls: [] + run_exports: {} + size: 73087 + timestamp: 1795645992130 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libffi-3.7.0-h47dc5ef_1.conda + sha256: 2783389a7b9dda04c62cc54c6bbeb03dd3cef24b3fc642715d02a3fa19464a9a + md5: 216bbcc23c11e9695b3db4a8771d76eb + depends: + - __osx >=11.0 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - libffi >=3.7.0,<3.8.0a0 + size: 43637 + timestamp: 1787753403688 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/liblzma-5.8.3-h8088a28_1.conda + sha256: 23d0630046a3e8b164d8f80f2b74ed2605af2e7050ab9913018056402fae4311 + md5: 8ab10323068b107661a4b9a4af84f3b5 + depends: + - __osx >=11.0 + constrains: + - xz 5.8.3.* + license: 0BSD + purls: [] + run_exports: + weak: + - liblzma >=5.8.3,<6.0a0 + size: 91720 + timestamp: 1786348695846 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libmpdec-4.0.0-h84a0fba_2.conda + sha256: 04cc136c5a956a73aa14e0a160b5822b0b29714e67b299fa1b1fd16dbcba5366 + md5: ff33a4dbd93abc8a798cc4e0e7c8136d + depends: + - __osx >=11.0 + license: BSD-2-Clause + license_family: BSD + purls: [] + run_exports: {} + size: 73289 + timestamp: 1786651074391 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libnghttp2-1.71.0-h29223de_0.conda + sha256: d533256cdb91c676b106728e8437a5d96e9c02dc6a99b948f1b04b04a92620c2 + md5: a8f77fc66cd70f2c883764a318fa2f26 + depends: + - libev >=4.33,<5.0a0 + - __osx >=11.0 + - libcxx >=21 + - c-ares >=1.34.9,<2.0a0 + - libev >=4.33,<4.34.0a0 + - openssl >=3.5.9,<4.0a0 + - libzlib >=1.3.2,<2.0a0 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - libnghttp2 >=1.71.0,<2.0a0 + size: 671516 + timestamp: 1793628217888 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libsqlite-3.54.1-h9f98c0b_1.conda + sha256: ea89b54e0e59bae927358fe3b70fe8111fa475f3ef077a094187c58c7c504f03 + md5: b57b428215d2935b274ca9e3ed263214 + depends: + - __osx >=11.0 + - icu >=79.1,<80.0a0 + - libzlib >=1.3.2,<2.0a0 + license: blessing + purls: [] + run_exports: + weak: + - libsqlite >=3.54.1,<4.0a0 + size: 953531 + timestamp: 1793051601710 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libuv-1.52.1-h1a92334_1.conda + sha256: 4f47de9de1990efd998edbbd6793f89c8f02ffde987ae8120b1c006acefd2a04 + md5: de09bd0f175611e94f21b28f8c708e80 + depends: + - __osx >=11.0 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - libuv >=1.52.1,<2.0a0 + size: 122729 + timestamp: 1785914645797 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/libzlib-1.3.2-h8088a28_3.conda + sha256: a18fa5d5bac452401459f966cf0d872224e8080c4ff93c77e168d43ab42ef9d7 + md5: f39288f0ea63ae962e1a2e4f355a0d75 + depends: + - __osx >=11.0 + constrains: + - zlib 1.3.2 *_3 + license: Zlib + license_family: Other + purls: [] + run_exports: + weak: + - libzlib >=1.3.2,<2.0a0 + size: 47822 + timestamp: 1785277049190 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/micromamba-2.10.0-0.tar.bz2 + sha256: acef4eaab19ec2174ad5a449e5aad981ca326270db819502ff096a92fc31caa6 + md5: 34e52a4bc291c936ffa375bdd38a550b + depends: + - __osx >=11.0 + - howardhinnant_date >=3.0.5,<3.1.0a0 + - libcxx >=21 + license: BSD-3-Clause AND MIT AND OpenSSL + license_family: BSD + purls: [] + run_exports: {} + size: 7197729 + timestamp: 1793025453530 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/ncurses-6.6-he64c551_1.conda + sha256: 7024a48c8c0d0114ed4ab53c76bf9275d50e91ba7cea367a9aead638d3c29c68 + md5: 3dfa0d0316dc246cd44937a557de4501 + depends: + - __osx >=11.0 + license: X11 AND BSD-3-Clause + purls: [] + run_exports: + weak: + - ncurses >=6.6,<7.0a0 + size: 804298 + timestamp: 1786355189145 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/nodejs-26.13.1-he520db9_1.conda + sha256: 85126927f31d2f057fb9f0e8fd95501df80918507514b8608e0cbe79a77a8fe7 + md5: cc4cc4d51ddcb1c01e818489bd9bfccb + depends: + - __osx >=12.0 + - libcxx >=21 + - c-ares >=1.34.9,<2.0a0 + - libuv >=1.52.1,<2.0a0 + - libbrotlicommon >=1.2.1,<1.3.0a0 + - libbrotlienc >=1.2.1,<1.3.0a0 + - libbrotlidec >=1.2.1,<1.3.0a0 + - openssl >=3.5.9,<4.0a0 + - libzlib >=1.3.2,<2.0a0 + - icu >=79.1,<80.0a0 + - libnghttp2 >=1.71.0,<2.0a0 + - zstd >=1.5.7,<1.6.0a0 + - libsqlite >=3.54.1,<4.0a0 + - libabseil >=20260817.0,<20260818.0a0 + - libabseil * cxx17* + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - nodejs >=26.13.1,<27.0a0 + size: 19874117 + timestamp: 1794558585407 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/openssl-3.6.5-h55eecbc_0.conda + sha256: 44fbc526456571a9fb8fa18157f6f269d4d4bd40eef20183a93b9c9296f94497 + md5: 45d9179cdf6e53d88aec034246f0dad6 + depends: + - __osx >=11.0 + - ca-certificates + license: Apache-2.0 + license_family: Apache + purls: [] + run_exports: + weak: + - openssl >=3.6.5,<4.0a0 + size: 3111573 + timestamp: 1791097959641 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/playwright-1.65.1-h94f5d84_0.conda + sha256: e667bab209b59a20d9f507abbd8b0c78ccbf831fb6d08ad51abc09c23aa5658d + md5: 2d1b6f9f89abad5845d7c4d7c7aea3bc + depends: + - nodejs + - nodejs >=26.13.1,<27.0a0 + license: Apache-2.0 + license_family: APACHE + purls: [] + run_exports: {} + size: 2962611 + timestamp: 1794636974266 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/pydantic-core-2.50.5-py315hd6777a0_0.conda + sha256: 2622099f7a7e865c9596838bbe8c011ba83046258d01bf3a04877138a4fdc75e + md5: 64160b131c598f9a6238824b74899476 + depends: + - python + - typing-extensions >=4.16.0 + - __osx >=11.0 + - python_abi 3.15.* *_cp315 + constrains: + - __osx >=11.0 + license: MIT + license_family: MIT + purls: + - pkg:pypi/pydantic-core?source=hash-mapping + run_exports: {} + size: 1832999 + timestamp: 1795117621141 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/python-3.15.2-h2e4dbab_102_cp315.conda + build_number: 102 + sha256: f0a683de39d8ca62967b8c0c2be6c3fc7005ce3c55ba071ce434951ccfd6b40d + md5: 3e9ccb2674d6dad2ab9b53bffdb394a6 + depends: + - __osx >=11.0 + - bzip2 >=1.0.8,<2.0a0 + - libedit >=3.1.20260512,<3.2.0a0 + - libexpat >=2.9.0,<3.0a0 + - libffi >=3.7.0,<3.8.0a0 + - liblzma >=5.8.3,<6.0a0 + - libmpdec >=4.0.0,<5.0a0 + - libsqlite >=3.54.1,<4.0a0 + - libzlib >=1.3.2,<2.0a0 + - ncurses >=6.6,<7.0a0 + - openssl >=3.5.9,<4.0a0 + - python_abi 3.15.* *_cp315 + - tk >=8.6.13,<8.7.0a0 + - tzdata + - zstd >=1.5.7,<1.6.0a0 + license: Python-2.0 + purls: [] + run_exports: + weak: + - python_abi 3.15.* *_cp315 + noarch: + - python + size: 13364421 + timestamp: 1795646702279 + python_site_packages_path: lib/python3.15/site-packages +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/pyyaml-6.0.3-py315h0c34f12_4.conda + sha256: c81fb8b43b67f1a200d872531e1490dac97bfe427d35c36b5dff6fe0d61b7060 + md5: fa476904f113c39a5d17e41816178305 + depends: + - python + - yaml + - __osx >=11.0 + - python_abi 3.15.* *_cp315 + - yaml >=0.2.5,<0.3.0a0 + license: MIT + license_family: MIT + purls: + - pkg:pypi/pyyaml?source=hash-mapping + run_exports: {} + size: 204926 + timestamp: 1795255221297 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/tk-8.6.13-hbeba79b_4.conda + sha256: 857d89087ae7f2c328cf256728affcb7343031a148b4af847334d248a9cf564c + md5: 90a01bf394d1c594e0eb9258f967d828 + depends: + - __osx >=11.0 + - libzlib >=1.3.2,<2.0a0 + license: TCL + purls: [] + run_exports: + weak: + - tk >=8.6.13,<8.7.0a0 + size: 3342183 + timestamp: 1787272852357 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/yaml-0.2.7-h4c53d1a_0.conda + sha256: 2ee03b2caf8daad4f30be021bcdb03a7d54d5697c0e0de1ce0908e61bfdaa660 + md5: 083c3f148b2cfe80387fb138466720fe + depends: + - __osx >=11.0 + license: MIT + license_family: MIT + purls: [] + run_exports: + weak: + - yaml >=0.2.7,<0.3.0a0 + size: 77751 + timestamp: 1795512020050 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.7-hf451053_7.conda + sha256: da867f5092eb0cb746d353694f0098031fd9817a4ce7d5743121209ae0f406ca + md5: 4ec2684c73812cc2c3d78379384a39cc + depends: + - __osx >=11.0 + - libzlib >=1.3.2,<2.0a0 + license: BSD-3-Clause + license_family: BSD + purls: [] + run_exports: + weak: + - zstd >=1.5.7,<1.6.0a0 + size: 433687 + timestamp: 1786599629846 +- pypi: ./ + name: pyjs-code-runner + requires_dist: + - empack>=3.0.0 + - playwright + - rich + - typer diff --git a/pixi.toml b/pixi.toml new file mode 100644 index 0000000..02968dc --- /dev/null +++ b/pixi.toml @@ -0,0 +1,50 @@ +# Development environment + tasks: +# +# pixi run test # npm mode, chromium (what the CI runs) +# pixi run test "chromium firefox" # browsers (chromium, firefox, webkit) +# pixi run test-conda # conda mode (local) +# +# npm mode: pyjs from the published npm package (PYJS_CODE_RUNNER_TEST_NPM, +# default @derthorsten/pyjs@6.0.1, see test/conftest.py). +# conda mode: the tests create an emscripten-forge env (python, numpy, +# pyjs-dev >= 6) with micromamba; a local recipe build (e.g. a new pyjs) is +# searched first with PYJS_CODE_RUNNER_TEST_CHANNEL=. +[workspace] +name = "pyjs-code-runner" +channels = ["conda-forge"] +platforms = ["linux-64", "osx-arm64", "osx-64"] + +[dependencies] +python = ">=3.10" +empack = "*" +# the node driver and the python API must have the same minor version +# ("timeout: expected float, got undefined" otherwise) +playwright = "1.65.*" +playwright-python = "1.65.*" +typer = "*" +rich = "*" +pytest = "*" +# (creates the emscripten env the tests run in) +micromamba = "*" + +[pypi-dependencies] +pyjs-code-runner = { path = ".", editable = true } + +[tasks.install-browsers] +description = "install the playwright browsers (the CI also installs their system libraries: --with-deps)" +args = [{ arg = "browsers", default = "chromium" }] +cmd = "playwright install {{ browsers }}" + +[tasks.test] +description = "the tests, pyjs from the npm package, in the given browsers (chromium, firefox, webkit)" +args = [{ arg = "browsers", default = "chromium" }] +depends-on = [{ task = "install-browsers", args = ["{{ browsers }}"] }] +cmd = "pytest -s -v test" +env = { PYJS_CODE_RUNNER_TEST_BROWSERS = "{{ browsers }}", PYJS_CODE_RUNNER_TEST_MODE = "npm" } + +[tasks.test-conda] +description = "the tests, pyjs from an emscripten-forge env (pyjs-dev >= 6), in the given browsers" +args = [{ arg = "browsers", default = "chromium" }] +depends-on = [{ task = "install-browsers", args = ["{{ browsers }}"] }] +cmd = "pytest -s -v test" +env = { PYJS_CODE_RUNNER_TEST_BROWSERS = "{{ browsers }}", PYJS_CODE_RUNNER_TEST_MODE = "conda" } diff --git a/pyjs_code_runner/backend/backend.py b/pyjs_code_runner/backend/backend.py index f2acd90..4d6c3ca 100644 --- a/pyjs_code_runner/backend/backend.py +++ b/pyjs_code_runner/backend/backend.py @@ -90,17 +90,10 @@ def ensure_playwright_imports(): def get_backend_cls(backend_type): if backend_type == BackendType.node: - raise RuntimeError( - "the node backend is currently disabled as its not (yet) working with empack>=3.0.0" - ) - - elif backend_type == BackendType.browser_main: - ensure_playwright_imports() - from .browser_main.browser_main import BrowserMainBackend + raise RuntimeError("the node backend is not supported: use browser-main or browser-worker") + ensure_playwright_imports() + from .browser import BrowserMainBackend, BrowserWorkerBackend + if backend_type == BackendType.browser_main: return BrowserMainBackend - elif backend_type == BackendType.browser_worker: - ensure_playwright_imports() - from .browser_worker.browser_worker import BrowserWorkerBackend - - return BrowserWorkerBackend + return BrowserWorkerBackend diff --git a/pyjs_code_runner/backend/backend_base.py b/pyjs_code_runner/backend/backend_base.py deleted file mode 100644 index 3c9dcef..0000000 --- a/pyjs_code_runner/backend/backend_base.py +++ /dev/null @@ -1,15 +0,0 @@ -from ..constants import JS_DIR, HTML_DIR - - -class BackendBase(object): - def __init__(self, host_work_dir, work_dir, script, async_main): - self.host_work_dir = host_work_dir - self.script = script - self.work_dir = work_dir - self.async_main = async_main - - def js_utils(self): - with open(JS_DIR / "utils.js") as f: - content = f.read() - - return content diff --git a/pyjs_code_runner/backend/browser.py b/pyjs_code_runner/backend/browser.py new file mode 100644 index 0000000..522df63 --- /dev/null +++ b/pyjs_code_runner/backend/browser.py @@ -0,0 +1,108 @@ +"""Run the prepared directory (see run.py) in a browser with playwright: serve +it, open index.html (main thread) or index.html?worker (web worker), print +what the page prints, and wait for its result.""" + +import asyncio +import json +import socket +import threading +from contextlib import closing, contextmanager +from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer + +from playwright.async_api import async_playwright + +from .backend import BrowserType, launch_browser + +# how long the page may take (also the timeout of every playwright call that +# waits); recipes with long test suites raise it by patching +# Page.set_default_timeout +TIMEOUT_MS = 4 * 60 * 1000 + + +def find_free_port(): + with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s: + s.bind(("", 0)) + s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + return s.getsockname()[1] + + +@contextmanager +def serve(directory, port): + """serve `directory` at http://127.0.0.1: while in the context""" + + class Handler(SimpleHTTPRequestHandler): + # (ES modules / module workers need a JavaScript mime type) + extensions_map = { + **SimpleHTTPRequestHandler.extensions_map, + ".js": "text/javascript", + ".mjs": "text/javascript", + ".wasm": "application/wasm", + } + + def __init__(self, *args, **kwargs): + super().__init__(*args, directory=str(directory), **kwargs) + + def log_message(self, fmt, *args): + pass + + server = ThreadingHTTPServer(("127.0.0.1", port), Handler) + thread = threading.Thread(target=server.serve_forever, daemon=True) + thread.start() + try: + yield f"http://127.0.0.1:{port}" + finally: + server.shutdown() + thread.join() + + +class BrowserBackend: + """runs the script in the page's main thread (`worker` False) or in a web + worker""" + + worker = False + + def __init__( + self, + host_work_dir, + port=None, + headless=True, + slow_mo=None, + browser=BrowserType.chromium, + ): + self.host_work_dir = host_work_dir + self.port = port if port is not None else find_free_port() + self.headless = headless + self.slow_mo = slow_mo + self.browser = BrowserType(browser) + + def run(self): + with serve(self.host_work_dir, self.port) as url: + page_url = f"{url}/index.html" + ("?worker" if self.worker else "") + result = asyncio.run(self._run(page_url)) + if "error" in result: + raise RuntimeError(f"pyjs-code-runner: {result['error']}") + if result["code"] != 0: + raise RuntimeError(f"return_code != 0 ({result['code']})") + + async def _run(self, page_url): + async with async_playwright() as p: + browser = await launch_browser(p, self.browser, headless=self.headless, slow_mo=self.slow_mo) + try: + page = await browser.new_page() + page.set_default_timeout(TIMEOUT_MS) + page.on("console", lambda message: print(message.text, flush=True)) + page.on("pageerror", lambda error: print(f"page error: {error}", flush=True)) + await page.goto(page_url) + # (the page sets globalThis.result: {code} or {error}) + await page.wait_for_function("() => globalThis.result !== undefined", polling=200) + return json.loads(await page.evaluate("() => JSON.stringify(globalThis.result)")) + finally: + await browser.close() + + +class BrowserMainBackend(BrowserBackend): + worker = False + + +class BrowserWorkerBackend(BrowserBackend): + worker = True diff --git a/pyjs_code_runner/backend/browser_main/__init__.py b/pyjs_code_runner/backend/browser_main/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/pyjs_code_runner/backend/browser_main/browser_main.py b/pyjs_code_runner/backend/browser_main/browser_main.py deleted file mode 100644 index afef30a..0000000 --- a/pyjs_code_runner/backend/browser_main/browser_main.py +++ /dev/null @@ -1,96 +0,0 @@ -import os -import asyncio -from ..backend_base import BackendBase -from ..backend import BrowserType, launch_browser -from ...constants import JS_DIR, HTML_DIR -from .server import server_context, find_free_port -from playwright.async_api import async_playwright -from pathlib import Path -import shutil - - -THIS_DIR = os.path.dirname(os.path.realpath(__file__)) - - -class BrowserMainBackend(BackendBase): - def __init__( - self, - host_work_dir, - work_dir, - script, - async_main, - port, - headless, - slow_mo, - browser=BrowserType.chromium, - ): - super().__init__( - host_work_dir=host_work_dir, - work_dir=work_dir, - script=script, - async_main=async_main, - ) - if port is None: - port = find_free_port() - self.port = port - self.headless = headless - self.slow_mo = slow_mo - self.browser = BrowserType(browser) - - def run(self): - browser_main_html = "browser_main.html" - main = HTML_DIR / browser_main_html - shutil.copyfile(main, self.host_work_dir / browser_main_html) - - with server_context(work_dir=self.host_work_dir, port=self.port) as ( - server, - url, - ): - page_url = f"{url}/{browser_main_html}" - ret = asyncio.run(self.playwright_run_in_main_thread(page_url=page_url)) - if ret != 0: - raise RuntimeError("return_code != 0") - - async def playwright_run_in_main_thread(self, page_url): - async with async_playwright() as p: - browser = await launch_browser( - p, self.browser, headless=self.headless, slow_mo=self.slow_mo - ) - page = await browser.new_page() - await page.goto(page_url) - # n min = n_min * 60 * 1000 ms - n_min = 4 - page.set_default_timeout(n_min * 60 * 1000) - - async def handle_console(msg): - txt = str(msg) - print(txt) - - page.on("console", handle_console) - - # await page.goto(page_url) - status = await page.evaluate( - f"""async () => {{ - - {self.js_utils()} - - - var collected_prints = "" - const print = (text) => {{ - console.log(text) - collected_prints += text; - collected_prints += "\\n"; - }} - - var pyjs = await make_pyjs(print,print, true); - - var r = globalThis.eval_main_script(pyjs, "{self.work_dir}","{self.script}"); - if({int(self.async_main)}){{ - r = r || await run_async_python_main(pyjs); - }} - return r; - - }}""" - ) - return_code = int(status) - return return_code diff --git a/pyjs_code_runner/backend/browser_main/server.py b/pyjs_code_runner/backend/browser_main/server.py deleted file mode 100644 index d59d22d..0000000 --- a/pyjs_code_runner/backend/browser_main/server.py +++ /dev/null @@ -1,37 +0,0 @@ -import socket -import threading - -from contextlib import closing, contextmanager -from http.server import HTTPServer, SimpleHTTPRequestHandler - - -def find_free_port(): - with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s: - s.bind(("", 0)) - s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - return s.getsockname()[1] - - -def start_server(work_dir, port): - class Handler(SimpleHTTPRequestHandler): - def __init__(self, *args, **kwargs): - super().__init__(*args, directory=work_dir, **kwargs) - - def log_message(self, fmt, *args): - return - - httpd = HTTPServer(("127.0.0.1", port), Handler) - - thread = threading.Thread(target=httpd.serve_forever) - thread.start() - return thread, httpd - - -@contextmanager -def server_context(work_dir, port): - thread, server = start_server(work_dir=work_dir, port=port) - try: - yield server, f"http://127.0.0.1:{port}" - finally: - server.shutdown() - thread.join() diff --git a/pyjs_code_runner/backend/browser_worker/__init__.py b/pyjs_code_runner/backend/browser_worker/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/pyjs_code_runner/backend/browser_worker/browser_worker.py b/pyjs_code_runner/backend/browser_worker/browser_worker.py deleted file mode 100644 index 353ceb6..0000000 --- a/pyjs_code_runner/backend/browser_worker/browser_worker.py +++ /dev/null @@ -1,151 +0,0 @@ -import os -import asyncio -from ..backend_base import BackendBase -from ..backend import BrowserType, launch_browser -from ...constants import JS_DIR, HTML_DIR -from ..browser_main.server import server_context, find_free_port -from playwright.async_api import async_playwright -from playwright.async_api import Error as PlaywrightError -from pathlib import Path -import shutil - - -def _is_target_closed_error(e): - # TargetClosedError is not part of playwright's public api (and older - # versions raise a plain Error with a "Target closed" message) - msg = str(e) - return ( - type(e).__name__ == "TargetClosedError" - or "Target closed" in msg - or "has been closed" in msg - ) - - -class BrowserWorkerBackend(BackendBase): - def __init__( - self, - host_work_dir, - work_dir, - script, - async_main, - port, - headless, - slow_mo, - preload_shared_libs=True, - browser=BrowserType.chromium, - ): - super().__init__( - host_work_dir=host_work_dir, - work_dir=work_dir, - script=script, - async_main=async_main, - ) - if port is None: - port = find_free_port() - self.port = port - self.headless = headless - self.slow_mo = slow_mo - self.browser = BrowserType(browser) - self.preload_shared_libs = preload_shared_libs - - def run(self): - # copy html - browser_worker_html = "browser_worker.html" - main = HTML_DIR / browser_worker_html - shutil.copyfile(main, self.host_work_dir / browser_worker_html) - - # copy worker - worker_js = "worker.js" - main = JS_DIR / worker_js - shutil.copyfile(main, self.host_work_dir / worker_js) - - with server_context(work_dir=self.host_work_dir, port=self.port) as ( - server, - url, - ): - page_url = f"{url}/{browser_worker_html}" - ret = asyncio.run(self.playwright_run_in_worker_thread(page_url=page_url)) - if ret != 0: - raise RuntimeError("return_code != 0") - - async def playwright_run_in_worker_thread(self, page_url): - async with async_playwright() as p: - browser = await launch_browser( - p, self.browser, headless=self.headless, slow_mo=self.slow_mo - ) - page = await browser.new_page() - - # n min = n_min * 60 * 1000 ms - n_min = 4 - page.set_default_timeout(n_min * 60 * 1000) - - async def handle_worker(worker): - try: - await self._run_in_worker(worker) - except PlaywrightError as e: - if not _is_target_closed_error(e): - raise - # the page terminates the worker as soon as the worker has - # posted its result (see browser_worker.html), which may - # happen before playwright receives the evaluate result. - # The return code is read from the page below. - pass - - page.on("worker", handle_worker) - - async def handle_console(msg): - txt = str(msg) - if txt.startswith( - "warning: Browser does not support creating object URLs" - ): - pass - else: - print(txt) - - page.on("console", handle_console) - await page.goto(page_url) - await page.wait_for_function("() => globalThis.done") - - test_output = await page.evaluate_handle( - """ - () => - { - return globalThis.test_output - } - """ - ) - return_code = int(str(await test_output.get_property("return_code"))) - return return_code - - async def _run_in_worker(self, worker): - test_output = await worker.evaluate_handle( - f"""async () => - {{ - - {self.js_utils()} - - var collected_prints = "" - const print = (text) => {{ - console.log(text) - collected_prints += text; - collected_prints += "\\n"; - }} - - - var pyjs = await make_pyjs(print, print, {str(self.preload_shared_libs).lower()}); - - var r = eval_main_script(pyjs, "{self.work_dir}","{self.script}"); - if({int(self.async_main)}){{ - r = r || await run_async_python_main(pyjs); - }} - - msg = {{ - return_code : r, - collected_prints : collected_prints - }} - self.postMessage(msg) - return r - }}""" - ) - if int(str(test_output)) != 0: - raise RuntimeError(f"tests failed with return code: {test_output}") diff --git a/pyjs_code_runner/backend/node/__init__.py b/pyjs_code_runner/backend/node/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/pyjs_code_runner/backend/node/node.py b/pyjs_code_runner/backend/node/node.py deleted file mode 100644 index 0278f8c..0000000 --- a/pyjs_code_runner/backend/node/node.py +++ /dev/null @@ -1,104 +0,0 @@ -import subprocess -from pathlib import Path -import os -import shutil -import json -import sys -import shutil -from ..backend_base import BackendBase -from subprocess import Popen, PIPE, STDOUT -import textwrap - -THIS_DIR = os.path.dirname(os.path.realpath(__file__)) - - -class NodeBackend(BackendBase): - def __init__(self, host_work_dir, work_dir, script, async_main, node_binary): - super().__init__( - host_work_dir=host_work_dir, - work_dir=work_dir, - script=script, - async_main=async_main, - ) - if node_binary is None: - shutil_node_binary = shutil.which("node") - if shutil_node_binary is None: - raise RuntimeError( - textwrap.dedent( - """\n - pyjs-code-runner error: - - * Cannot find node - - - to use the node backend `node`/`nodejs` needs to be installed. - - Install playwight with: - - * conda: - - conda install -c conda-forge nodejs - - * mamba: - - mamba install -c conda-forge nodejs - - * micromamba: - - micromamb install -c conda-forge nodejs - - """ - ) - ) - else: - node_binary = shutil_node_binary - self.node_binary = node_binary - - def supports_flag_no_experimental_fetch(self): - probe_cmd = [self.node_binary, "--no-experimental-fetch", "--version"] - ret_code = subprocess.call( - probe_cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL - ) - return ret_code == 0 - - def run(self): - main_name = "node_main.js" - main = Path(THIS_DIR) / main_name - shutil.copyfile(main, self.host_work_dir / main_name) - - cmd = [self.node_binary] - if self.supports_flag_no_experimental_fetch(): - cmd.append("--no-experimental-fetch") - - cmd.extend( - [ - main_name, - self.work_dir, - self.script, - str(int(self.async_main)), - self.host_work_dir, - ] - ) - - process = subprocess.Popen(cmd, stdout=subprocess.PIPE) - # Poll process.stdout to show stdout live - while True: - output = process.stdout.readline() - if process.poll() is not None: - break - if output: - print(output.decode().strip()) - rc = process.poll() - if process.returncode != 0: - raise RuntimeError( - f"node return with returncode: {process.returncode} rc {rc}" - ) - - result_path = self.host_work_dir / "_node_result.json" - if result_path.exists(): - with open(result_path, "r") as f: - results = json.load(f) - if results["return_code"] != 0: - raise RuntimeError(results["error"]) - else: - raise RuntimeError("internal error in pyjs-code-runner") diff --git a/pyjs_code_runner/backend/node/node_main.js b/pyjs_code_runner/backend/node/node_main.js deleted file mode 100644 index 73f845e..0000000 --- a/pyjs_code_runner/backend/node/node_main.js +++ /dev/null @@ -1,112 +0,0 @@ - -const fs = require('fs'); -var path = require('path'); - -console.log(process.argv); -work_dir = process.argv[2]; -script_path = process.argv[3]; -async_main = parseInt(process.argv[4]); -host_work_dir =process.argv[5]; - -node_result_json = path.join(host_work_dir, '_node_result.json'); - - -function report_error(e){ - let data = JSON.stringify({ - error: e, - return_code: 1 - }); - fs.writeFileSync(node_result_json, data); -} - -function report_no_run(){ - let data = JSON.stringify({ - error: "unknown error, code did not run properly", - return_code: 1 - }); - fs.writeFileSync(node_result_json, data); -} - -function report_success(e){ - let data = JSON.stringify({ - return_code: 0 - }); - fs.writeFileSync(node_result_json, data); -} -// a proper run will overwrite this -report_no_run(); -(async () => { - try { - const { default: createModule } = await import("./pyjs_runtime_node.js") - - - var pyjs = await createModule() - var EmscriptenForgeModule = pyjs - global.EmscriptenForgeModule = pyjs - global.pyjs = pyjs - - - const { default: importPackages } = await import("./packed_env.js") - await importPackages(); - - const { default: importMounts } = await import("./packed_mounts.js") - await importMounts(); - - await pyjs.init() - - try{ - pyjs.exec(`import os;os.chdir("${work_dir}")`) - pyjs.eval_file(`${script_path}`); - } - catch(e){ - console.error("error while evaluating main file:",e) - report_error(e); - return; - } - if(async_main) - { - - pyjs.exec(`\n -import asyncio -_async_done_ = [False] -_ret_code = [0] -async def main_runner(): - try: - ret = await main() - if ret is None: - ret = 0 - _ret_code[0] = ret - except Exception as e: - _ret_code[0] = 1 - print("EXCEPTION",e) - finally: - global _async_done_ - _async_done_[0] = True -asyncio.ensure_future(main_runner()) - `) - - - while(true) - { - await new Promise(resolve => setTimeout(resolve, 100)); - const _async_done_ = pyjs.eval("_async_done_[0]") - if(_async_done_) - { - break; - } - } - let ret_code = pyjs.eval("_ret_code[0]"); - if(ret_code != 0) - { - // process.exit(ret_code); - report_error(Error("python_return_code!= 0")); - return; - } - } - } catch (e) { - console.error(e) - report_error(e); - return; - } - report_success() -})(); \ No newline at end of file diff --git a/pyjs_code_runner/cli/run.py b/pyjs_code_runner/cli/run.py index ea3519e..6d291f2 100644 --- a/pyjs_code_runner/cli/run.py +++ b/pyjs_code_runner/cli/run.py @@ -44,9 +44,27 @@ def parse_mounts(mounts): return parsed_mounts -conda_env_option = require_option( +conda_env_option = typer.Option( + None, *make_names("conda-env"), - help="host location of the conda environment in which to run the code", + help="host location of the conda environment (with pyjs >= 6) in which to run the code; " + "required unless --pyjs-npm is given", +) +pyjs_npm_option = typer.Option( + None, + "--pyjs-npm", + help="run with a pyjs npm package instead of a conda env: @ from the npm " + "registry, or a local package directory / .tgz", +) +packages_option = typer.Option( + None, + "--package", + help="(with --pyjs-npm) conda package spec to install at runtime, repeatable", +) +arch_option = typer.Option( + "wasm32", + "--arch", + help="(with --pyjs-npm) wasm32 or wasm64", ) script_option = require_option( *make_names("script"), help="path of script inside the virtual fileystem to run" @@ -122,7 +140,7 @@ def parse_mounts(mounts): @script_app.command() def browser_main( - conda_env: Path = conda_env_option, + conda_env: Optional[Path] = conda_env_option, script: Path = script_option, async_main: bool = async_main_option, mounts: List[str] = mounts_option, @@ -137,6 +155,9 @@ def browser_main( headless: bool = headless_option, slow_mo: Optional[int] = slowmo_option, browser: BrowserType = browser_option, + pyjs_npm: Optional[str] = pyjs_npm_option, + packages: Optional[List[str]] = packages_option, + arch: str = arch_option, ): run_script( backend_type=BackendType.browser_main, @@ -151,15 +172,16 @@ def browser_main( cache_dir=cache_dir, use_cache=cache, host_work_dir=host_work_dir, - backend_kwargs=dict( - port=port, headless=headless, slow_mo=slow_mo, browser=browser - ), + backend_kwargs=dict(port=port, headless=headless, slow_mo=slow_mo, browser=browser), + pyjs_npm=pyjs_npm, + packages=packages, + arch=arch, ) @script_app.command() def browser_worker( - conda_env: Path = conda_env_option, + conda_env: Optional[Path] = conda_env_option, script: Path = script_option, async_main: bool = async_main_option, mounts: List[str] = mounts_option, @@ -174,6 +196,9 @@ def browser_worker( headless: bool = headless_option, slow_mo: Optional[int] = slowmo_option, browser: BrowserType = browser_option, + pyjs_npm: Optional[str] = pyjs_npm_option, + packages: Optional[List[str]] = packages_option, + arch: str = arch_option, ): run_script( backend_type=BackendType.browser_worker, @@ -188,9 +213,10 @@ def browser_worker( cache_dir=cache_dir, use_cache=cache, host_work_dir=host_work_dir, - backend_kwargs=dict( - port=port, headless=headless, slow_mo=slow_mo, browser=browser - ), + backend_kwargs=dict(port=port, headless=headless, slow_mo=slow_mo, browser=browser), + pyjs_npm=pyjs_npm, + packages=packages, + arch=arch, ) @@ -247,9 +273,14 @@ def run_script( cache_dir, use_cache, backend_kwargs=None, + pyjs_npm=None, + packages=None, + arch="wasm32", ): if backend_kwargs is None: backend_kwargs = dict() + if conda_env is None and pyjs_npm is None: + exit_with_err("either --conda-env or --pyjs-npm is required") mounts = parse_mounts(mounts) if use_cache: cache_dir = get_cache_dir(cache_dir=cache_dir) @@ -271,4 +302,7 @@ def run_script( use_cache=use_cache, host_work_dir=host_work_dir, backend_kwargs=backend_kwargs, + pyjs_npm=pyjs_npm, + packages=packages, + arch=arch, ) diff --git a/pyjs_code_runner/constants.py b/pyjs_code_runner/constants.py index 569e8fc..8de1e91 100644 --- a/pyjs_code_runner/constants.py +++ b/pyjs_code_runner/constants.py @@ -1,8 +1 @@ -from pathlib import Path -import os - EMSCRIPTEN_HOME = "/home/web_user" -_THIS_DIR = Path(os.path.dirname(os.path.realpath(__file__))) - -JS_DIR = _THIS_DIR / "js" -HTML_DIR = _THIS_DIR / "html" diff --git a/pyjs_code_runner/get_cache_dir.py b/pyjs_code_runner/get_cache_dir.py index 218a974..d2a0b5c 100644 --- a/pyjs_code_runner/get_cache_dir.py +++ b/pyjs_code_runner/get_cache_dir.py @@ -1,10 +1,12 @@ -import appdirs - +import os from pathlib import Path def get_appdir(): - path = Path(appdirs.user_data_dir("pyjs_code_runner", "ThorstenBeier")) + """the default cache directory: $XDG_CACHE_HOME/pyjs_code_runner, else + ~/.cache/pyjs_code_runner""" + root = os.environ.get("XDG_CACHE_HOME") or Path.home() / ".cache" + path = Path(root) / "pyjs_code_runner" path.mkdir(parents=True, exist_ok=True) return path diff --git a/pyjs_code_runner/html/__init__.py b/pyjs_code_runner/html/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/pyjs_code_runner/html/browser_main.html b/pyjs_code_runner/html/browser_main.html deleted file mode 100644 index 1db07c2..0000000 --- a/pyjs_code_runner/html/browser_main.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - TEST_TITLE - - - - - - - - diff --git a/pyjs_code_runner/html/browser_worker.html b/pyjs_code_runner/html/browser_worker.html deleted file mode 100644 index 5f0e1b7..0000000 --- a/pyjs_code_runner/html/browser_worker.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - TEST_TITLE - - - - - - - diff --git a/pyjs_code_runner/js/__init__.py b/pyjs_code_runner/js/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/pyjs_code_runner/js/utils.js b/pyjs_code_runner/js/utils.js deleted file mode 100644 index f576f62..0000000 --- a/pyjs_code_runner/js/utils.js +++ /dev/null @@ -1,99 +0,0 @@ -async function fetchMount(pyjs, mount){ - let url = `./${mount}`; - let filename = `/mount_tarballs/${mount}`; - let byte_array = await pyjs._fetch_byte_array(url, filename); - pyjs.FS.writeFile(filename, byte_array); - pyjs._untar_from_python(filename, "/"); -} - -async function fetchMounts(pyjs) { - let response = await fetch("./mounts.json"); - if (!response.ok) { - throw new Error(`HTTP error while fetching ./mounts.json! status: ${response.status}`); - } - let mounts = await response.json(); - pyjs.FS.mkdir("/mount_tarballs"); - await Promise.all(mounts.map(mount => fetchMount(pyjs, mount))); - -} - -async function make_pyjs(print, error, preload_load_shared_libs=true) { - var pyjs = await createModule({ print: print, error: print }) - - await pyjs.bootstrap_from_empack_packed_environment( - `./empack_env_meta.json`, /* packages_json_url */ - ".", /* package_tarballs_root_url */ - false, /* verbose */ - !preload_load_shared_libs /* skip_loading_shared_libs */ - ); - globalThis.pyjs = pyjs - return pyjs -} - -globalThis.make_pyjs = make_pyjs - -function eval_main_script(pyjs, workdir, filename) { - try { - pyjs.exec("import os;from os.path import exists") - pyjs.exec(`os.chdir("${workdir}")`) - pyjs.eval_file(filename); - return 0; - } - catch (e) { - if (typeof e === "number") { - const msg = pyjs.extract_exception_message(e); - console.error("error while evaluating main file:", msg) - } - else { - console.error("error while evaluating main file:", e) - } - return 1; - } - return 0 -} -globalThis.eval_main_script = eval_main_script - -async function run_async_python_main(pyjs) { - - - pyjs.exec(` -import asyncio -_async_done_ = [False] -_ret_code = [0] -async def main_runner(): - try: - ret = await main() - if ret is None: - ret = 0 - _ret_code[0] = ret - except Exception as e: - _ret_code[0] = 1 - print("EXCEPTION",e) - finally: - global _async_done_ - _async_done_[0] = True -asyncio.ensure_future(main_runner()) - `) - - while (true) { - await new Promise(resolve => setTimeout(resolve, 100)); - const _async_done_ = pyjs.eval("_async_done_[0]") - if (_async_done_) { - break; - } - } - return pyjs.eval("_ret_code[0]") - -} -globalThis.run_async_python_main = run_async_python_main - - -if (typeof exports === 'object' && typeof module === 'object') { - module.exports = make_pyjs; -} -else if (typeof define === 'function' && define['amd']) { - define([], function () { return make_pyjs; }); -} -else if (typeof exports === 'object') { - exports["make_pyjs"] = make_pyjs; -} diff --git a/pyjs_code_runner/js/worker.js b/pyjs_code_runner/js/worker.js deleted file mode 100644 index d454866..0000000 --- a/pyjs_code_runner/js/worker.js +++ /dev/null @@ -1 +0,0 @@ -importScripts('./pyjs_runtime_browser.js') \ No newline at end of file diff --git a/pyjs_code_runner/run.py b/pyjs_code_runner/run.py index f01d783..a771eec 100644 --- a/pyjs_code_runner/run.py +++ b/pyjs_code_runner/run.py @@ -1,81 +1,163 @@ -from .backend.backend import BackendType, get_backend_type_family, get_backend_cls -from .work_dir_context import work_dir_context -from .get_cache_dir import get_cache_dir - -import tempfile -from pathlib import Path -from empack.pack import pack_env, pack_directory,add_tarfile_to_env_meta -from empack.pack import DEFAULT_CONFIG_PATH as EMPACK_DEFAULT_CONFIG_PATH -from empack.file_patterns import pkg_file_filter_from_yaml +"""Prepare a directory with everything a browser needs to run a python script +with pyjs, and run it there (backend/browser.py). + +The page (web/) is driven by the JavaScript of the pyjs npm package. Where +pyjs and the python environment come from: + +* a conda env (`conda_env`, the default; what pytester uses): an + emscripten-forge env with pyjs >= 6 in it. Its runtime + (lib_js/pyjs/pyjs_runtime_browser.{js,wasm}) and the npm package's + JavaScript (lib_js/pyjs/npm) are used, and the whole env is packed with + empack. So what runs is exactly what is installed there, e.g. a python, + pyjs and some package that were just built locally. +* an npm package (`pyjs_npm`): a pyjs npm package (a version from the npm + registry, or a local package directory / .tgz) with its own runtime and + environment; `packages` are installed at runtime from the conda channels + by the package's installer. + +The directory served to the browser: + + index.html, worker.js, run.js the page (web/) + config.json what to run, read by run.js + pyjs/ the pyjs npm package (at least dist/) + assets// conda env mode: runtime + packed env + mount_.tar.gz the mounts +""" -from contextlib import contextmanager +import json import os import shutil -import json - - -def pack_mounts(mounts, host_work_dir, backend_type): - mount_js_files = [] - for mount_index, (host_path, em_path) in enumerate(mounts): - mount_filename = f"mount_{mount_index}.tar.gz" - mount_js_files.append(mount_filename) - if host_path.is_dir(): - pack_directory( - host_dir=host_path, - mount_dir=em_path, - outname=mount_filename, - outdir=host_work_dir, - compresslevel=1, - ) +import tarfile +import tempfile +import urllib.request +from contextlib import contextmanager +from pathlib import Path - elif host_path.is_file(): - raise RuntimeError("packing files is not yet supported") - else: - raise RuntimeError( - f"host_path (={host_path}) in mounts is neither dir nor file" - ) - with open(Path(host_work_dir) / "mounts.json", "w") as f: - json.dump(mount_js_files, f, indent=4) - return mount_js_files +from empack.file_patterns import pkg_file_filter_from_yaml +from empack.pack import DEFAULT_CONFIG_PATH as EMPACK_DEFAULT_CONFIG_PATH +from empack.pack import pack_directory, pack_env +from .backend.backend import BackendType, get_backend_cls +from .get_cache_dir import get_cache_dir -def conda_env_to_cache_name(conda_env, backend_type): - env_name = str(conda_env).replace(os.path.sep, "_") - folder_name = ( - f"{env_name}__backend_family__{get_backend_type_family(backend_type).value}" +WEB_DIR = Path(__file__).resolve().parent / "web" +NPM_REGISTRY = "https://registry.npmjs.org" + + +def env_arch(conda_env): + """"wasm32" or "wasm64": the platform of the packages in `conda_env`""" + for meta in sorted((Path(conda_env) / "conda-meta").glob("*.json")): + subdir = json.loads(meta.read_text()).get("subdir", "") + if subdir.startswith("emscripten-"): + return subdir.split("-", 1)[1] + raise RuntimeError(f"{conda_env} has no emscripten-wasm32 / emscripten-wasm64 packages") + + +def install_runtime(source_dir, target_dir): + """the runtime as the npm package wants it in assets/: the wasm + and the emscripten glue as ES module (the conda package installs it as + classic script: the module is the same text + an export)""" + target_dir.mkdir(parents=True, exist_ok=True) + shutil.copyfile(source_dir / "pyjs_runtime_browser.wasm", target_dir / "pyjs_runtime_browser.wasm") + glue = (source_dir / "pyjs_runtime_browser.js").read_text() + (target_dir / "pyjs_runtime_browser.mjs").write_text(glue + "\nexport default createModule;\n") + + +def prepare_from_conda_env(conda_env, relocate_prefix, pyjs_dir, file_filter, use_cache, cache_dir, out): + """conda env mode (see the module docstring); returns (arch, config)""" + arch = env_arch(conda_env) + # pyjs_dir: a directory like lib_js/pyjs of the env (runtime + npm/) + pyjs_dir = Path(pyjs_dir) if pyjs_dir is not None else Path(conda_env) / "lib_js" / "pyjs" + if not (pyjs_dir / "npm" / "dist" / "index.js").exists(): + raise RuntimeError( + f"{pyjs_dir} has no npm/dist/index.js: pyjs-code-runner needs pyjs >= 6 in the env " + "(its conda package ships the JavaScript of the npm package in lib_js/pyjs/npm)" + ) + shutil.copytree(pyjs_dir / "npm", out / "pyjs") + assets = out / "assets" / arch + install_runtime(pyjs_dir, assets) + pack_env( + env_prefix=conda_env, + relocate_prefix=relocate_prefix, + file_filters=file_filter, + use_cache=use_cache, + cache_dir=cache_dir, + outdir=assets, + compresslevel=1, ) - return folder_name - - -def copy_pyjs(conda_env, backend_type, pyjs_dir, outdir): - if backend_type == BackendType.node: - files = ["pyjs_runtime_node.js", "pyjs_runtime_node.wasm"] + return arch, dict(pyjs="pyjs", assets="assets", packages=[]) + + +def split_npm_spec(spec): + """"@scope/name@1.2.3" -> ("@scope/name", "1.2.3"); without a version: + "latest". (A scoped name starts with an @ of its own.)""" + scope = "@" if spec.startswith("@") else "" + name, _, version = spec[len(scope):].partition("@") + return scope + name, version or "latest" + + +def npm_package_dir(spec, cache_dir): + """The directory of the npm package `spec`: a local package directory, a + local .tgz, or "@" from the npm registry (downloaded once + into the cache).""" + path = Path(spec) + if path.is_dir(): + return path + if path.is_file(): + target = Path(cache_dir) / "npm" / path.name + archive = path else: - files = ["pyjs_runtime_browser.js", "pyjs_runtime_browser.wasm"] - - # if user specified pyjs dir we prefer this - if pyjs_dir is not None: - source_dir = Path(pyjs_dir) - else: - source_dir = Path(conda_env) / "lib_js/pyjs/" - if not source_dir.exists(): - raise RuntimeError( - f"{conda_env} does not contain pyjs. use pyjs-dir argument or install pyjs in env" - ) - - for file in files: - shutil.copyfile(Path(source_dir) / file, Path(outdir) / file) + name, version = split_npm_spec(spec) + with urllib.request.urlopen(f"{NPM_REGISTRY}/{name}/{version}") as response: + meta = json.load(response) + target = Path(cache_dir) / "npm" / f"{meta['name'].replace('/', '_')}-{meta['version']}" + archive = target.with_suffix(".tgz") + if not (target / "package").is_dir(): + target.parent.mkdir(parents=True, exist_ok=True) + print(f"downloading {meta['name']}@{meta['version']}", flush=True) + urllib.request.urlretrieve(meta["dist"]["tarball"], archive) + if not (target / "package").is_dir(): + with tarfile.open(archive) as tar: + tar.extractall(target, filter="data") + return target / "package" + + +def prepare_from_npm(spec, arch, packages, cache_dir, out): + """npm mode (see the module docstring); returns (arch, config)""" + package = npm_package_dir(spec, cache_dir) + shutil.copytree(package, out / "pyjs") + if not (out / "pyjs" / "assets" / arch).is_dir(): + raise RuntimeError(f"the npm package {spec} has no runtime for {arch}") + return arch, dict(pyjs="pyjs", assets="pyjs/assets", packages=list(packages or [])) + + +def pack_mounts(mounts, out): + """each (host directory, path in the virtual file system) as tarball; + returns the `archives` entries of the npm package's initialize()""" + archives = [] + for index, (host_path, em_path) in enumerate(mounts): + host_path = Path(host_path) + if not host_path.is_dir(): + raise RuntimeError(f"mount {host_path}: only directories can be mounted") + name = f"mount_{index}.tar.gz" + pack_directory(host_dir=host_path, mount_dir=str(em_path), outname=name, outdir=out, compresslevel=1) + # (the entries are relative to "/": "home/web_user/...") + archives.append(dict(url=name, path="/")) + return archives @contextmanager def host_work_dir_context(host_work_dir=None): if host_work_dir is None: with tempfile.TemporaryDirectory() as temp_dir: - with work_dir_context(temp_dir): - yield Path(temp_dir) + yield Path(temp_dir) else: - with work_dir_context(host_work_dir): - yield host_work_dir + host_work_dir = Path(host_work_dir) + # (filled from scratch: copytree needs the targets to not exist) + for entry in ["pyjs", "assets"]: + shutil.rmtree(host_work_dir / entry, ignore_errors=True) + host_work_dir.mkdir(parents=True, exist_ok=True) + yield host_work_dir def run( @@ -92,68 +174,46 @@ def run( use_cache=False, host_work_dir=None, backend_kwargs=None, + pyjs_npm=None, + packages=None, + arch="wasm32", ): - relocate_prefix = str(relocate_prefix) - if host_work_dir is not None: - host_work_dir = Path(host_work_dir) - + """Run the python file `script` (path in the virtual file system, relative + to `work_dir`) with pyjs in a browser; raises if it fails. + + conda env mode: `conda_env` (an emscripten-forge env with pyjs >= 6). + npm mode: `pyjs_npm` ("@", a package directory or .tgz), + `packages` (conda specs installed at runtime) and `arch`; `conda_env` + is not used then (None). + `mounts`: (host directory, directory in the virtual file system) pairs. + `async_main`: after running the script, await its `main()`. + `backend_kwargs`: port, headless, slow_mo, browser, preload_shared_libs. + """ if pkg_file_filter is None: pkg_file_filter = pkg_file_filter_from_yaml(EMPACK_DEFAULT_CONFIG_PATH) - - if backend_kwargs is None: - backend_kwargs = dict() - if cache_dir is None: cache_dir = get_cache_dir(cache_dir=None) + backend_kwargs = dict(backend_kwargs or {}) - # create a temporary host work directory - with host_work_dir_context(host_work_dir) as host_work_dir: - # copy pyjs-runtime to host-work-dir - copy_pyjs( - conda_env=conda_env, - backend_type=backend_type, - pyjs_dir=pyjs_dir, - outdir=host_work_dir, - ) - - # pack the environment itself - pack_env( - env_prefix=conda_env, - relocate_prefix=relocate_prefix, - file_filters=pkg_file_filter, - use_cache=use_cache, - cache_dir=cache_dir, - outdir=host_work_dir, - compresslevel=9, - ) - env_meta_filename = Path(host_work_dir) / "empack_env_meta.json" - - - - #raise RuntimeError("stop here") - # pack all the mounts - mount_files = pack_mounts( - mounts=mounts, - backend_type=backend_type, - host_work_dir=host_work_dir, - ) - for mount_file in mount_files: - print(f"mount_file: {mount_file}") - try: - add_tarfile_to_env_meta( - env_meta_filename=env_meta_filename, tarfile=mount_file - ) - except shutil.SameFileError: - pass - - # get the backend where the wasm code runs (ie node/browser-main/browser-worker) - backend = get_backend_cls(backend_type=backend_type)( - host_work_dir=host_work_dir, - work_dir=work_dir, - script=script, - async_main=async_main, - **backend_kwargs, + with host_work_dir_context(host_work_dir) as out: + if pyjs_npm is not None: + arch, config = prepare_from_npm(pyjs_npm, arch, packages, cache_dir, out) + else: + arch, config = prepare_from_conda_env( + conda_env, str(relocate_prefix), pyjs_dir, pkg_file_filter, use_cache, cache_dir, out + ) + config.update( + arch=arch, + archives=pack_mounts(mounts, out), + work_dir=str(work_dir), + script=str(script), + async_main=bool(async_main), + # (default as before: preloaded, also in a worker) + preload_shared_libs=bool(backend_kwargs.pop("preload_shared_libs", True)), ) + (out / "config.json").write_text(json.dumps(config, indent=2)) + for name in ["index.html", "worker.js", "run.js"]: + shutil.copyfile(WEB_DIR / name, out / name) - # run + backend = get_backend_cls(backend_type=backend_type)(host_work_dir=out, **backend_kwargs) backend.run() diff --git a/pyjs_code_runner/version.py b/pyjs_code_runner/version.py index 88c513e..ce1305b 100644 --- a/pyjs_code_runner/version.py +++ b/pyjs_code_runner/version.py @@ -1 +1 @@ -__version__ = "3.3.0" +__version__ = "4.0.0" diff --git a/pyjs_code_runner/web/index.html b/pyjs_code_runner/web/index.html new file mode 100644 index 0000000..e407b66 --- /dev/null +++ b/pyjs_code_runner/web/index.html @@ -0,0 +1,38 @@ + + + + + pyjs-code-runner + + + + + diff --git a/pyjs_code_runner/web/run.js b/pyjs_code_runner/web/run.js new file mode 100644 index 0000000..51a174d --- /dev/null +++ b/pyjs_code_runner/web/run.js @@ -0,0 +1,72 @@ +// Runs the user's script with pyjs, in the main thread (index.html) or in a +// worker (worker.js). Everything comes from the directory this file is +// served from, prepared by pyjs_code_runner/run.py. `config.json` says what +// to run and where things are: +// +// arch, work_dir, script, async_main, preload_shared_libs +// pyjs the directory of the pyjs npm package (its dist/*.js) +// assets the `assetsUrl`: / with the runtime +// (pyjs_runtime_browser.{mjs,wasm}) and a packed environment +// packages conda packages to install at runtime (npm mode) +// archives the mounts: tarballs unpacked into the file system +// +// The two sources (see run.py): a conda env (its runtime, its npm JS from +// lib_js/pyjs/npm, the env packed by empack: what pytester uses), or an npm +// package (its own JS, runtime and environment, + `packages`). +// +// Returns the exit code of the script: 0 if it ran through (and, with +// async_main, its `main()` returned None or 0), else non-zero. + +// The python side: run the script as `python