-
Notifications
You must be signed in to change notification settings - Fork 165
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
Min True Samples Error Checking #365
Conversation
@@ -939,6 +939,24 @@ def test_min_col_samples_used(self, *mocks): | |||
samples_per_update=1) | |||
self.assertEqual(2, sparse_profile._min_col_samples_used) | |||
|
|||
@mock.patch('dataprofiler.profilers.profile_builder.DataLabeler') |
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.
can also mock out update, no need to profile anything in this.
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.
Probably should test for Unstructured and dp.Profiler too, no?
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.
update not mocked since I wanted to make sure None still worked without error (it gets manipulated in update). Also the test takes 30ms so its not really going to get much faster.
I added the tests for unstructured and dp.Profiler too
profile = dp.StructuredProfiler(empty_df, | ||
min_true_samples="Bloop") | ||
|
||
# Test None input (defaults to zero) |
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.
You say "defaults to zero" but then assert that its None. I would clarify in the comment that it doesn't get set to 0 in the init, otherwise the comment seems to clash with the assertion being made
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.
Fair, changed the wording to make it somewhat more clear
Quick fix to prevent weird errors