-
Notifications
You must be signed in to change notification settings - Fork 0
[PD1-597] Document pandas DataFrame integration and EAV functions #20
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
Conversation
Summary of ChangesHello @joshuanapoli, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the documentation for the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request improves the documentation by adding details about pandas DataFrame integration and the new EAV (Entity-Attribute-Value) functions. The changes are clear and add valuable information for users of the SDK. I've made a few suggestions to improve the clarity and completeness of the examples and API descriptions in the README.md file. Specifically, I've pointed out some inconsistencies in the documentation for get_metric_data, suggested completing the documentation for EAVTable attributes, and recommended adjustments to the code examples for select_from_eav and select_from_eav_id to make them less confusing.
| ### Metric Data | ||
|
|
||
| The main content for a metric is a set of points where the metric value changed. These are returned as a Pandas Dataframe with columns for name, time, value_double, value_string. | ||
| The main content for a metric is a set of points where the metric value changed. These are returned with columns for name, time, value_double, value_string. |
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.
While this change to be more generic about the return type is a good step, there are still inconsistencies in the documentation for get_metric_data. The example output immediately following this line, and the function description under the CVec Class section (line 234), both strongly imply a Pandas DataFrame is returned. However, the function actually returns a List[MetricDataPoint]. To avoid confusion, I recommend updating the other parts of the documentation to be consistent with the function's actual return type.
| - `id`: The table's UUID | ||
| - `tenant_id`: The tenant ID | ||
| - `name`: Human-readable table name | ||
| - `created_at`: When the table was created | ||
| - `updated_at`: When the table was last updated |
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.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
truggles
left a comment
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.
Is there a way to query where the 1,000 newest records that match your filters will be the 1,000 returned?
Overall this is super helpful. Thank you!
Right now, there a consistent way to order by record age; the result is junk if you hit 1000. I might redesign the table looking to support "monthly" data views for ATEK, in which case we might take the time to see if we can store more metadata without degrading performance too much. |
|
LGTM, merge when ready. Thanks. |
Improve documentation to better show how pandas DataFrames can be provided and how to use the EAV tables.