feat: support SQL cells and pin dependencies in notebooks #74
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Quarto-marimo tutorial site to include the SQL tutorial again by adding SQL marimo-cell support in the engine/extractor, and updates multiple tutorials to marimo 0.23.1 with pinned (Pyodide-friendly) dependencies via pyproject frontmatter.
Changes:
- Add SQL marimo-cell detection (TS) and SQL→Python conversion during extraction (Python) so SQL cells can execute in the marimo engine flow.
- Update tutorials’ frontmatter (marimo version, headers,
pyprojectdependencies) and re-add SQL tutorial to navigation/rendering. - Adjust project rendering configuration (
_quarto.yml,make render) to render the whole project.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
tutorials/ui.qmd |
Update marimo version/header and minor formatting changes. |
tutorials/sql.qmd |
Add pyproject dependencies and Pyodide-friendly CSV loading; tutorial formatting tweaks. |
tutorials/plots.qmd |
Add pyproject dependencies/header; update marimo version and formatting. |
tutorials/markdown.qmd |
Add pyproject dependencies/header; update marimo version and formatting. |
tutorials/markdown_format.qmd |
Add pyproject dependencies/header; update marimo version and formatting. |
tutorials/layout.qmd |
Update marimo version/header and formatting. |
tutorials/intro.qmd |
Update marimo version/header and formatting. |
tutorials/index.qmd |
Add copyright header; add SQL tutorial link; fix for-jupyter-users link. |
tutorials/for_jupyter_users.qmd |
Update marimo version/header and formatting. |
tutorials/fileformat.qmd |
Update marimo version/header; convert admonition syntax; formatting tweaks. |
tutorials/external_dependencies.qmd |
Add copyright header. |
tutorials/example-pdf.qmd |
Add copyright header. |
tutorials/dataflow.qmd |
Add pyproject dependencies/header; update marimo version and formatting. |
tests/python/test_extract.py |
Add unit tests for SQL conversion helper; update marimo-version stripping test. |
tests/is-marimo-cell.test.ts |
Add tests covering SQL marimo-cell detection. |
tests/cell-execution-regex.test.ts |
Add tests covering SQL fence regex variants. |
Makefile |
Make render run full quarto render; add preview to .PHONY. |
lib/is-marimo-cell.ts |
Recognize SQL marimo-cell languages (sql, sql.marimo). |
lib/cell-execution-regex.ts |
Extend marimo fence regex to match SQL variants. |
_quarto.yml |
Ensure tutorials (including SQL) are rendered; add SQL tutorial to sidebar. |
_extensions/marimo/extract.py |
Add SQL→Python conversion and apply it during pandoc export generation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| render: | ||
| quarto render tutorials/intro.qmd --to html | ||
| quarto render |
There was a problem hiding this comment.
this ensures that the config defined in _quarto.yml will be used to determine how to render full project.
| CREATE OR replace TABLE cars as ( | ||
| SELECT * FROM cars_df | ||
| ); |
There was a problem hiding this comment.
DuckDB HTTPFS extension has no wasm build, so the remote CSV read will always err. to work around that, we load cars_df via a pd.read_csv call, because that's our most stable bet in Pyodide for fetching remote data.
There was a problem hiding this comment.
We can potentially patch for duckdb, we do a few other select patches: marimo-team/marimo#9413
There was a problem hiding this comment.
ahh that would make a lot of sense. I'll take a stab at it.
There was a problem hiding this comment.
dmadisetti
left a comment
There was a problem hiding this comment.
Couple qs! But thanks! Looks like an oversight
Summary
The current https://marimo-team.github.io/quarto-marimo/ deployment omits the SQL tutorial. This PR adds support for sql cells and also ensures that the example notebook is Pyodide-compatible (uses pandas to read remote CSV instead of DuckDB which has no wasm build for HTTPFS ext).
Updates marimo copyright year as well to 2026.
Also fixes the plot tutorial notebook layout:
Current GH Pages

Fixed nb from localhost

Checklist
make lintandmake testpass locally.