Skip to content

Mohamad Bader AA#12

Open
noneeeed wants to merge 19 commits into
HackYourAssignment:mainfrom
noneeeed:week5-attempt
Open

Mohamad Bader AA#12
noneeeed wants to merge 19 commits into
HackYourAssignment:mainfrom
noneeeed:week5-attempt

Conversation

@noneeeed

@noneeeed noneeeed commented Jun 3, 2026

Copy link
Copy Markdown

No description provided.

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

Image pushed to ACR

hyfregistry.azurecr.io/noneeeed-pipeline:5fd44445b109c70624544195887bf8c8998cec52

Browse the registry in the Azure Portal: https://portal.azure.com/#@hackyourfuture.nl/resource/subscriptions/1120c89d-2a5f-4a15-a582-2ea34f0bb5c3/resourceGroups/rg-hyf-data/providers/Microsoft.ContainerRegistry/registries/hyfregistry/repository

Task 7 verification: your Dockerfile built and pushed cleanly from commit 5fd4444.

Resolves conflict in .github/workflows/ci.yml header by keeping the
explanatory note from main. Also adds the if-guard to Azure/ACR steps
so CI stays green on fork PRs (the central Grade ACR push workflow on
main does the actual push).
@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

Image pushed to ACR

hyfregistry.azurecr.io/noneeeed-pipeline:dd75307f56eaed404afc8687233337254859a0ed

Browse the registry in the Azure Portal: https://portal.azure.com/#@hackyourfuture.nl/resource/subscriptions/1120c89d-2a5f-4a15-a582-2ea34f0bb5c3/resourceGroups/rg-hyf-data/providers/Microsoft.ContainerRegistry/registries/hyfregistry/repository

Task 7 verification: your Dockerfile built and pushed cleanly from commit dd75307.

@github-actions

Copy link
Copy Markdown

📝 HackYourFuture auto grade

Assignment Score: 93 / 100 ✅

Status: ✅ Passed
Minimum score to pass: 60
🧪 The auto grade is experimental and still being improved

Test Details

=== Week 5 Autograder ===
  PASS: Level 1: required files (15/15 pts)
  PASS: Dockerfile uses python:3.11-slim base image
  PASS: Dockerfile copies requirements before source (cache-friendly)
  PASS: Dockerfile has a CMD instruction
  PASS: Level 2: Dockerfile (15/15 pts)
  PASS: tests/test_pipeline.py has 13 test functions (≥2 required)
  PASS: tests/test_pipeline.py has no NotImplementedError stubs remaining
  PASS: Level 3: unit tests (10/10 pts)
  PASS: requirements.txt has 9 pinned package(s)
  PASS: requirements.txt pins satisfied (no uv.lock needed)
  PASS: Level 4: pinned dependencies (10/10 pts)
  PASS: ci.yml triggers on pull_request
  PASS: ci.yml triggers on push to main
  PASS: ci.yml runs ruff check (lint)
  PASS: ci.yml runs ruff format (format check)
  PASS: ci.yml runs pytest
  PASS: ci.yml runs docker build
  PASS: Level 5: CI workflow (20/20 pts)
  PASS: pipeline.py reads config from os.environ/os.getenv
  FAIL: pipeline.py still contains NotImplementedError
  PASS: Level 6: env-var config (10/15 pts)
  PASS: assets/acr_push_week5.png present and non-trivial (95444 bytes)
  PASS: Level 7: ACR screenshot (10/10 pts)
  PASS: AI_ASSIST.md has all three required sections
  FAIL: AI_ASSIST.md still contains TODO placeholders or is too short (19812 chars)
  PASS: Level 8: AI report (3/5 pts)
  PASS: .gitignore correctly excludes __pycache__/, *.pyc, and .env

Score: 93 / 100  (passing: 60)  pass=true

@github-actions

Copy link
Copy Markdown

Image pushed to ACR

hyfregistry.azurecr.io/noneeeed-pipeline:c2ebea78a0835abd83a49d1ef966402a0e294366

Browse the registry in the Azure Portal: https://portal.azure.com/#@hackyourfuture.nl/resource/subscriptions/1120c89d-2a5f-4a15-a582-2ea34f0bb5c3/resourceGroups/rg-hyf-data/providers/Microsoft.ContainerRegistry/registries/hyfregistry/repository

Task 7 verification: your Dockerfile built and pushed cleanly from commit c2ebea7.

Comment thread AI_ASSIST.md

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AI_ASSIST is supposed to look like a structured reflection, not a log dump.

  1. Add your actual question(s) to the LLM, in your words
    e.g. "How do I pass Azure credentials into a Docker container for DefaultAzureCredential?"

  2. The code or suggestion it returned (you can summarise it)

  3. What was changed after reviewing it and document what you tried, what worked, what didn't, what you still don't understand

Comment thread Dockerfile
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY src/ ./src/
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Line 6 runs curl before curl is installed. python:3.11-slim doesn't include curl, and curl comes with line 7–8 via apt-get.

Fix the order:

  1. RUN apt-get update && apt-get install -y curl ca-certificates && rm -rf /var/lib/apt/lists/*
  2. Then install Azure CLI once
  3. RUN pip install --no-cache-dir -r requirements.txt

Always verify locally:
docker build -t test .
docker run --rm -e API_KEY=test -e GITHUB_USERNAME=noneeeed test

Comment thread Dockerfile
CMD ["TODO"]
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY src/ ./src/

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The image only copies src/, not data/.

Your run() calls download_inputs(DATA_DIR) which needs either:

  • AZURE_STORAGE_CONNECTION_STRING
  • COPY data/ ./data/ if you bundle local CSVs for offline runs

Right now docker run will fail at the download step unless you pass secrets. Document which approach you chose in AI_ASSIST.md and the PR description.

Comment thread src/ingest.py
logger.info("Script finished.")


def upload_outputs(output_dir: Path, github_username: str) -> None:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

can be removed if not implemented

Comment thread src/ingest.py
logger.info("Initializing Azure credentials...")
# credential = DefaultAzureCredential()
# service = BlobServiceClient(account_url=ACCOUNT_URL, credential=credential)
conn = os.environ.get("AZURE_STORAGE_CONNECTION_STRING")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If AZURE_STORAGE_CONNECTION_STRING is missing, raise a clear RuntimeError

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