feat: scaffold Week 6 assignment (Deploy to Azure)#1
Merged
Conversation
Replaces the empty template stubs with a real scaffold derived from `Data Track/Week 6/week_6__8_assignment.md`. Students implement a Container App Job pipeline that uploads raw JSON to Azure Blob Storage and upserts rows into Azure Database for PostgreSQL. Layout - `src/pipeline.py`: `raise NotImplementedError` stubs for the three pipeline functions (config, blob upload, Postgres upsert) plus a `run()` orchestrator. - `Dockerfile`: cache-friendly starter with TODO comments for the layer order students must complete. - `requirements.txt`: TODO entries for `azure-storage-blob` and `psycopg2-binary` pins. - `AI_ASSIST.md`: section headers + TODO placeholders for Task 7. - `.env.example`: connection-string template with placeholders only. - `docs/`: target folder for the Task 5 Execution-history screenshot. Autograder (`.hyf/test.sh`) Static-analysis only. Azure deployment is unverifiable in CI (no credentials), so the grader checks code shape, not live deployment: required files, pinned deps, Dockerfile layer order, env-var reads, `contextlib.closing()`, azure SDK logger silencing, `ON CONFLICT ... DO UPDATE` upsert with `%s` placeholders, `sslmode=require`, `BlobServiceClient` import, AI report fill-in, README `## Verification` heading + embedded `docs/` image, screenshot presence. Verified locally - Bare scaffold: 13/100, pass=false. - Working solution (clone at `~/Documents/github/hyf/data-assignment-week-6-test`): 100/100, pass=true. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Scaffolds the Week 6 “Deploy to Azure” assignment repository, including a starter pipeline module plus an autograder that performs static checks (no live Azure access) for expected implementation patterns and deliverables.
Changes:
- Added Week 6 starter files:
src/pipeline.pystubs,Dockerfile,requirements.txt,.env.example,AI_ASSIST.md, and docs placeholder. - Replaced placeholder README with Week 6-specific instructions and local-grading guidance.
- Implemented a points-based autograder in
.hyf/test.shwith shared helpers in.hyf/grader_lib.sh.
Reviewed changes
Copilot reviewed 9 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/pipeline.py |
Adds the scaffold pipeline with NotImplemented stubs and logging setup. |
src/__init__.py |
Marks src/ as a package for python -m src.pipeline. |
requirements.txt |
Scaffold for pinned deps students must fill in. |
Dockerfile |
Scaffold for a cache-friendly container image students must complete. |
README.md |
Assignment overview + steps + local grading + verification instructions. |
AI_ASSIST.md |
Template for the required AI usage report. |
.env.example |
Template for required env vars (Postgres + Blob connection strings). |
docs/.gitkeep |
Keeps docs/ tracked for the required screenshot deliverable. |
.gitignore |
Simplifies ignore rules for Python + secrets + grader output. |
.devcontainer/devcontainer.json |
Codespaces/devcontainer baseline with Azure CLI + Docker-in-Docker. |
.hyf/test.sh |
New autograder script implementing the scoring ladder. |
.hyf/grader_lib.sh |
Shared helper functions used by the autograder. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Level 2 psycopg2 pin check no longer accepts bare `psycopg2==...`. The python:3.11-slim base image lacks libpq-dev and gcc, so the source dist fails to build; accepting it gave students credit for a requirements.txt that immediately broke `docker build`. - Level 4a env-var check no longer counts matching lines. Two independent `grep -q` calls accept any valid read pattern (separate lines, one-line tuple read, dict comprehension), so the grader stops false-failing correct submissions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
task-1/task-2placeholder stubs with a real scaffold derived fromData Track/Week 6/week_6__8_assignment.md.Why static analysis (no live Azure check)
The Week 6 assignment requires live Azure resources (Storage Account, Postgres flexible server, ACR, Container Apps environment) that the GitHub Actions runner cannot reach without credentials. The grader therefore verifies code shape, not deployment success: the patterns Chapters 3-5 teach (env-var reads,
contextlib.closing(), theON CONFLICT ... DO UPDATEupsert,sslmode=require,BlobServiceClientusage, the azure SDK logger silencing) plus the artefact deliverables (AI report, Execution-history screenshot, README Verification section).Scoring ladder (100 pts total, passing 60)
azure-storage-blobANDpsycopg2-binary(5 pts each)closing()(5), silences azure logger (5)ON CONFLICT ... DO UPDATE(10) and%splaceholders insideexecute(...)(5)sslmode=require(5) and pipeline importsBlobServiceClient(5)## Verificationheading AND embeds an image fromdocs/(all-or-nothing)docs/execution_history.{png,jpg,jpeg}exists and is > 5000 bytes (PNG full, JPG half)Test plan
~/Documents/github/hyf/data-assignment-week-6-test: 100/100, pass=trueos.environ[...],from contextlib import closing,with closing(,logging.getLogger("azure").setLevel,ON CONFLICT,DO UPDATE,%sin multi-lineexecute(...),sslmode=require,BlobServiceClientBuild workflow followed:
.agents/workflows/build_assignment_repo.md.🤖 Generated with Claude Code