feat: add marimo notebooks#37
Conversation
This PR adds marimo notebook versions of the .ipynb files in the `./marimo` directory, and adds URLs to `README.md` to launch those notebooks in molab. The URLs currently refer to the author's repo (`gvwilson`) and this branch (`adding-marimo-notebooks`) so that the PR can be tested. Those URLs will have to be adjusted to make this work on `main` before the PR is merged. Note that these notebooks load datasets from URLs rather than from `altair.datasets` so that the same notebooks can be used via WASM (which can't load `altair.datasets` because of Pyodide/C-package issues).
domoritz
left a comment
There was a problem hiding this comment.
Looks great. Can you add instructions for running the notebooks locally to the readme?
Bonus points for adding a workflow in https://github.com/uwdata/visualization-curriculum/tree/main/.github/workflows to run these notebooks so we can make sure they run with the specified versions.
| # /// script | ||
| # requires-python = ">=3.11" | ||
| # dependencies = [ | ||
| # "altair==6.1.0", | ||
| # "marimo", | ||
| # "pandas==3.0.1", | ||
| # ] | ||
| # /// |
There was a problem hiding this comment.
Do we need this header if we have the pypackage.toml already? I'm worried about keeping the versions in sync.
There was a problem hiding this comment.
The PEP 732 header allows people to run the notebook with (e.g.) uv run marimo run notebook.py without having to set up a virtual environment, while still being able to run it within a virtual environment if they'd rather.
There was a problem hiding this comment.
Wouldn't uv run marimo run notebook.py pick up the top level pypackage.toml we have in this repo? I notice that we for example already have a discrepancy in pandas versions ("pandas>=3.0.2"). But we can address this later. Let's get the marimo notebooks merged.
|
|
Thank you @gvwilson! |
This PR adds marimo notebook versions of the .ipynb files in the
./marimodirectory, and adds URLs toREADME.mdto launch those notebooks in molab. The URLs currently refer to the author's repo (gvwilson) and this branch (adding-marimo-notebooks) so that the PR can be tested. Those URLs will have to be adjusted to make this work onmainbefore the PR is merged.Note that these notebooks load datasets from URLs rather than from
altair.datasetsso that the same notebooks can be used via WASM (which can't loadaltair.datasetsbecause of Pyodide/C-package issues).This PR is an alternative to #36.