Skip to content

feat: scaffold Week 5 assignment — Containerize and Ship#1

Open
lassebenni wants to merge 6 commits into
mainfrom
feat/scaffold-week5-assignment
Open

feat: scaffold Week 5 assignment — Containerize and Ship#1
lassebenni wants to merge 6 commits into
mainfrom
feat/scaffold-week5-assignment

Conversation

@lassebenni
Copy link
Copy Markdown
Collaborator

Summary

  • Students containerize their Week 3 or Week 4 pipeline: write a cache-friendly Dockerfile, pin dependencies, build a CI workflow (ruff + pytest + docker build), and push to Azure Container Registry.
  • Autograder verified end-to-end: solution scores 75/75 (pass), scaffold scores 10/75 (fail).

Scoring ladder

Score Gate
10/75 Dockerfile has correct base image (python:3.11-slim)
0+10/75 requirements.txt has pinned versions
0+25/75 Dockerfile: requirements copied before source + CMD present
0+25/75 ci.yml: ruff lint + pytest + docker build steps present
0+15/75 AI_ASSIST.md: 3 sections filled with ≥500 characters
+25 Task 6 (ACR push): teacher verifies Azure Portal screenshot

Passing threshold: 60/100.

Test plan

  • Scaffold: 10/75, pass=false
  • Solution: 75/75, pass=true
  • Dockerfile layer order: requirements copied before source confirmed by grader
  • Code patterns: grep for ruff, pytest, docker build in ci.yml; == in requirements.txt; python:3.11-slim + CMD in Dockerfile
  • AI report: 3-section + 500-char threshold; template is 249 chars (below threshold)

🤖 Generated with Claude Code

Replace the stub test.sh (always-pass, score 0) with a 7-level static
analysis grader. Scaffold code has NotImplementedError stubs and TODO
placeholders that score 27/100 (fail); a complete solution scores 100/100.

Grader levels:
  1 (15 pts) - required files present
  2 (15 pts) - Dockerfile layer order and base image
  3 (15 pts) - pinned dependencies
  4 (20 pts) - CI triggers, ruff, pytest, docker build
  5 (15 pts) - env-var config, no NotImplementedError
  6 (10 pts) - ACR screenshot present and non-trivial
  7 (10 pts) - AI_ASSIST.md filled in, no TODO placeholders

Also adds: student README, devcontainer.json (Docker + Azure CLI),
src/pipeline.py starter, tests/test_pipeline.py, Dockerfile stub,
requirements.txt stub, ci.yml stub, AI_ASSIST.md template.
@lassebenni lassebenni force-pushed the feat/scaffold-week5-assignment branch from f731f85 to 0fa017b Compare May 22, 2026 10:21
Lasse Benninga and others added 4 commits May 22, 2026 13:13
Adds warn() helper to the autograder and a zero-point .gitignore check
that flags missing __pycache__/, *.pyc, and .env entries with a clear
message explaining why each matters.

Also adds Python-specific entries to the scaffold .gitignore (the
inherited template was Node.js only).
Replaces the inline pass/fail/warn helpers with a source of grader_lib.sh.
Adds check_no_print_statements and check_gitignore_python from the lib.
Scoring ladder and output unchanged (27/100 scaffold, 100/100 solution).
Task 3 (Write Tests) is now an assignment task, so the autograder
checks it: at least 2 test functions in tests/test_pipeline.py, no
NotImplementedError stubs.

Level breakdown (total 100 pts, passing 60):
  L1 required files      15 pts  (unchanged)
  L2 Dockerfile          15 pts  (unchanged)
  L3 unit tests          10 pts  (new)
  L4 pinned deps         10 pts  (was 15)
  L5 CI workflow         20 pts  (unchanged)
  L6 env-var config      15 pts  (unchanged)
  L7 ACR screenshot      10 pts  (unchanged)
  L8 AI report            5 pts  (was 10)

Also fix error message in L7: "Task 6 deliverable" → "Task 7 deliverable"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR scaffolds the Week 5 “Containerize and Ship” assignment by adding a starter Python pipeline, tests, container/CI templates, and an autograder script to evaluate student submissions.

Changes:

  • Added starter pipeline (src/pipeline.py) + pytest suite (tests/test_pipeline.py) for students to implement.
  • Added assignment scaffolding files: Dockerfile template, CI workflow template, pinned-deps template, and AI usage report template.
  • Added/updated HYF autograder scripts and repo ergonomics (.gitignore, devcontainer, README).

Reviewed changes

Copilot reviewed 9 out of 14 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/pipeline.py Pipeline skeleton with TODO stubs for students (env-var config + IO).
tests/test_pipeline.py Starter unit tests defining required behavior for the pipeline functions.
Dockerfile Cache-friendly Dockerfile template with TODO placeholders.
.github/workflows/ci.yml CI workflow template with TODO steps for ruff/pytest/docker build.
requirements.txt Pinned dependency template (students fill in).
README.md Updated assignment instructions and run steps.
AI_ASSIST.md Template for students’ AI usage report.
.hyf/test.sh Autograder scoring script for scaffold/solution verification.
.hyf/grader_lib.sh Shared autograder helper functions for static checks and scoring output.
.gitignore Added Python ignores (venv, caches, output dir) for student projects.
.devcontainer/devcontainer.json Codespaces/devcontainer setup with Docker-in-Docker + Azure CLI.
assets/.gitkeep Keeps assets/ tracked for screenshot deliverable.
src/__init__.py Marks src as a package for imports.
tests/__init__.py Marks tests as a package (import/test discovery consistency).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_pipeline.py Outdated
Comment thread .hyf/test.sh Outdated
Comment thread .hyf/test.sh
Comment thread .hyf/test.sh
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.

2 participants