diff --git a/docs/tutorials/browser/repl.qmd b/docs/tutorials/browser/repl.qmd index a987ddfb7de3d..d70c17d550bd0 100644 --- a/docs/tutorials/browser/repl.qmd +++ b/docs/tutorials/browser/repl.qmd @@ -18,9 +18,12 @@ from urllib.parse import urlencode lines = """ %pip install numpy pandas tzdata import pyodide_js, pathlib, js -await pyodide_js.loadPackage("https://storage.googleapis.com/ibis-wasm-wheels/pyarrow-16.0.0.dev2661%2Bg9bddb87fd-cp311-cp311-emscripten_3_1_46_wasm32.whl") -pathlib.Path("penguins.csv").write_text(await (await js.fetch("https://storage.googleapis.com/ibis-tutorial-data/penguins.csv")).text()) -del pyodide_js, pathlib, js +wheel_url = "https://storage.googleapis.com/ibis-wasm-wheels/pyarrow-17.0.0-cp311-cp311-emscripten_3_1_46_wasm32.whl" +await pyodide_js.loadPackage(wheel_url) +penguins_csv_url = "https://storage.googleapis.com/ibis-tutorial-data/penguins.csv" +penguins_text = await (await js.fetch(penguins_csv_url)).text() +pathlib.Path("penguins.csv").write_text(penguins_text) +del pyodide_js, pathlib, js, wheel_url, penguins_csv_url, penguins_text %clear %pip install 'ibis-framework[duckdb]' from ibis.interactive import * diff --git a/justfile b/justfile index 777b45ca44c37..4ba7fad4c6f9f 100644 --- a/justfile +++ b/justfile @@ -249,33 +249,22 @@ docs-api-preview: docs-deploy: quarto publish --no-prompt --no-browser --no-render netlify docs -# build an ibis_framework wheel that works with pyodide -build-ibis-for-pyodide: +# build jupyterlite repl +build-jupyterlite: #!/usr/bin/env bash set -euo pipefail - # TODO(cpcloud): remove when: - # 1. pyarrow release contains pyodide - # 2. ibis supports this version of pyarrow + # build an ibis wheel rm -rf dist/ - poetry add 'pyarrow>=10.0.1' --allow-prereleases poetry build --format wheel - git checkout poetry.lock pyproject.toml - jq '{"PipliteAddon": {"piplite_urls": [$ibis, $duckdb]}}' -nM \ - --arg ibis dist/*.whl \ - --arg duckdb "https://duckdb.github.io/duckdb-pyodide/wheels/duckdb-1.0.0-cp311-cp311-emscripten_3_1_46_wasm32.whl" \ - > docs/jupyter_lite_config.json - -# build the jupyterlite deployment -build-jupyterlite: build-ibis-for-pyodide - #!/usr/bin/env bash - set -euo pipefail mkdir -p docs/_output/jupyterlite + jupyter lite build \ --debug \ --no-libarchive \ - --config docs/jupyter_lite_config.json \ + --piplite-wheels dist/*.whl \ + --piplite-wheels "https://duckdb.github.io/duckdb-pyodide/wheels/duckdb-1.1.0-cp311-cp311-emscripten_3_1_46_wasm32.whl" \ --apps repl \ --no-unused-shared-packages \ --output-dir docs/_output/jupyterlite