From 9c49e06e2365dab6b11f672826d311ed6751dca6 Mon Sep 17 00:00:00 2001 From: Lasse Benninga Date: Mon, 1 Jun 2026 17:23:17 +0200 Subject: [PATCH] Fix dead instructions link, align task numbers to the 8-task chapter, scope az login to HYF tenant - README: the "full assignment instructions" link pointed at hackyourfuture.github.io/datatrack/week-5/assignment, which 404s. Repoint it to the Week 5 assignment page in the Notion curriculum. - Renumber tasks to match the assignment chapter (8 tasks): add Task 3 (the provided test suite), so Dockerfile=4, Configuration=5, CI=6, ACR push=7, AI report=8. Updates README, ci.yml, Dockerfile, AI_ASSIST.md, pipeline.py, and the grader's deliverable message. - README: az login now targets the HackYourFuture tenant (--tenant 07a14c4e-...), preventing the "wrong tenant" failure for students who also have a personal/other-org Azure account. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/ci.yml | 2 +- .hyf/test.sh | 2 +- AI_ASSIST.md | 2 +- Dockerfile | 2 +- README.md | 37 ++++++++++++++++++++++--------------- src/pipeline.py | 4 ++-- 6 files changed, 28 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 229eedf..0e91465 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -# Task 5: Build a CI workflow that runs on pull requests and pushes to main. +# Task 6: Build a CI workflow that runs on pull requests and pushes to main. # # See the assignment chapter for the required steps and commands. # Fill in the TODO values below. diff --git a/.hyf/test.sh b/.hyf/test.sh index 0c4cac4..a050e2f 100755 --- a/.hyf/test.sh +++ b/.hyf/test.sh @@ -149,7 +149,7 @@ if [[ -f "$screenshot" ]]; then fail "assets/acr_push_week5.png exists but looks empty (${size} bytes)" fi else - fail "assets/acr_push_week5.png missing (Task 6 deliverable)" + fail "assets/acr_push_week5.png missing (Task 7 deliverable)" fi ((score += l7)) pass "Level 7: ACR screenshot ($l7/10 pts)" diff --git a/AI_ASSIST.md b/AI_ASSIST.md index 22fefa8..70463b0 100644 --- a/AI_ASSIST.md +++ b/AI_ASSIST.md @@ -1,6 +1,6 @@ # AI Assist Report -> Task 7: Fill in all three sections below. Your reflection should be specific — +> Task 8: Fill in all three sections below. Your reflection should be specific — > describe exactly what you asked, what the AI returned, and what you changed. > "The AI fixed it" is not enough detail. diff --git a/Dockerfile b/Dockerfile index 357c108..d665b11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# Task 3: Write a cache-friendly Dockerfile. +# Task 4: Write a cache-friendly Dockerfile. # # Requirements (in order): # 1. Use python:3.11-slim as the base image. diff --git a/README.md b/README.md index e9c9285..ab02148 100644 --- a/README.md +++ b/README.md @@ -8,33 +8,40 @@ You have a Python pipeline. Your job is to make it reproducible, containerized, week5-container-assignment/ ├── .github/ │ └── workflows/ -│ └── ci.yml ← Task 5: CI workflow (fill in the TODO steps) +│ └── ci.yml ← Task 6: CI workflow (fill in the TODO steps) ├── src/ -│ └── pipeline.py ← Task 1 & 4: pipeline logic and env-var config +│ └── pipeline.py ← Task 1 & 5: pipeline logic and env-var config ├── tests/ -│ └── test_pipeline.py ← tests that must pass before you touch the Dockerfile -├── Dockerfile ← Task 3: write a cache-friendly Dockerfile +│ └── test_pipeline.py ← Task 3: provided tests; make them pass +├── Dockerfile ← Task 4: write a cache-friendly Dockerfile ├── requirements.txt ← Task 2: pin all dependencies -└── AI_ASSIST.md ← Task 7: document your LLM usage +└── AI_ASSIST.md ← Task 8: document your LLM usage ``` ## Open in Codespaces > 💻 [Open in GitHub Codespaces](https://github.com/codespaces/new/HackYourFuture/data-assignment-week-5) -Docker and the Azure CLI are pre-installed. Run `az login --use-device-code` before Task 6. +Docker and the Azure CLI are pre-installed. Before Task 7, sign in with your **HackYourFuture** account (not a personal Azure account), targeting the HackYourFuture tenant: + +```bash +az login --use-device-code --tenant 07a14c4e-d88c-42f7-83b3-13af7e57ff3d +``` ## Tasks at a glance +> These task numbers match the Week 5 assignment chapter in your HackYourFuture Notion curriculum. + | Task | What you do | |---|---| -| 1: Choose a Pipeline | The starter `src/pipeline.py` has three functions with `raise NotImplementedError`. Implement them so the tests pass. | -| 2: Pin Dependencies | Fill in `requirements.txt` with pinned versions (`package==version`). | -| 3: Dockerfile | Complete the `Dockerfile` following the TODO comments. | -| 4: Configuration | `get_config()` must read `API_KEY` from the environment and raise a clear error if it is missing. | -| 5: CI Workflow | Replace the `echo "TODO"` steps in `ci.yml` with real commands. | -| 6: Push to ACR | Add Azure login + ACR push steps to your workflow; screenshot the result. | -| 7: AI Report | Fill in `AI_ASSIST.md` with your LLM prompt, the suggestion, and what you changed. | +| 1: Choose a Pipeline | The starter `src/pipeline.py` has three functions with `raise NotImplementedError`. Implement them so the provided tests pass. | +| 2: Define Dependencies | Fill in `requirements.txt` with pinned versions (`package==version`). | +| 3: Write Tests | The starter ships a full test suite in `tests/test_pipeline.py`. Make your Task 1 implementation pass it: `API_KEY=test pytest -q`. | +| 4: Write a Dockerfile | Complete the `Dockerfile` following the TODO comments. | +| 5: Add Configuration | `get_config()` must read `API_KEY` from the environment and raise a clear error if it is missing. | +| 6: Build a CI Workflow | Replace the `echo "TODO"` steps in `ci.yml` with real commands. | +| 7: Push to ACR | Add Azure login + ACR push steps to your workflow; screenshot the result. | +| 8: AI Report | Fill in `AI_ASSIST.md` with your LLM prompt, the suggestion, and what you changed. | ## How to run locally @@ -44,7 +51,7 @@ pip install -r requirements.txt API_KEY=test pytest -q ``` -## How to run in Docker (after completing Task 3) +## How to run in Docker (after completing Task 4) ```bash docker build -t my-pipeline:1.0 . @@ -58,4 +65,4 @@ docker run --rm -e API_KEY=test my-pipeline:1.0 3. Push and open a Pull Request against `main`. 4. Share the PR URL with your teacher. -See the [full assignment instructions](https://hackyourfuture.github.io/datatrack/week-5/assignment) for Task 6 (ACR push) and the grading rubric. +See the [full assignment instructions](https://www.notion.so/hackyourfuture/Assignment-Containerize-and-Ship-2af50f64ffc9819ab20cde5165c0069e) in your HackYourFuture Notion curriculum for the Task 7 (ACR push) steps. diff --git a/src/pipeline.py b/src/pipeline.py index 84e8087..1cd17a4 100644 --- a/src/pipeline.py +++ b/src/pipeline.py @@ -3,7 +3,7 @@ Tasks: - Task 1: confirm this script runs locally before touching the Dockerfile. -- Task 4: read all configuration from environment variables (no hardcoded values). +- Task 5: read all configuration from environment variables (no hardcoded values). Replace every `raise NotImplementedError` below with a real implementation. """ @@ -24,7 +24,7 @@ def get_config() -> dict: Raise RuntimeError with a clear message if a required variable is missing. """ - raise NotImplementedError("Task 4: read API_KEY and OUTPUT_DIR from the environment") + raise NotImplementedError("Task 5: read API_KEY and OUTPUT_DIR from the environment") def fetch_data(api_key: str) -> list[dict]: