Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Blank credits pass validation but cause valid grade records to disappear

オープン
#53 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@vivek-3728 がすでに取り組んでいます。

2026年10月20日 から。

評価

この issue はまだ評価されていません。

説明

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.

主要言語
Python
スター
0
フォーク
5
平均マージ
1日 15時間
マージ済み PR(30日)
27

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

techcsispit/grade-tracker のほかの issue

techcsispit/grade-tracker の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。