PEtab-dev / PEtab-dev/libpetab-python
Improve error handling in Problem.from_yaml - format_version
Aperta
Nessuno ha ancora preso questa issue.
validation
- Lingua principale
- Python
- Stelle
- 18
- Fork
- 9
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Missing format_version in the yaml file should provide a proper error message instead of just KeyError:
--> 250 if yaml_config[FORMAT_VERSION] not in {"1", 1, "1.0.0", "2.0.0"}:
251 raise ValueError("Provided PEtab files are of unsupported version "
252 f"{yaml_config[FORMAT_VERSION]}. Expected "
253 f"{format_version.__format_version__}.")
254 if yaml_config[FORMAT_VERSION] == "2.0.0":
KeyError: 'format_version'
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Start at the Problem.from_yaml entry point and reproduce the failure with a YAML file missing format_version. Trace the existing version validation and error handling, then make the missing field produce a proper error instead of KeyError; done means the reported case has a clear error and the relevant checks pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- data
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100