Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.

Commit 2e98c02

Browse files
committed
Importing google.datalab.kernel is working
1 parent a886276 commit 2e98c02

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

google/datalab/stackdriver/monitoring/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414

1515
from __future__ import absolute_import
1616

17-
from google.cloud.monitoring import Aligner, Reducer
17+
from google.cloud.monitoring import enums
18+
19+
Aligner = enums.Aggregation.Aligner
20+
Reducer = enums.Aggregation.Reducer
21+
1822
from ._group import Groups
1923
from ._metric import MetricDescriptors
2024
from ._query import Query

google/datalab/stackdriver/monitoring/_query.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414

1515
from __future__ import absolute_import
1616

17-
import google.cloud.monitoring
17+
import google.cloud.monitoring_v3.query
1818

1919
from . import _query_metadata
2020
from . import _utils
2121

2222

23-
class Query(google.cloud.monitoring.Query):
23+
class Query(google.cloud.monitoring_v3.query.Query):
2424
"""Query object for retrieving metric data."""
2525

2626
def __init__(self,
27-
metric_type=google.cloud.monitoring.Query.DEFAULT_METRIC_TYPE,
27+
metric_type=google.cloud.monitoring_v3.query.Query.DEFAULT_METRIC_TYPE,
2828
end_time=None, days=0, hours=0, minutes=0, context=None):
2929
"""Initializes the core query parameters.
3030
@@ -33,13 +33,13 @@ def __init__(self,
3333
the resulting duration from the end time.
3434
3535
It is also allowed to omit the end time and duration here,
36-
in which case :meth:`~google.cloud.monitoring.query.Query.select_interval`
36+
in which case :meth:`~google.cloud.monitoring_v3.query.Query.select_interval`
3737
must be called before the query is executed.
3838
3939
Args:
4040
metric_type: The metric type name. The default value is
4141
:data:`Query.DEFAULT_METRIC_TYPE
42-
<google.cloud.monitoring.query.Query.DEFAULT_METRIC_TYPE>`, but
42+
<google.cloud.monitoring_v3.query.Query.DEFAULT_METRIC_TYPE>`, but
4343
please note that this default value is provided only for
4444
demonstration purposes and is subject to change.
4545
end_time: The end time (inclusive) of the time interval for which
@@ -54,7 +54,7 @@ def __init__(self,
5454
ValueError: ``end_time`` was specified but ``days``, ``hours``, and
5555
``minutes`` are all zero. If you really want to specify a point in
5656
time, use
57-
:meth:`~google.cloud.monitoring.query.Query.select_interval`.
57+
:meth:`~google.cloud.monitoring_v3.query.Query.select_interval`.
5858
"""
5959
client = _utils.make_client(context)
6060
super(Query, self).__init__(client, metric_type,

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
'configparser>=3.5.0',
9494
'mock>=2.0.0',
9595
'future>=0.16.0',
96-
'google-cloud>=0.30.0',
96+
'google-cloud-monitoring>=0.30.1',
9797
'google-api-python-client>=1.6.2',
9898
'seaborn>=0.7.0',
9999
'plotly>=1.12.5',

0 commit comments

Comments
 (0)