-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Update monitoring gapic client, re-integrate helpers #4785
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
Update monitoring gapic client, re-integrate helpers #4785
Conversation
69759c8 to
84eb2ea
Compare
Most of the code was ported over from the master branch, and updated to use the autogenerated code. Also, add utf-8 encoding to proto/common_pb2.py.
84eb2ea to
dfc929f
Compare
|
@supriyagarg I don't see the actual addition of the monitoring gapic client here? |
lukesneeringer
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.
This is mostly good; I have a couple items cited that I believe could/should be improved.
I also want to thank you for excellent commenting.
| :rtype: :class:`pandas.DataFrame` | ||
| :returns: A dataframe where each column represents one time series. | ||
| """ | ||
| import pandas # pylint: disable=import-error |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| """ | ||
| import pandas # pylint: disable=import-error | ||
|
|
||
| if labels is not None: |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| headers.append(_extract_header(time_series)) | ||
|
|
||
| # Implement a smart default of using all available labels. | ||
| if label is None and labels is None: |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| # Build a multi-level stack of column headers. Some labels may | ||
| # be undefined for some time series. | ||
| levels = [] | ||
| for key in labels or [label]: |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| # by specifying "label". | ||
| dataframe.columns = pandas.MultiIndex.from_arrays( | ||
| levels, | ||
| names=labels or None) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| """ | ||
| # Using copy.deepcopy() would be appropriate, except that we want | ||
| # to copy self._client only as a reference. | ||
| new_query = copy.copy(self) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
I added it in the base branch. |
e0a242a to
36fc192
Compare
36fc192 to
09a8f1d
Compare
|
@lukesneeringer: Thanks very much for your comments. I have addressed all of them. |
Also, populat the 'aggregation' field is now populated only if at least one of its components has been set.
9636908 to
18b9e37
Compare
|
@lukesneeringer How does this tie in with autogen? Is just specifying automodule will autogenerate that class? And then query and _dataframe are just manual classes? |
bd09c12 to
bc3f82f
Compare
Added back support for the Query class, and for converting timeseries data into a pandas DataFrame object.