Blank credits pass validation but cause valid grade records to disappear
维护者通常 2 天内回复
@vivek-3728 已经在做这个了。
开始于 2026年10月20日。
评估
这个 Issue 还没有评估数据。
描述
I noticed that the grade tracker accepts blank credits during validation but silently skips the same records when loading them for other commands.
For example, I created a CSV containing:
student_id,subject,score,max_score,date,credits,semester
S1,Mathematics,95,100,2026-10-06,,1
Then I ran:
python -m grade_tracker validate
python -m grade_tracker list
python -m grade_tracker summary S1
The results were inconsistent:
validatereported that the CSV was valid.listshowed no grades.summary S1reported no records for the student.- JSON output commands failed while converting the blank credits value.
I expected all commands to treat blank credits as the documented default of 3.0, so the Mathematics assessment would appear normally in listings, summaries, GPA calculations, and exports.
Looking through the code, the validator explicitly replaces blank credits with "3.0". However, the normal loader uses:
float(row.get("credits", 3.0))
Since the credits field exists but contains an empty string, dict.get() returns "" instead of the default. This causes float("") to fail, and the loader silently skips the record.
This means a CSV can pass validation while valid assessments disappear from calculations and reports without any warning.
I expected validation and all data-loading commands to apply the same default-credit rules consistently, rather than interpreting the same CSV differently.
- 主要语言
- Python
- 星标
- 0
- 派生
- 5
- 平均合并
- 1 天 15 小时
- 30 天内合并 PR
- 27
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
techcsispit/grade-tracker 的其他 Issue
-
add accepts Infinity scores and writes records that immediately fail validation可能已有人在做 @vivek-3728 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
techcsispit/grade-tracker#69 · 1 条评论 ·
维护者通常 2 天内回复
-
feat: add cross-file integrity verification and repair可能已有人在做 @deepmhatre13 于 1 天前认领。 未关闭feature
难度 5/5 一周以上 新手友好度 35/100
techcsispit/grade-tracker#66 ·
维护者通常 2 天内回复
查看 techcsispit/grade-tracker 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
pytest-dev/pytest-html#1085 ·
-
难度 2/5 1-3 小时 新手友好度 90/100
pollen-robotics/reachy_mini#1527 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 66/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复