Currently, language breakdowns from the GitHub API are returned as a raw dictionary (e.g., {"Python": 12345, "JavaScript": 6789}). We need a utility module (skills_tracker/language_parser.py) that normalizes these into percentages and handles edge cases like missing or null language data. This will make it easier to generate consistent reports and charts. Acceptance criteria: (1) function normalize_languages(raw_dict) returns {"Python": 0.65, "JavaScript": 0.35}, (2) raises ValueError for empty input, (3) includes unit tests with pytest (4 files minimum), (4) adds type hints and a docstring.
Currently, language breakdowns from the GitHub API are returned as a raw dictionary (e.g.,
{"Python": 12345, "JavaScript": 6789}). We need a utility module (skills_tracker/language_parser.py) that normalizes these into percentages and handles edge cases like missing or null language data. This will make it easier to generate consistent reports and charts. Acceptance criteria: (1) functionnormalize_languages(raw_dict)returns{"Python": 0.65, "JavaScript": 0.35}, (2) raisesValueErrorfor empty input, (3) includes unit tests with pytest (4 files minimum), (4) adds type hints and a docstring.