Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Remodeling Structures #17
Remodeling Structures #17
Changes from 8 commits
8afbd3b
54229c3
54ed9da
ddac6b9
343e723
c73ede4
568ee1f
cd50f2b
29a22bb
3b78116
5f96a72
2ea0cee
8f3ad71
aa5c8ca
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
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.
Here we split the query data into its own class and the base is now a true abstract class. Furthermore,
run_loop
method has been moved out of this class an into a new class calledQueryRunner
which has all the third party communication fields like dune and slack client (i.e. those which are required to run query and alert).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 really like the passing of
QueryData
object here instead of the many arguments. Another cool quote from Clean Code: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.
This change will be apparent in a few places because python type checking does not allow you to set mutable defaults. This means that the
QueryData.params
class has to use an Optional[list] defaulting to None instead of a list defaulting to[]
. The parameters methods expect a list returned and one cannot concatenate None with a list type... this is how we roll.