Add MySQLContainerCheckerMixin - #56
Conversation
TomekFraczek
left a comment
There was a problem hiding this comment.
Looks really good, two changes, that I think theoretically should be causing this to crash?
| import pandas as pd | ||
| from source.checkers.local import FileCheckerMixin | ||
|
|
||
| class MySQLContainerCheckerMixin(FileCheckerMixin): |
There was a problem hiding this comment.
You're not using any of the functions in FileCheckerMixin right? May be easier to just use the BaseChecker
There was a problem hiding this comment.
hmm i think im using the save function from FileChecker - i dont think BaseChecker has one :(
| elif not res.ok: | ||
| return {'to do': [], 'failure': [data]}, | ||
| else: | ||
| return {'to do': [], 'failure': [{'detail': 'unknown error occured'}]} No newline at end of file |
There was a problem hiding this comment.
The save File Checker's save function requires two keys ('filename' and 'type') to be in all log entries.
'to do' are not log entries yet, since they need to be further processed, but the 'failures' are already considered log entries
There was a problem hiding this comment.
addressed this!
TomekFraczek
left a comment
There was a problem hiding this comment.
LGTM
Very nice work Taha
this PR aims to add a checker for dumping data from a mySQL server
new checker:
MySQLContainerCheckerMixin - identical to FileCheckerMixin, except it dumps to the source directory from the db first - it takes params db_url and dump_route to know how to route the request