Baraah A.#5
Conversation
📝 HackYourFuture auto gradeAssignment Score: 85 / 100 ✅Status: ✅ Passed Test Details |
|
Good effort! I can see you did the Azure work: azure_task.py correctly calls the ARM API with a Bearer token and writes the JSON file. Your comparison sections in azure_compare.md are also started. What's missing:
|
| """ | ||
| # TODO: implement CSV reading and normalization | ||
| raise NotImplementedError | ||
| def read_csv_records(path: Path) -> list[dict]: |
There was a problem hiding this comment.
read_csv_records is defined twice (lines 30 and 42). Remove this.
| with open("data/weather_stations.csv", newline="") as f: | ||
| reader = csv.DictReader(f) | ||
| for i, row in enumerate(reader): | ||
| if i <3: | ||
| pass |
There was a problem hiding this comment.
This is leftover test code. Delete it — code at module level (outside if name == "main") runs on import, including when pipeline.py loads this module.
| raise NotImplementedError | ||
| attempt =0 | ||
|
|
||
| while attempt <= max_retries: |
There was a problem hiding this comment.
Consider for attempt in range(max_retries) to match the spec exactly
| if 400 <= response.status_code < 500: | ||
| logger.error(f"Client error {response.status_code}: {response.text}") | ||
| return None |
There was a problem hiding this comment.
The assignment says fail immediately on 4xx. Returning None makes fetch_api_records() silently return [], which looks like "no data" instead of "bad request." Use response.raise_for_status() for 4xx errors.
No description provided.