Skip to content

Add DataCheckActionOption class#3134

Merged
angela97lin merged 20 commits into
mainfrom
3116_add_data_check_action_option
Dec 30, 2021
Merged

Add DataCheckActionOption class#3134
angela97lin merged 20 commits into
mainfrom
3116_add_data_check_action_option

Conversation

@angela97lin

Copy link
Copy Markdown
Contributor

Part of #3116

@codecov

codecov Bot commented Dec 8, 2021

Copy link
Copy Markdown

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

@jeremyliweishih jeremyliweishih left a comment

Copy link
Copy Markdown
Collaborator

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!

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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!

@bchen1116 bchen1116 left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

Comment thread evalml/data_checks/data_check_action_option.py
Comment thread evalml/data_checks/data_check_action_option.py Outdated
Comment thread evalml/tests/data_checks_tests/test_data_check_action.py Outdated
@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