Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Blank credits pass validation but cause valid grade records to disappear

Aperta
#53 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@vivek-3728 ci sta già lavorando.

Dal 20/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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.

Lingua principale
Python
Stelle
0
Fork
5
Merge medio
1g 15h
PR unite (30g)
27

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di techcsispit/grade-tracker

Tutte le issue di techcsispit/grade-tracker

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.