From 86c8dba38cc6315bbc2c48588eca8b449295d8c9 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Sat, 18 Jan 2025 08:05:07 -0500 Subject: [PATCH] chore(docs): avoid downloading files in jupyterlite setup --- docs/tutorials/browser/repl.qmd | 6 ------ justfile | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/tutorials/browser/repl.qmd b/docs/tutorials/browser/repl.qmd index 47337a6a47e0..d83942d60a6b 100644 --- a/docs/tutorials/browser/repl.qmd +++ b/docs/tutorials/browser/repl.qmd @@ -24,12 +24,6 @@ Please [open an issue on GitHub](https://github.com/ibis-project/ibis/issues/new from urllib.parse import urlencode lines = """ -import pathlib, js -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 pathlib, js, penguins_csv_url, penguins_text -%clear %pip install 'ibis-framework[duckdb]' from ibis.interactive import * penguins = ibis.read_csv("penguins.csv") diff --git a/justfile b/justfile index 4f9d006588ee..2eb19330441b 100644 --- a/justfile +++ b/justfile @@ -302,12 +302,15 @@ build-jupyterlite: --arg ibis "dist/ibis_framework-${ibis_dev_version}-py3-none-any.whl" \ > jupyter_lite_config.json + curl -SLsO https://storage.googleapis.com/ibis-tutorial-data/penguins.csv jupyter lite build \ --debug \ + --contents penguins.csv \ --no-libarchive \ --apps repl \ --no-unused-shared-packages \ --output-dir docs/_output/jupyterlite + rm -f penguins.csv # jupyter lite build can copy from the nix store, and preserves the # original write bit; without this the next run of this rule will result in # a permission error when the build tries to remove existing files