PEtab-dev / PEtab-dev/libpetab-python
Improve error handling in Problem.from_yaml - format_version
Offen
Dieses Issue hat noch niemand übernommen.
validation
- Vorherrschende Sprache
- Python
- Sterne
- 18
- Forks
- 9
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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'
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- data
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100