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 SingleTableMetadata visualization #1535

Merged
merged 3 commits into from
Aug 11, 2023

Conversation

pvk-developer
Copy link
Member

Resolves #1517

@pvk-developer pvk-developer requested a review from a team as a code owner August 9, 2023 20:13
@pvk-developer pvk-developer requested review from amontanez24 and fealho and removed request for a team August 9, 2023 20:13
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02% 🎉

Comparison is base (d23771c) 96.36% compared to head (b9e1438) 96.39%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1535      +/-   ##
==========================================
+ Coverage   96.36%   96.39%   +0.02%     
==========================================
  Files          49       49              
  Lines        3937     3965      +28     
==========================================
+ Hits         3794     3822      +28     
  Misses        143      143              
Files Changed Coverage Δ
sdv/metadata/single_table.py 98.96% <100.00%> (+0.11%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -477,6 +479,60 @@ def validate(self):
+ '\n'.join([str(e) for e in errors])
)

def visualize(self, show_table_details='full', output_filepath=None):
"""Create a visualization of the multi-table dataset.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

single-table


Args:
show_table_details (str):
If 'full', show the column names, primary, alternate and sequence keys are all
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove show after If 'full'. Also, review the docstrings, they mention table_names when I don't think we have them for single_table.

Also, shouldn't None be an option?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@npatki None is an option for the multi-table visualization but in that case all it shows is the table name. That doesn't really make sense in single-table so should it be an option or not?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not add it because it didn't make sense (empty box ?) ... In multi table I see a point of None since you can see the diagram.


Args:
show_table_details (str):
If 'full', show the column names, primary, alternate and sequence keys are all
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@npatki None is an option for the multi-table visualization but in that case all it shows is the table name. That doesn't really make sense in single-table so should it be an option or not?

sdv/metadata/single_table.py Outdated Show resolved Hide resolved
sdv/metadata/single_table.py Outdated Show resolved Hide resolved
@pvk-developer pvk-developer force-pushed the issue-1517-add-visualize-to-singletablemetadata branch from b9e1438 to 1e8fd04 Compare August 11, 2023 13:55
@fealho fealho self-requested a review August 11, 2023 20:37
Copy link
Contributor

@amontanez24 amontanez24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@pvk-developer pvk-developer merged commit afadb34 into master Aug 11, 2023
28 checks passed
@pvk-developer pvk-developer deleted the issue-1517-add-visualize-to-singletablemetadata branch August 11, 2023 21:43
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.

Add visualize method to SingleTableMetadata
4 participants