Write unset zero ratings the same way in every parser

Aperta
#94 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Ambito
backend

Direzione di ricerca

Start with src/openapi/branch.jl and read _get_rating, then trace how the line, 2W, 3W and MATPOWER parsers write ratings. Confirm how each represents an unset zero rating and where parser tests cover those cases. Done means one shared helper omits unset rating keys across all four parsers, and _get_rating treats only a missing key as unbounded.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

From review on #91. The current behavior is correct, but it's not clean.

A zero rating means "no limit", and the parsers record that differently: some leave the key out and some keep a zero. _get_rating (src/openapi/branch.jl) handles both by treating a missing key and a zero value as unbounded.

Suggestion: never write the key for an unset rating, through one helper used by the line, 2W, 3W and MATPOWER parsers. _get_rating then only has to treat a missing key as unbounded, and its zero-value fallback can go.

🤖 Generated with Claude Code

Lingua principale
Julia
Stelle
1
Fork
3
Merge medio
4g 8h
PR unite (30g)
11

Preparare l'ambiente

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 Sienna-Platform/PowerFlowFileParser.jl

Tutte le issue di Sienna-Platform/PowerFlowFileParser.jl

Issue simili

Altre issue su Julia

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.