Skip to content

Per-demo runnable scripts + Makefile targets#2

Open
noahgift wants to merge 1 commit into
mainfrom
feat/per-demo-scripts
Open

Per-demo runnable scripts + Makefile targets#2
noahgift wants to merge 1 commit into
mainfrom
feat/per-demo-scripts

Conversation

@noahgift
Copy link
Copy Markdown
Contributor

Summary

  • Adds one standalone script per demo concept so each can be run independently
    • scripts/demo-1-fundamentals.sh — sql/01-fundamentals/*.sql (5 files)
    • scripts/demo-2-joins.sh — sql/02-joins/*.sql (3 files)
    • scripts/demo-3-pagila.sh — sql/pagila-analytics/*.sql (3 files)
    • scripts/demo-4-rust.sh [LIMIT] — Rust capstone, 3 contract-enforced reports
    • scripts/demo-all.sh — runs every demo in sequence
  • Each script auto-starts Postgres + loads Pagila if needed, prints a banner per step, exits non-zero on any failure (set -euo pipefail).
  • Mirrors every script with a Makefile target: make demo-1-fundamentalsmake demo-all.
  • Adds a 4-line header to each sql/pagila-analytics/*.sql query.
  • Bumps cc 1.2.61 → 1.2.62 in Cargo.lock so fresh clones build cleanly under Rust 1.95.
  • Adds /out/ and .idea/ to .gitignore (demo-4 writes JSON to out/).

Test plan

  • bash scripts/demo-1-fundamentals.sh — 5 SQL files run cleanly
  • bash scripts/demo-2-joins.sh — 3 files run cleanly
  • bash scripts/demo-3-pagila.sh — 3 reports, 10 rows each
  • bash scripts/demo-4-rust.sh 3 — 3 JSON files written to out/, contracts pass
  • cargo test --release — 13/13 pass against dockerised Postgres 16
  • cargo llvm-cov --workspace --summary-only — 100% lines / 100% functions on both lib.rs and main.rs

🤖 Generated with Claude Code

Split the demo surface into four standalone scripts so each can be run,
filmed, or screen-shared independently:

  scripts/demo-1-fundamentals.sh  sql/01-fundamentals/*.sql (5 files)
  scripts/demo-2-joins.sh         sql/02-joins/*.sql (3 files)
  scripts/demo-3-pagila.sh        sql/pagila-analytics/*.sql (3 files)
  scripts/demo-4-rust.sh          Rust capstone, 3 contract-enforced reports
                                  (accepts a limit: demo-4-rust.sh 5)
  scripts/demo-all.sh             run all four in sequence

Each script:
- starts postgres + loads Pagila if not already up
- prints a cyan banner per step ("=== <what> ===")
- exits non-zero on any failure (set -euo pipefail)
- demo-4 writes JSON to out/ — added to .gitignore

Makefile targets mirror each script: make demo-1-fundamentals … make demo-all.
Help target updated with the new targets.

Also adds a 4-line header to each pagila-analytics/*.sql query explaining
its purpose and tying it to the corresponding postgres-reports Rust function.

cc bumped 1.2.61 -> 1.2.62 (cargo update -p cc) so fresh clones build
cleanly under Rust 1.95 without the upstream apple_sdk_name regression.

cargo test --release: 13/13 pass against the dockerised Postgres 16.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant