From 7c281a48d75c508ac198afe39c55c0c4a583d8d3 Mon Sep 17 00:00:00 2001 From: Davide Scaini Date: Sun, 29 Mar 2026 16:52:58 +0200 Subject: [PATCH] fix: edit extras install command and render symlink parent dir --- CHEATSHEET.md | 3 +++ README.md | 1 + bincio/edit/cli.py | 2 +- bincio/render/cli.py | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHEATSHEET.md b/CHEATSHEET.md index ff332dd..3b8c7d3 100644 --- a/CHEATSHEET.md +++ b/CHEATSHEET.md @@ -51,6 +51,9 @@ npm run preview ## Edit ```bash +# Install edit dependencies (FastAPI + uvicorn) — one-time +uv sync --extra edit + # Start the edit server (port 4041 by default) uv run bincio edit --data-dir ~/bincio_data diff --git a/README.md b/README.md index 017c7bb..f46a800 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ uv run bincio render --serve # merges edits, links data, starts astro dev # → http://localhost:4321 # Optional: enable the activity edit UI +uv sync --extra edit # install FastAPI + uvicorn (one-time) uv run bincio edit # starts edit server on http://localhost:4041 # Set PUBLIC_EDIT_URL=http://localhost:4041 in site/.env ``` diff --git a/bincio/edit/cli.py b/bincio/edit/cli.py index 4db0d6f..ce19483 100644 --- a/bincio/edit/cli.py +++ b/bincio/edit/cli.py @@ -42,7 +42,7 @@ def edit( except ImportError: raise click.ClickException( "uvicorn is required for the edit server.\n" - "Install with: uv add 'bincio[edit]'" + "Install with: uv sync --extra edit" ) data = _resolve_data_dir(data_dir, config_path) diff --git a/bincio/render/cli.py b/bincio/render/cli.py index 322a500..189f65b 100644 --- a/bincio/render/cli.py +++ b/bincio/render/cli.py @@ -76,6 +76,7 @@ def _link_data(site: Path, data: Path) -> None: merged = data / "_merged" target = merged if merged.exists() else data public_data = site / "public" / "data" + public_data.parent.mkdir(parents=True, exist_ok=True) if public_data.is_symlink(): if public_data.resolve() == target.resolve(): return # already correct