Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Blank credits pass validation but cause valid grade records to disappear

Đang mở
#53 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

@vivek-3728 đang làm issue này rồi.

Từ ngày 20/10/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

bug good first 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:

  • validate reported that the CSV was valid.
  • list showed no grades.
  • summary S1 reported 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.

Ngôn ngữ chính
Python
Star
0
Fork
5
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
27

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của techcsispit/grade-tracker

Tất cả issue của techcsispit/grade-tracker

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.