-
Notifications
You must be signed in to change notification settings - Fork 324
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 verbosity to drop_unknown_references
#1854
Conversation
1 similar comment
'Success! All foreign keys have referential integrity.\n' | ||
'No rows were dropped.' | ||
) | ||
assert captured.out.strip() == expected_message |
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 would rather we not have a special case message for this case. In the spec, we said we should print out for every table all the time.
Even if nothing was dropped, I think it's useful reassurance to the user that we checked all tables. Plus, it simplifies our logic.
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.
Alright, done in 7a80b0a
@R-Palazzo I also think that the first case you have added a line |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1854 +/- ##
=======================================
Coverage 97.32% 97.33%
=======================================
Files 51 51
Lines 4823 4834 +11
=======================================
+ Hits 4694 4705 +11
Misses 129 129 ☔ View full report in Codecov by Sentry. |
sdv/utils/poc.py
Outdated
metadata.validate() | ||
try: | ||
metadata.validate_data(data) | ||
if drop_missing_values: | ||
_validate_foreign_keys_not_null(metadata, data) | ||
|
||
if verbose: | ||
sys.stdout.write('\n'.join([success_message, summary_table.to_string(index=False)])) |
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.
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.
Thanks, done in 6067e02. We have a lint error when using print
but I could also add # noqa: T001
(in SDMetrics we use sys.stdout)
CU-86aznj0ht
Resolve #1845
@npatki I slightly changed the message printed compared to the issue let me know if it works: