Skip to content

Commit

Permalink
docs(repl): remove hacks to support ibis-in-the-browser
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Aug 17, 2024
1 parent c172f87 commit 0d4b6e6
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 91 deletions.
8 changes: 1 addition & 7 deletions docs/tutorials/browser/repl.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,7 @@ penguins[^1] dataset loaded into the DuckDB backend!
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
%clear
%pip install 'ibis-framework[duckdb]'
%pip install 'ibis-framework[duckdb,examples]'
from ibis.interactive import *
penguins = ibis.read_csv("penguins.csv")
penguins
Expand Down
8 changes: 1 addition & 7 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,10 @@ build-ibis-for-pyodide:
#!/usr/bin/env bash
set -euo pipefail
# TODO(cpcloud): remove when:
# 1. pyarrow release contains pyodide
# 2. ibis supports this version of pyarrow
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 \
jq '{"PipliteAddon": {"piplite_urls": [$ibis]}}' -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
Expand Down
106 changes: 34 additions & 72 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ altair = { version = ">=5.0.1,<6", python = ">=3.10,<3.13" }
ipykernel = { version = ">=6.25.1,<7", python = ">=3.10,<3.13" }
itables = { version = ">=1.6.3,<2.2", python = ">=3.10,<3.13" }
nbclient = { version = ">=0.8.0,<1", python = ">=3.10,<3.13" }
notebook = { version = ">=7.2.0,<7.3", python = ">=3.10,<3.13" }
plotly = { version = ">=5.16.1,<6", python = ">=3.10,<3.13" }
plotnine = { version = ">=0.12.2,<1", python = ">=3.10,<3.13" }
py-cpuinfo = { version = ">=9,<10", python = ">=3.10,<3.13" }
Expand All @@ -133,10 +134,10 @@ scikit-learn = { version = ">=1.3,<2", python = ">=3.10,<3.13" }
seaborn = { version = ">=0.12.2,<1", python = ">=3.10,<3.13" }
lonboard = { version = "0.9.3", python = ">=3.10,<3.13" }
jupyter-cache = { version = ">=1.0.0,<2", python = ">=3.10,<3.13" }
jupyterlab = { version = ">=4.1.6,<5", python = ">=3.10,<3.13" }
jupyterlab = { version = ">=4.2.0,<4.3", python = ">=3.10,<3.13" }
jupyterlab-night = { version = ">=0.4.6,<1", python = ">=3.10,<3.13" }
jupyterlite-core = { version = ">=0.3,<0.4", python = ">=3.10,<3.13" }
jupyterlite-pyodide-kernel = { version = ">=0.3,<0.4", python = ">=3.10,<3.13" }
jupyterlite-core = { version = ">=0.4,<0.5", python = ">=3.10,<3.13" }
jupyterlite-pyodide-kernel = { version = ">=0.4,<0.5", python = ">=3.10,<3.13" }

[tool.poetry.extras]
bigquery = [
Expand Down
5 changes: 3 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ jupyterlab-pygments==0.3.0 ; python_version >= "3.10" and python_version < "3.13
jupyterlab-server==2.27.3 ; python_version >= "3.10" and python_version < "3.13"
jupyterlab-widgets==3.0.11 ; python_version >= "3.10" and python_version < "3.13"
jupyterlab==4.2.4 ; python_version >= "3.10" and python_version < "3.13"
jupyterlite-core==0.3.0 ; python_version >= "3.10" and python_version < "3.13"
jupyterlite-pyodide-kernel==0.3.2 ; python_version >= "3.10" and python_version < "3.13"
jupyterlite-core==0.4.0 ; python_version >= "3.10" and python_version < "3.13"
jupyterlite-pyodide-kernel==0.4.1 ; python_version >= "3.10" and python_version < "3.13"
keyring==24.3.1 ; python_version >= "3.10" and python_version < "4.0"
kiwisolver==1.4.5 ; python_version >= "3.10" and python_version < "3.13"
lonboard==0.9.3 ; python_version >= "3.10" and python_version < "3.13"
Expand All @@ -145,6 +145,7 @@ nbformat==5.10.4 ; python_version >= "3.10" and python_version < "3.13"
nest-asyncio==1.6.0 ; python_version >= "3.10" and python_version < "3.13"
nodeenv==1.9.1 ; python_version >= "3.10" and python_version < "4.0"
notebook-shim==0.2.4 ; python_version >= "3.10" and python_version < "3.13"
notebook==7.2.1 ; python_version >= "3.10" and python_version < "3.13"
numpy==2.0.1 ; python_version >= "3.10" and python_version < "4.0"
oauthlib==3.2.2 ; python_version >= "3.10" and python_version < "4.0"
oracledb==2.3.0 ; python_version >= "3.10" and python_version < "4.0"
Expand Down

0 comments on commit 0d4b6e6

Please sign in to comment.