Skip to content

Commit f77c6c3

Browse files
committed
update readme and uv
1 parent a26e74e commit f77c6c3

3 files changed

Lines changed: 677 additions & 682 deletions

File tree

README.md

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@ cp .env.example .env
1313
uv sync
1414
cd app && pnpm install && cd ..
1515

16-
# 3. Start
17-
cd app && pnpm dev:all
16+
# 3. Export notebooks to static HTML
17+
cd app && pnpm export:notebooks && cd ..
18+
19+
# 4. Start the dev server
20+
cd app && pnpm dev
1821
```
1922

2023
Open http://localhost:3000.
@@ -30,7 +33,6 @@ Open http://localhost:3000.
3033
```
3134
ddp/
3235
├── notebooks/ # Marimo notebooks (.py)
33-
│ ├── home.py
3436
│ ├── quick-start.py
3537
│ ├── publications.py
3638
│ ├── agent-guide.py
@@ -39,17 +41,20 @@ ddp/
3941
│ │ ├── models/ # Ecosystems, Repositories, Developers, Commits, Events, Timeseries Metrics
4042
│ │ └── metric-definitions/ # Activity, Alignment, Lifecycle, Retention
4143
│ └── insights/ # 2025 Developer Trends, Lifecycle, Speedrun Ethereum, DeFi Journeys, Retention
44+
├── scripts/
45+
│ └── export_notebooks.py # Exports notebooks to static HTML
4246
├── app/ # Next.js app (UI shell)
4347
│ ├── app/ # Pages (App Router)
44-
── components/ # Sidebar, MarimoIframe
45-
├── serve_notebooks.py # Marimo ASGI server (port 8000)
48+
── components/ # Sidebar, MarimoIframe
49+
│ └── public/notebooks/ # Exported HTML (generated, gitignored)
4650
└── pyproject.toml
4751
```
4852

4953
## How it works
5054

51-
- **Marimo server** (`localhost:8000`) — runs notebook kernels via `serve_notebooks.py`
52-
- **Next.js app** (`localhost:3000`) — navigation shell that embeds notebooks in iframes
55+
- **Export step**`scripts/export_notebooks.py` runs `marimo export html` on each notebook, writing static HTML to `app/public/notebooks/`
56+
- **Next.js app** (`localhost:3000`) — navigation shell that serves the exported HTML via `MarimoIframe`
57+
- **CI** — the [deploy workflow](.github/workflows/deploy.yml) exports notebooks and builds the site on push to `main`. A [weekly refresh](.github/workflows/refresh-data.yml) re-exports to pick up fresh data.
5358

5459
Each page in the Next.js app is a thin wrapper around a `MarimoIframe` component:
5560

@@ -62,6 +67,7 @@ Each page in the Next.js app is a thin wrapper around a `MarimoIframe` component
6267
1. Create `notebooks/<category>/<name>.py` using the standard template below
6368
2. Add a page at `app/app/<category>/<name>/page.tsx`
6469
3. Add a nav entry to `app/components/Sidebar.tsx`
70+
4. Run `cd app && pnpm export:notebooks` to generate the HTML
6571

6672
### Notebook template
6773

@@ -88,22 +94,8 @@ if __name__ == "__main__":
8894

8995
For detailed notebook conventions, see [`notebooks/claude.md`](notebooks/claude.md).
9096

91-
## Running servers separately
92-
93-
```bash
94-
# Terminal 1 — Marimo
95-
uv run python serve_notebooks.py
96-
97-
# Terminal 2 — Next.js
98-
cd app && pnpm dev
99-
```
100-
101-
Notebooks are served at `http://localhost:8000/notebooks/<name>` — Marimo must be running for iframes to render.
102-
10397
## Configuration
10498

10599
| Variable | Description |
106100
|----------|-------------|
107101
| `OSO_API_KEY` | Required. OSO data warehouse access key. |
108-
109-
The Marimo port defaults to `8000`. To change it, update `serve_notebooks.py` and the `marimoPort` prop on `MarimoIframe` in any relevant pages.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ dependencies = [
1717

1818
[tool.marimo.runtime]
1919
dotenv = [".env", ".env.testing"]
20+
output_max_bytes = 10_000_000
2021

2122
[dependency-groups]
2223
dev = [

0 commit comments

Comments
 (0)