-
Notifications
You must be signed in to change notification settings - Fork 0
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 Dataset.tables_columns and tables_rows #113
Conversation
Reviewer's Guide by SourceryThis pull request adds new cached properties User journey diagram for HTML table preview enhancementjourney
title User Journey for Enhanced HTML Table Preview
section Accessing Dataset Table Information
User accesses dataset table preview: 5: User
System retrieves table statistics using tables_columns and tables_rows: 4: System
System displays enhanced table preview with row and column counts: 5: System
section Viewing Table Statistics
User views table statistics in HTML preview: 5: User
User sees number of rows and columns for each table: 5: User
Class diagram for audbcards.Dataset with new propertiesclassDiagram
class Dataset {
+cached_property tables_columns: Dict[str, int]
+cached_property tables_rows: Dict[str, int]
+cached_property tables_preview: Dict[str, List[List[str]]]
+cached_property tables_table: List[str]
+cached_property _tables_stats: Dict[str, dict]
}
note for Dataset "New properties tables_columns and tables_rows added"
note for Dataset "Private cached property _tables_stats added for performance optimization"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @hagenw - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
Hey @hagenw - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟡 Complexity: 1 issue found
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@sourcery-ai review |
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.
Hey @hagenw - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟡 Complexity: 1 issue found
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
The caching structure will be modified in #115. This MR is a precursor work and will be approved.
Closes #111
This adds the cached properties
audbcards.Dataset.tables_columns
andaudbcards.Dataset.tables_rows
,which return the number of columns and rows for each table of a dataset.
In addition, it uses those in the HTML table preview:
Under the hood, it adds the private cached property
audbcards.Dataset._tables_stats()
to avoid loading the tables multiple times.Summary by Sourcery
Add new cached properties
tables_columns
andtables_rows
to theaudbcards.Dataset
class to provide table dimensions, and enhance the HTML table preview to display these dimensions. Update tests to cover the new properties.New Features:
tables_columns
andtables_rows
in theaudbcards.Dataset
class to provide the number of columns and rows for each table in a dataset.Enhancements:
Tests:
tables_columns
andtables_rows
properties.