-
Notifications
You must be signed in to change notification settings - Fork 87
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
Add DataCheckActionOption
class
#3134
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3134 +/- ##
=======================================
+ Coverage 99.7% 99.7% +0.1%
=======================================
Files 322 324 +2
Lines 31101 31233 +132
=======================================
+ Hits 30996 31128 +132
Misses 105 105
Continue to review full report at Codecov.
|
…x/evalml into 3116_add_data_check_action_option
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.
LGTM, just some comments. Looked through all the tests and they cover all the test cases I could imagine and with the patch coverage being 100%, this should be good!
@@ -31,7 +31,11 @@ def __eq__(self, other): | |||
Returns: | |||
bool: True if the other object is considered an equivalent data check action, False otherwise. | |||
""" | |||
return self.action_code == other.action_code and self.metadata == other.metadata | |||
attributes_to_check = ["action_code", "data_check_name", "metadata"] |
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.
any new cases we should add to test_data_check_action_equality
or test_data_check_action_inequality
?
def __init__(self, action_code, data_check_name, parameters=None, metadata=None): | ||
self.action_code = action_code | ||
self.data_check_name = data_check_name | ||
self.parameters = parameters |
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.
Might be useful to leave the structure required for what a parameter looks like (esp since there's so much validation going on)
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.
Agreed, I think it'd be useful to show an example of an initialized DataCheckActionOption
object with valid parameters
|
||
|
||
def test_data_check_action_option_equality(dummy_data_check_name): | ||
data_check_action_option = DataCheckActionOption( |
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 think the equality or inequality tests cover every case but it would be nice to double check since code coverage won't catch the cases because of how the loop is written!
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.
Great test coverage! Left a few questions for myself and nitpicky suggestions that might be helpful for this
def __init__(self, action_code, data_check_name, parameters=None, metadata=None): | ||
self.action_code = action_code | ||
self.data_check_name = data_check_name | ||
self.parameters = parameters |
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.
Agreed, I think it'd be useful to show an example of an initialized DataCheckActionOption
object with valid parameters
Part of #3116