Conversation
This comment has been minimized.
This comment has been minimized.
|
task-1/src/pycache/utils.cpython-311.pyc and pycache/ should not be in git. You can edit the .gitignore to remove such files from committing. |
| import logging | ||
| from pathlib import Path | ||
|
|
||
| from utils import clean_department, clean_email, clean_name, clean_salary |
There was a problem hiding this comment.
Please undo this change as the grader runs this, and .utils does not work here as you're not importing a module from a package
| import logging | ||
| from pathlib import Path | ||
|
|
||
| logging.basicConfig(level=logging.INFO) |
There was a problem hiding this comment.
The assignment keeps logging in cleaner.py. utils.py should stay simple helpers, so please remove logging setup from here and keep warnings only in clean_row in cleaner.py
| raise NotImplementedError("Implement clean_name (Task 1)") | ||
| name = raw.strip() | ||
| if name == "": | ||
| logging.warning("skipping row with empty name") |
There was a problem hiding this comment.
The message says "skipping row", but this function only returns "". Skipping is done in cleaner.py, so better to remove the log here
| salary = raw.strip().replace(",", "").replace(".", "") | ||
| if salary in ("", "N/A"): | ||
| return None | ||
| return int(salary) |
There was a problem hiding this comment.
Please wrap this in try / except ValueError and return None if parsing fails, so one bad salary does not stop the whole script
|
Can fully grade this after fixes are made to run the workflow successfully again |
📝 HackYourFuture auto gradeAssignment Score: 100 / 100 ✅Status: ✅ Passed Test Details |
|
I would grade this 75/100. For future reference, please switch skip/status messages back to logging.warning / logging.info (not print), and fix the %s lines so values actually show up. Keep utils.py free of logging; instead handle skip warnings in clean_row. And remove pycache from git. |
No description provided.