Skip to content

Build the Week 11 assignment scaffold (Metabase + Streamlit dashboards)#1

Merged
lassebenni merged 4 commits into
mainfrom
build-week11-scaffold
Jul 10, 2026
Merged

Build the Week 11 assignment scaffold (Metabase + Streamlit dashboards)#1
lassebenni merged 4 commits into
mainfrom
build-week11-scaffold

Conversation

@lassebenni

@lassebenni lassebenni commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The repo was still the unbuilt HackYourFuture template (generic task-1/task-2 folders, placeholder README, a test.sh that always scored 0/pass=true). It never matched the curriculum's Week 11 assignment (Build Two Dashboards: Metabase + Streamlit).
  • Rewrote README.md, added AI_ASSIST.md / metric_definitions.template.md templates, and a real .hyf/test.sh static-analysis autograder reusing the shared grader_lib.sh pattern from the Week 10 scaffold.
  • Removed the stale task-1/task-2 placeholder folders.
  • De-duplicated the assignment from the curriculum's worked examples. The curriculum's Metabase/Streamlit chapters already walk students through trip-count-by-pickup-borough, daily-revenue-by-date, avg-tip-%-by-borough, and a borough-filtered KPI panel. Those were also the assignment's suggested content, so a student could pass by recalling the chapter instead of applying the pattern to something new. week11-streamlit/ is now a real ready-to-run starter (project config, run_query helper, and page setup wired up) with the headline-KPIs panel stubbed as raise NotImplementedError(...) for a different trio of metrics: total trips, average trip distance, average fare per mile (using trip_distance and fare_per_mile, columns the chapters never touch). The curriculum's assignment chapter (in the separate hyf-datatrack repo) was updated to match: new Metabase Question angles (payment type, fare-per-mile by dropoff borough, trip duration by hour of day) and new Target-tier panels (hour-of-day trend, payment-type filter).

Test plan

  • Ran .hyf/test.sh against the untouched (but now-realistic) scaffold: scores 35/100, pass=false (the NotImplementedError gate blocks credit for the unfilled KPI panel even though the surrounding scaffolding is real code).
  • Built a complete Minimum-tier submission (new KPI queries against trip_distance/fare_per_mile, filled templates) in a scratch copy and ran .hyf/test.sh: scores 100/100, pass=true (passing threshold is 60).
  • uv sync + python3 -c "import ast; ast.parse(...)" + a live streamlit run --server.headless true boot test on the filled solution: HTTP 200.
  • Live end-to-end check with a real Metabase dashboard + Azure Postgres connection (not possible in CI; flagged in the README as a known autograder limitation).

🤖 Generated with Claude Code

Lasse Benninga and others added 4 commits July 10, 2026 02:41
The repo was still the raw HackYourFuture template: generic task-1/task-2
placeholder folders, a boilerplate README, and a test.sh that always wrote
score 0 with pass=true. It never matched the curriculum's actual Week 11
assignment (Build Two Dashboards).

- README.md: rewritten to explain the two-repo flow (Metabase built directly
  in the HYF instance, Streamlit cloned from nyc-taxi-streamlit-reference's
  chapter-5-start branch and dropped into week11-streamlit/).
- AI_ASSIST.md, metric_definitions.template.md: templates matching the
  assignment's required deliverables.
- week11-streamlit/README.md: placeholder explaining what replaces this folder.
- .hyf/test.sh + .hyf/grader_lib.sh: a real static-analysis autograder
  (required files, secrets hygiene, Streamlit code patterns, metric-definition
  coverage, README/AI log completeness). Verified locally: untouched scaffold
  scores 15/100 (fail), a filled-in chapter-5-solution-based submission scores
  100/100 (pass, passing threshold 60).
- Removed task-1/task-2 placeholder folders.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ples

The Metabase Questions and Streamlit panels the curriculum's chapters
already walk students through (trip count by pickup borough, daily
revenue by date, avg tip % by borough, and the borough-filtered KPI
panel) were also the assignment's suggested content. A student could
pass by recall instead of applying the pattern to a new problem.

- week11-streamlit/ is now a real ready-to-run starter (not a
  clone-and-replace placeholder): pyproject.toml/uv.lock/.env.example
  wired up, app.py has page setup + run_query done, headline-KPIs panel
  stubbed as raise NotImplementedError(...) for total trips / average
  trip distance / average fare per mile (not the total-trips/avg-fare/
  total-revenue trio from Building a Metrics Dashboard).
- .hyf/test.sh: added a NotImplementedError gate and comment-stripped
  grep (pygrep) so the KPI-panel checks can't false-positive on the
  TODO guide comment's own text (which mentions fct_trips).
- metric_definitions.template.md: hint comments point at the new
  Metabase/Streamlit panel angles instead of the old ones.
- README.md: describes the ready-to-run starter instead of the
  clone-nyc-taxi-streamlit-reference-and-replace flow.

Verified locally: untouched scaffold scores 35/100 (fail, NotImplementedError
still present); a filled solution (new KPI queries, uv sync, live
streamlit boot returning HTTP 200) scores 100/100 (pass, threshold 60).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Matches the curriculum-side rename: "Target" and "Stretch" were renamed
to "Required" (expected outcome for most students) and "Extra" (bonus,
not scored). Also fixed the metric_definitions.template.md hint comment,
which still said the Metabase date filter was part of the required work
after it moved to Extra-tier bonus credit.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The assignment now has two tiers (Required / Extra), not three. Fixed
the remaining "Minimum" wording in README.md and .hyf/test.sh's log
messages to match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@lassebenni lassebenni merged commit fad4ef3 into main Jul 10, 2026
@lassebenni lassebenni deleted the build-week11-scaffold branch July 10, 2026 06:00
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