Skip to content

Conversation

@supriyagarg
Copy link
Contributor

Added back support for the Query class, and for converting timeseries data into a pandas DataFrame object.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 24, 2018
@supriyagarg supriyagarg force-pushed the monitoring-autogen branch 2 times, most recently from 69759c8 to 84eb2ea Compare January 25, 2018 00:18
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.
@tseaver tseaver added the api: monitoring Issues related to the Cloud Monitoring API. label Jan 25, 2018
@chemelnucfin chemelnucfin added the type: process A process-related concern. May include testing, release, or the like. label Jan 25, 2018
@theacodes
Copy link
Contributor

@supriyagarg I don't see the actual addition of the monitoring gapic client here?

Copy link
Contributor

@lukesneeringer lukesneeringer left a 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.

"""
import pandas # pylint: disable=import-error

if labels is not None:

This comment was marked as spam.

This comment was marked as spam.

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.

# 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.

# 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.

"""
# 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.

@lukesneeringer
Copy link
Contributor

@supriyagarg I don't see the actual addition of the monitoring gapic client here?

I added it in the base branch.

@supriyagarg
Copy link
Contributor Author

@lukesneeringer: Thanks very much for your comments. I have addressed all of them.
The code is largely copied over from the master branch, including the comments - this was originally written in collaboration with @rimey

Also, populat the 'aggregation' field is now populated only if at least
one of its components has been set.
@chemelnucfin
Copy link
Contributor

@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?

@theacodes theacodes changed the title Monitoring autogen Update monitoring gapic client, re-integrate helpers Apr 13, 2018
@theacodes theacodes merged commit 10643a8 into googleapis:monitoring-autogen Apr 13, 2018
@supriyagarg supriyagarg deleted the monitoring-autogen branch April 20, 2018 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: monitoring Issues related to the Cloud Monitoring API. cla: yes This human has signed the Contributor License Agreement. type: process A process-related concern. May include testing, release, or the like.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants