Skip to content
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

Merged
merged 20 commits into from
Dec 30, 2021
Merged

Conversation

angela97lin
Copy link
Contributor

Part of #3116

@codecov
Copy link

codecov bot commented Dec 8, 2021

Codecov Report

Merging #3134 (cfcd56b) into main (4c04bd2) will increase coverage by 0.1%.
The diff coverage is 100.0%.

Impacted file tree graph

@@           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             
Impacted Files Coverage Δ
.../tests/data_checks_tests/test_data_check_action.py 100.0% <ø> (ø)
evalml/data_checks/__init__.py 100.0% <100.0%> (ø)
evalml/data_checks/data_check_action.py 100.0% <100.0%> (ø)
evalml/data_checks/data_check_action_option.py 100.0% <100.0%> (ø)
evalml/tests/conftest.py 96.2% <100.0%> (+0.1%) ⬆️
...data_checks_tests/test_data_check_action_option.py 100.0% <100.0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c04bd2...cfcd56b. Read the comment docs.

@angela97lin angela97lin self-assigned this Dec 13, 2021
@angela97lin angela97lin marked this pull request as ready for review December 28, 2021 16:03
Copy link
Collaborator

@jeremyliweishih jeremyliweishih left a 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"]
Copy link
Collaborator

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
Copy link
Collaborator

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)

Copy link
Contributor

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(
Copy link
Collaborator

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!

Copy link
Contributor

@bchen1116 bchen1116 left a 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
Copy link
Contributor

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

evalml/data_checks/data_check_action_option.py Outdated Show resolved Hide resolved
evalml/tests/data_checks_tests/test_data_check_action.py Outdated Show resolved Hide resolved
@angela97lin angela97lin merged commit 785be8f into main Dec 30, 2021
@angela97lin angela97lin deleted the 3116_add_data_check_action_option branch December 30, 2021 05:43
@chukarsten chukarsten mentioned this pull request Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants