Conversation
Prettify linter output in case of schema violations in the problem yaml file. Previously, the messages were rather confusing.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #401 +/- ##
===========================================
- Coverage 73.97% 73.80% -0.18%
===========================================
Files 58 58
Lines 6489 6504 +15
Branches 1120 1122 +2
===========================================
Hits 4800 4800
- Misses 1264 1279 +15
Partials 425 425 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| path = list(e.absolute_path) | ||
| path = ( | ||
| path[0] + "".join(f"[{str(p)}]" for p in path[1:]) + ": " | ||
| ) |
There was a problem hiding this comment.
Is path[0] always a string, even if there is a validation error?
This would be enough for me, but fine as is.
| path = list(e.absolute_path) | |
| path = ( | |
| path[0] + "".join(f"[{str(p)}]" for p in path[1:]) + ": " | |
| ) | |
| path = "/".join(map(str, e.absolute_path)) + ": " |
There was a problem hiding this comment.
Is
path[0]always a string, even if there is a validation error?
Hm, if the yaml file is really completely off, it may not be. Will add `str'.
Regarding paths, I prefer the [] notation, which feels more natural to me in the dict/yaml context.
petab/petablint.py
Outdated
| else: | ||
| path = "" |
petab/petablint.py
Outdated
| "Provided YAML file does not adhere to PEtab schema: " | ||
| f"{path}{e.args[0]}" |
There was a problem hiding this comment.
| "Provided YAML file does not adhere to PEtab schema: " | |
| f"{path}{e.args[0]}" | |
| "Provided YAML file does not adhere to PEtab schema. At " | |
| f"{path}{e.args[0]}" |
Prettify linter output in case of schema violations in the problem yaml file. Previously, the messages were rather confusing.
Also fix an error message and a bug in the default schema choice.
Related to #369.