Bodyweight training log modelled as a dbt project on DuckDB. A command-line questionnaire writes reps for push-ups, squats and ab presses to CSV tables in a star schema; dbt reads them in place and builds staging, intermediate and mart layers. The scoring, each session against the best of the last 42 days, moved from Python to SQL window functions, and every build tests it against the Python original. The calendar dashboard is drawn from the marts.
Period
Spring 2025, rebuilt on dbt in autumn 2026
Role
Sole developer: CLI, data model, dbt models and tests, CI, dashboard
Result
45 tests run on every build. The SQL port matches the Python scores exactly on all 24 sessions, and the dashboard reads the marts with no visible change
Own session log, Sep 2025 to Jan 2026: 24 sessions
Tests
Run by dbt build in lineage order, on every push
Generic
Unique and not-null keys on every layer, relationships from facts to dimensions, accepted values for flags, and the grain of each fact tested as a unique key
Unit
Fixed rows for the edges the real history never hits: a session 42 days back counts, one 43 days back does not, and a three-day gap ends a streak
Parity
A dbt Python model runs the original calculator.py on the raw rows, and a singular test compares both scores and the streak for every session
CI
GitHub Actions runs dbt build and checks that the published dashboard data still matches the marts