-
Notifications
You must be signed in to change notification settings - Fork 301
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
Meaningful exception when loading/creating dataset for non-existing run id #1328
Meaningful exception when loading/creating dataset for non-existing run id #1328
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1328 +/- ##
==========================================
+ Coverage 72.51% 72.53% +0.01%
==========================================
Files 74 74
Lines 8564 8570 +6
==========================================
+ Hits 6210 6216 +6
Misses 2354 2354 |
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.
Looks good to me, codacy seems to be confused about valid syntax for line continuation
…tter_exception' into feature/load_by_id_bad_run_id_better_exception
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.
I'll leave it up to you whether to make codacy happy. We can merge this now.
Currently when one uses
load_by_id
for non-existingrun_id
, the exception looks like"Expected one row"
. This PR fixes it with:run_exists
method tosqlite_base
run_exists
inDataSet
constructor and raise exception with clear message if therun_id
does not existNote that the used query seems to be quite fast according to this stackoverflow discussion.