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

Min True Samples Error Checking #365

Merged
merged 5 commits into from
Jul 29, 2021

Conversation

grant-eden
Copy link
Contributor

Quick fix to prevent weird errors

@@ -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')
Copy link
Contributor

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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)
Copy link
Contributor

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

Copy link
Contributor Author

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

@ChrisWallace2020 ChrisWallace2020 enabled auto-merge (squash) July 29, 2021 13:41
@ChrisWallace2020 ChrisWallace2020 merged commit 737f0eb into capitalone:main Jul 29, 2021
@JGSweets JGSweets mentioned this pull request Aug 9, 2021
stevensecreti pushed a commit to stevensecreti/DataProfiler that referenced this pull request Jun 15, 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.

4 participants