-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More informative consistency checks #283
Conversation
…f failed radiocarbon dates
…e per-row error messages
…fault message is hard to read and this is slightly better; but it's pretty disgusting to parse a string and reformat it, just because the cassava error type is so shitty :(
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #283 +/- ##
==========================================
- Coverage 68.63% 68.32% -0.31%
==========================================
Files 25 25
Lines 3341 3375 +34
Branches 382 376 -6
==========================================
+ Hits 2293 2306 +13
- Misses 666 693 +27
+ Partials 382 376 -6 ☔ View full report in Codecov by Sentry. |
…error occurs in later tests
…an be brought back based on the janno code if necessary
As indicated above this PR introduces a number of changes to improve the error reporting for broken .janno files. @AyGhal recently contacted me about various error messages she encountered when preparing packages for the PCA. Some of them were not terribly useful. So here's what I did to mitigate this issue:
I also quickly checked |
Wow, OK, I will need some time to review this. Happy to discuss priorities, but I can see how this will be a useful addition! |
@stschiff Just a quick reminder that I'm waiting for a review here 👍 |
On it! Likely not finish today though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, this looks all good to me, more or less. I have left a few comments, perhaps check them and I don't think we have to do much back-and-forth. I will give this an "Approve" flag, since none of my comments I consider critical. Specifically about your three points above:
-
Very good, even if nasty to code, but it's not too bad in terms of code and if it helps I'm all for it. I looked into alternatives to provide better errors, and I think they are all much more complicated (as in recoding
parseNamedRecord
to include custom parsers that don't use theFromField
instance). -
The new consistency decision tree is very nice and easy to review. I couldn't find a glitch, other than a cosmetic comment about a sentence there.
-
The Monad-Stack thing is - in my view and as discussed - unnecessary. I would just log them straight out as they come. There is no need to collect warnings and show as a combined report, as all of this logging happens per line. It would be different if we were to collect stuff through multiple calls of the consistency-check functions across multiple rows or even multiple files. But as long as we're dealing with a single row of a Janno file I would have just logged and thrown straight into PoseidonIO. But on the other hand the more complex solution with Write and ExceptT is still reasonably easy, so I'm OK with this in the end.
... and other ideas to make modifying .janno files less painful with better validation.
Work in progress. Not sure if all of these ideas are useful.