{"id":51043684,"url":"https://github.com/hackyourfuture/data-assignment-week-6","last_synced_at":"2026-06-22T12:02:10.376Z","repository":{"id":362326008,"uuid":"1223590543","full_name":"HackYourFuture/data-assignment-week-6","owner":"HackYourFuture","description":"HackYourFuture data track week 6 assignment files","archived":false,"fork":false,"pushed_at":"2026-06-03T15:24:44.000Z","size":18,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-03T17:12:15.184Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HackYourFuture.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-28T13:18:47.000Z","updated_at":"2026-05-04T13:14:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/HackYourFuture/data-assignment-week-6","commit_stats":null,"previous_names":["hackyourfuture/data-assignment-week-6"],"tags_count":null,"template":true,"template_full_name":"HackYourFuture/assignment-template","purl":"pkg:github/HackYourFuture/data-assignment-week-6","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HackYourFuture%2Fdata-assignment-week-6","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HackYourFuture%2Fdata-assignment-week-6/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HackYourFuture%2Fdata-assignment-week-6/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HackYourFuture%2Fdata-assignment-week-6/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HackYourFuture","download_url":"https://codeload.github.com/HackYourFuture/data-assignment-week-6/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HackYourFuture%2Fdata-assignment-week-6/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34647750,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-22T12:02:07.886Z","updated_at":"2026-06-22T12:02:10.367Z","avatar_url":"https://github.com/HackYourFuture.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Week 6 Assignment: Deploy to Azure\n\nTake the containerised pipeline from Week 5 and ship it to Azure. The pipeline\nwrites raw JSON to Azure Blob Storage and structured rows to Azure Database\nfor PostgreSQL, then runs on a schedule from an Azure Container App Job.\n\nThe full assignment chapter (with all task instructions) lives in your\nHackYourFuture Notion curriculum under Week 6.\n\n## Project structure\n\n```text\ndata-assignment-week-6/\n├── .github/workflows/\n│   └── grade-assignment.yml    Triggers the auto-grader on every PR\n├── .devcontainer/\n│   └── devcontainer.json       Codespaces dev container (Python + Azure CLI)\n├── .hyf/\n│   ├── test.sh                 The auto-grader (run locally with `bash .hyf/test.sh`)\n│   └── grader_lib.sh           Shared helpers used by test.sh\n├── docs/\n│   └── execution_history.png   Task 5: portal screenshot you upload (PNG)\n├── src/\n│   └── pipeline.py             Task 3: blob upload + Postgres upsert\n├── Dockerfile                  Task 4: container image for the job\n├── requirements.txt            Task 2: pinned Python deps\n├── AI_ASSIST.md                Task 7: LLM prompt + your review\n└── README.md                   This file\n```\n\n## Where to start\n\n| Step | File | Task in the chapter |\n|---|---|---|\n| 1 | `requirements.txt` | Pin `azure-storage-blob` and `psycopg2-binary` |\n| 2 | `src/pipeline.py` | Implement `get_config`, `upload_raw_to_blob`, `write_to_postgres` (Tasks 1-3) |\n| 3 | `Dockerfile` | Finish the cache-friendly image (Task 4) |\n| 4 | Azure CLI | Deploy as a Container App Job (Task 4-5) |\n| 5 | `docs/execution_history.png` | Add the Execution-history portal screenshot (Task 5) |\n| 6 | `AI_ASSIST.md` | Fill in your AI prompt + review (Task 7) |\n\n## Open in Codespaces\n\n\u003e Codespaces ships Python 3.11 + the Azure CLI. Sign in with your HackYourFuture\n\u003e Azure account targeting the HYF tenant:\n\n```bash\naz login --use-device-code --tenant 07a14c4e-d88c-42f7-83b3-13af7e57ff3d\n```\n\n## Run the pipeline locally\n\n```bash\npython -m venv .venv \u0026\u0026 source .venv/bin/activate\npip install -r requirements.txt\ncp .env.example .env  # fill in real connection strings, never commit them\nset -a \u0026\u0026 source .env \u0026\u0026 set +a\npython -m src.pipeline\n```\n\n## Verifying your deployment (Task 5)\n\nAfter deploying the Container App Job and triggering a run, capture proof:\n\n1. Open the Azure portal, find your Container App Job, open the **Execution\n   history** blade.\n2. Screenshot the most recent successful run.\n3. Save the screenshot to `docs/`.\n4. Replace this whole section with one called `## Verification` and embed\n   your screenshot using a Markdown image link. The grader looks for the\n   `## Verification` heading and a `![alt](docs/your-file.png)` reference\n   pointing at the image you committed.\n\n## Check your score locally\n\n```bash\nbash .hyf/test.sh\ncat .hyf/score.json\n```\n\nThe grader reports a score out of 100. The passing threshold is 60.\n\n## Scoring ladder\n\n| Points | What the grader checks |\n|---|---|\n| 10 | Required files exist (Dockerfile, requirements.txt, src/pipeline.py, AI_ASSIST.md, docs/) |\n| 10 | requirements.txt pins `azure-storage-blob` and `psycopg2-binary` |\n| 10 | Dockerfile copies requirements before src (cache-friendly layer order) |\n| 15 | Pipeline reads both env vars, wraps the Postgres connection so it is closed cleanly, and silences the Azure SDK logger |\n| 15 | Pipeline uses an idempotent upsert (`ON CONFLICT ... DO UPDATE`) |\n| 10 | Connection string uses the Azure-required SSL flag and the blob SDK client class |\n| 10 | AI_ASSIST.md has all three sections and is filled in (\u003e=1800 chars, no `TODO:`) |\n| 10 | README has a `## Verification` heading and references an image in `docs/` |\n| 10 | `docs/execution_history.png` exists and is non-trivial (real screenshot) |\n\n## Submitting\n\n1. Create a branch: `git switch -c week6/your-name`.\n2. Commit your work.\n3. Push and open a pull request against `main`.\n4. Share the PR URL with your teacher.\n\n## Instructor / maintainer notes\n\nThis repository is built from the canonical Week 6 chapter in the curriculum\nrepo (`Data Track/Week 6/week_6__8_assignment.md`). The auto-grader checks\ncode shape, not live Azure deployment, because the GitHub Actions runner has\nno Azure credentials. To rebuild from a fresh scaffold, follow\n`.agents/workflows/build_assignment_repo.md` in the curriculum repo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackyourfuture%2Fdata-assignment-week-6","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhackyourfuture%2Fdata-assignment-week-6","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackyourfuture%2Fdata-assignment-week-6/lists"}