Add the hosted-demo seed: a house panel over three flows
`scripts/seed_demo.py` wipes and recreates one persistent demo — `home`, `home_history` and `pv_model`, plus a `demo` dashboard carrying all fifteen widget types across three sections. Operational script for the hosted instance only: `make seed-hosted-demo`, with `API_URL` selecting which one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HTsT1isxUjw5gtkJk8WhuA
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
# The workspace root delegates to these (see ../Makefile).
|
# The workspace root delegates to these (see ../Makefile).
|
||||||
|
|
||||||
.PHONY: dev-utils dev dev-local up down update install dev-backend dev-frontend \
|
.PHONY: dev-utils dev dev-local up down update install dev-backend dev-frontend \
|
||||||
generate-client seed-example seed-demo test test-backend test-frontend soak bench-startup lint lint-backend \
|
generate-client seed-example seed-demo seed-hosted-demo test test-backend test-frontend soak bench-startup lint lint-backend \
|
||||||
lint-frontend umami clean help
|
lint-frontend umami clean help
|
||||||
|
|
||||||
COMPOSE_ROOT := $(CURDIR)
|
COMPOSE_ROOT := $(CURDIR)
|
||||||
@@ -97,6 +97,20 @@ seed-example: ## Seed the querying-chart example (needs a running stack + Influ
|
|||||||
seed-demo: ## Seed the training-run example: a batch flow and its dashboard
|
seed-demo: ## Seed the training-run example: a batch flow and its dashboard
|
||||||
cd backend && uv run python ../scripts/seed_demo_training.py
|
cd backend && uv run python ../scripts/seed_demo_training.py
|
||||||
|
|
||||||
|
# Operators of the hosted demo only — NOT part of any deployment, and nothing a
|
||||||
|
# self-hosted instance needs. It wipes and recreates its three flows and its
|
||||||
|
# dashboard, so re-running it is how the public demo is reset.
|
||||||
|
# `uv run` does not read .env, so the credentials are lifted out of it here;
|
||||||
|
# anything already exported wins, which is how a remote instance is targeted:
|
||||||
|
# API_URL=https://api.example.com make seed-hosted-demo
|
||||||
|
seed-hosted-demo: ## Seed the hosted demo panel (operators only; API_URL selects the instance)
|
||||||
|
@user=$$(grep -E '^FIRST_SUPERUSER=' $(COMPOSE_ROOT)/.env 2>/dev/null | head -1 | cut -d= -f2-); \
|
||||||
|
pass=$$(grep -E '^FIRST_SUPERUSER_PASSWORD=' $(COMPOSE_ROOT)/.env 2>/dev/null | head -1 | cut -d= -f2-); \
|
||||||
|
cd backend && \
|
||||||
|
FIRST_SUPERUSER="$${FIRST_SUPERUSER:-$$user}" \
|
||||||
|
FIRST_SUPERUSER_PASSWORD="$${FIRST_SUPERUSER_PASSWORD:-$$pass}" \
|
||||||
|
uv run python ../scripts/seed_demo.py
|
||||||
|
|
||||||
# ── Testing ───────────────────────────────────────────────────────
|
# ── Testing ───────────────────────────────────────────────────────
|
||||||
|
|
||||||
test: test-backend test-frontend ## Run all tests (backend + frontend)
|
test: test-backend test-frontend ## Run all tests (backend + frontend)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user