Skip to content
This repository was archived by the owner on Nov 9, 2024. It is now read-only.

Commit 3cade4a

Browse files
feat: add support for google.analytics.data.__version__ (#311)
* chore: update to gapic-generator-python 1.5.0 feat: add support for `google.cloud.<api>.__version__` PiperOrigin-RevId: 484665853 Source-Link: googleapis/googleapis@8eb249a Source-Link: https://github.com/googleapis/googleapis-gen/commit/c8aa327b5f478865fc3fd91e3c2768e54e26ad44 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzhhYTMyN2I1ZjQ3ODg2NWZjM2ZkOTFlM2MyNzY4ZTU0ZTI2YWQ0NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update version in gapic_version.py * add .release-please-manifest.json with correct version * add release-please-config.json * configure release please to use manifest * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * regenerate code using standard owlbot.py and autogenerated setup.py * configure release-please to use manifest * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 4f1305f commit 3cade4a

89 files changed

Lines changed: 1161 additions & 2117 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/release-please.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
releaseType: python
22
handleGHRelease: true
3+
manifest: true

.github/workflows/unittest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ jobs:
5454
- name: Report coverage results
5555
run: |
5656
coverage combine .coverage-results/.coverage*
57-
coverage report --show-missing --fail-under=99
57+
coverage report --show-missing --fail-under=100

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.14.2"
3+
}

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
# All configuration values have a default; values that are commented out
2525
# serve to show the default.
2626

27-
import sys
2827
import os
2928
import shlex
29+
import sys
3030

3131
# If extensions (or modules to document with autodoc) are in another directory,
3232
# add these directories to sys.path here. If the directory is relative to the

docs/index.rst

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,33 @@
22

33
.. include:: multiprocessing.rst
44

5+
This package includes clients for multiple versions of Analytics Data.
6+
By default, you will get version ``data_v1beta``.
7+
8+
59
API Reference
610
-------------
711
.. toctree::
812
:maxdepth: 2
913

1014
data_v1beta/services
1115
data_v1beta/types
16+
17+
API Reference
18+
-------------
19+
.. toctree::
20+
:maxdepth: 2
21+
1222
data_v1alpha/services
1323
data_v1alpha/types
1424

25+
1526
Changelog
1627
---------
1728

1829
For a list of all ``google-analytics-data`` releases:
1930

2031
.. toctree::
21-
:maxdepth: 2
32+
:maxdepth: 2
2233

23-
changelog
34+
changelog

google/analytics/data/__init__.py

Lines changed: 49 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -13,75 +13,68 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
from google.analytics.data import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
1620

17-
from google.analytics.data_v1beta.services.beta_analytics_data.client import (
18-
BetaAnalyticsDataClient,
19-
)
2021
from google.analytics.data_v1beta.services.beta_analytics_data.async_client import (
2122
BetaAnalyticsDataAsyncClient,
2223
)
23-
24-
from google.analytics.data_v1beta.types.analytics_data_api import (
25-
BatchRunPivotReportsRequest,
24+
from google.analytics.data_v1beta.services.beta_analytics_data.client import (
25+
BetaAnalyticsDataClient,
2626
)
2727
from google.analytics.data_v1beta.types.analytics_data_api import (
28+
BatchRunPivotReportsRequest,
2829
BatchRunPivotReportsResponse,
29-
)
30-
from google.analytics.data_v1beta.types.analytics_data_api import BatchRunReportsRequest
31-
from google.analytics.data_v1beta.types.analytics_data_api import (
30+
BatchRunReportsRequest,
3231
BatchRunReportsResponse,
33-
)
34-
from google.analytics.data_v1beta.types.analytics_data_api import (
3532
CheckCompatibilityRequest,
36-
)
37-
from google.analytics.data_v1beta.types.analytics_data_api import (
3833
CheckCompatibilityResponse,
39-
)
40-
from google.analytics.data_v1beta.types.analytics_data_api import GetMetadataRequest
41-
from google.analytics.data_v1beta.types.analytics_data_api import Metadata
42-
from google.analytics.data_v1beta.types.analytics_data_api import RunPivotReportRequest
43-
from google.analytics.data_v1beta.types.analytics_data_api import RunPivotReportResponse
44-
from google.analytics.data_v1beta.types.analytics_data_api import (
34+
GetMetadataRequest,
35+
Metadata,
36+
RunPivotReportRequest,
37+
RunPivotReportResponse,
4538
RunRealtimeReportRequest,
46-
)
47-
from google.analytics.data_v1beta.types.analytics_data_api import (
4839
RunRealtimeReportResponse,
40+
RunReportRequest,
41+
RunReportResponse,
42+
)
43+
from google.analytics.data_v1beta.types.data import (
44+
Cohort,
45+
CohortReportSettings,
46+
CohortSpec,
47+
CohortsRange,
48+
Compatibility,
49+
DateRange,
50+
Dimension,
51+
DimensionCompatibility,
52+
DimensionExpression,
53+
DimensionHeader,
54+
DimensionMetadata,
55+
DimensionValue,
56+
Filter,
57+
FilterExpression,
58+
FilterExpressionList,
59+
Metric,
60+
MetricAggregation,
61+
MetricCompatibility,
62+
MetricHeader,
63+
MetricMetadata,
64+
MetricType,
65+
MetricValue,
66+
MinuteRange,
67+
NumericValue,
68+
OrderBy,
69+
Pivot,
70+
PivotDimensionHeader,
71+
PivotHeader,
72+
PropertyQuota,
73+
QuotaStatus,
74+
ResponseMetaData,
75+
RestrictedMetricType,
76+
Row,
4977
)
50-
from google.analytics.data_v1beta.types.analytics_data_api import RunReportRequest
51-
from google.analytics.data_v1beta.types.analytics_data_api import RunReportResponse
52-
from google.analytics.data_v1beta.types.data import Cohort
53-
from google.analytics.data_v1beta.types.data import CohortReportSettings
54-
from google.analytics.data_v1beta.types.data import CohortSpec
55-
from google.analytics.data_v1beta.types.data import CohortsRange
56-
from google.analytics.data_v1beta.types.data import DateRange
57-
from google.analytics.data_v1beta.types.data import Dimension
58-
from google.analytics.data_v1beta.types.data import DimensionCompatibility
59-
from google.analytics.data_v1beta.types.data import DimensionExpression
60-
from google.analytics.data_v1beta.types.data import DimensionHeader
61-
from google.analytics.data_v1beta.types.data import DimensionMetadata
62-
from google.analytics.data_v1beta.types.data import DimensionValue
63-
from google.analytics.data_v1beta.types.data import Filter
64-
from google.analytics.data_v1beta.types.data import FilterExpression
65-
from google.analytics.data_v1beta.types.data import FilterExpressionList
66-
from google.analytics.data_v1beta.types.data import Metric
67-
from google.analytics.data_v1beta.types.data import MetricCompatibility
68-
from google.analytics.data_v1beta.types.data import MetricHeader
69-
from google.analytics.data_v1beta.types.data import MetricMetadata
70-
from google.analytics.data_v1beta.types.data import MetricValue
71-
from google.analytics.data_v1beta.types.data import MinuteRange
72-
from google.analytics.data_v1beta.types.data import NumericValue
73-
from google.analytics.data_v1beta.types.data import OrderBy
74-
from google.analytics.data_v1beta.types.data import Pivot
75-
from google.analytics.data_v1beta.types.data import PivotDimensionHeader
76-
from google.analytics.data_v1beta.types.data import PivotHeader
77-
from google.analytics.data_v1beta.types.data import PropertyQuota
78-
from google.analytics.data_v1beta.types.data import QuotaStatus
79-
from google.analytics.data_v1beta.types.data import ResponseMetaData
80-
from google.analytics.data_v1beta.types.data import Row
81-
from google.analytics.data_v1beta.types.data import Compatibility
82-
from google.analytics.data_v1beta.types.data import MetricAggregation
83-
from google.analytics.data_v1beta.types.data import MetricType
84-
from google.analytics.data_v1beta.types.data import RestrictedMetricType
8578

8679
__all__ = (
8780
"BetaAnalyticsDataClient",
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
__version__ = "0.14.2" # {x-release-please-version}

google/analytics/data_v1alpha/__init__.py

Lines changed: 73 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -13,75 +13,81 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
from google.analytics.data import gapic_version as package_version
1617

17-
from .services.alpha_analytics_data import AlphaAnalyticsDataClient
18-
from .services.alpha_analytics_data import AlphaAnalyticsDataAsyncClient
18+
__version__ = package_version.__version__
1919

20-
from .types.analytics_data_api import RunFunnelReportRequest
21-
from .types.analytics_data_api import RunFunnelReportResponse
22-
from .types.data import BetweenFilter
23-
from .types.data import DateRange
24-
from .types.data import Dimension
25-
from .types.data import DimensionExpression
26-
from .types.data import DimensionHeader
27-
from .types.data import DimensionValue
28-
from .types.data import EventSegment
29-
from .types.data import EventSegmentConditionGroup
30-
from .types.data import EventSegmentCriteria
31-
from .types.data import EventSegmentExclusion
32-
from .types.data import Filter
33-
from .types.data import FilterExpression
34-
from .types.data import FilterExpressionList
35-
from .types.data import Funnel
36-
from .types.data import FunnelBreakdown
37-
from .types.data import FunnelEventFilter
38-
from .types.data import FunnelFieldFilter
39-
from .types.data import FunnelFilterExpression
40-
from .types.data import FunnelFilterExpressionList
41-
from .types.data import FunnelNextAction
42-
from .types.data import FunnelParameterFilter
43-
from .types.data import FunnelParameterFilterExpression
44-
from .types.data import FunnelParameterFilterExpressionList
45-
from .types.data import FunnelResponseMetadata
46-
from .types.data import FunnelStep
47-
from .types.data import FunnelSubReport
48-
from .types.data import InListFilter
49-
from .types.data import MetricHeader
50-
from .types.data import MetricValue
51-
from .types.data import NumericFilter
52-
from .types.data import NumericValue
53-
from .types.data import PropertyQuota
54-
from .types.data import QuotaStatus
55-
from .types.data import Row
56-
from .types.data import SamplingMetadata
57-
from .types.data import Segment
58-
from .types.data import SegmentEventFilter
59-
from .types.data import SegmentFilter
60-
from .types.data import SegmentFilterExpression
61-
from .types.data import SegmentFilterExpressionList
62-
from .types.data import SegmentFilterScoping
63-
from .types.data import SegmentParameterFilter
64-
from .types.data import SegmentParameterFilterExpression
65-
from .types.data import SegmentParameterFilterExpressionList
66-
from .types.data import SegmentParameterFilterScoping
67-
from .types.data import SessionSegment
68-
from .types.data import SessionSegmentConditionGroup
69-
from .types.data import SessionSegmentCriteria
70-
from .types.data import SessionSegmentExclusion
71-
from .types.data import StringFilter
72-
from .types.data import UserSegment
73-
from .types.data import UserSegmentConditionGroup
74-
from .types.data import UserSegmentCriteria
75-
from .types.data import UserSegmentExclusion
76-
from .types.data import UserSegmentSequenceGroup
77-
from .types.data import UserSequenceStep
78-
from .types.data import EventCriteriaScoping
79-
from .types.data import EventExclusionDuration
80-
from .types.data import MetricType
81-
from .types.data import SessionCriteriaScoping
82-
from .types.data import SessionExclusionDuration
83-
from .types.data import UserCriteriaScoping
84-
from .types.data import UserExclusionDuration
20+
21+
from .services.alpha_analytics_data import (
22+
AlphaAnalyticsDataAsyncClient,
23+
AlphaAnalyticsDataClient,
24+
)
25+
from .types.analytics_data_api import RunFunnelReportRequest, RunFunnelReportResponse
26+
from .types.data import (
27+
BetweenFilter,
28+
DateRange,
29+
Dimension,
30+
DimensionExpression,
31+
DimensionHeader,
32+
DimensionValue,
33+
EventCriteriaScoping,
34+
EventExclusionDuration,
35+
EventSegment,
36+
EventSegmentConditionGroup,
37+
EventSegmentCriteria,
38+
EventSegmentExclusion,
39+
Filter,
40+
FilterExpression,
41+
FilterExpressionList,
42+
Funnel,
43+
FunnelBreakdown,
44+
FunnelEventFilter,
45+
FunnelFieldFilter,
46+
FunnelFilterExpression,
47+
FunnelFilterExpressionList,
48+
FunnelNextAction,
49+
FunnelParameterFilter,
50+
FunnelParameterFilterExpression,
51+
FunnelParameterFilterExpressionList,
52+
FunnelResponseMetadata,
53+
FunnelStep,
54+
FunnelSubReport,
55+
InListFilter,
56+
MetricHeader,
57+
MetricType,
58+
MetricValue,
59+
NumericFilter,
60+
NumericValue,
61+
PropertyQuota,
62+
QuotaStatus,
63+
Row,
64+
SamplingMetadata,
65+
Segment,
66+
SegmentEventFilter,
67+
SegmentFilter,
68+
SegmentFilterExpression,
69+
SegmentFilterExpressionList,
70+
SegmentFilterScoping,
71+
SegmentParameterFilter,
72+
SegmentParameterFilterExpression,
73+
SegmentParameterFilterExpressionList,
74+
SegmentParameterFilterScoping,
75+
SessionCriteriaScoping,
76+
SessionExclusionDuration,
77+
SessionSegment,
78+
SessionSegmentConditionGroup,
79+
SessionSegmentCriteria,
80+
SessionSegmentExclusion,
81+
StringFilter,
82+
UserCriteriaScoping,
83+
UserExclusionDuration,
84+
UserSegment,
85+
UserSegmentConditionGroup,
86+
UserSegmentCriteria,
87+
UserSegmentExclusion,
88+
UserSegmentSequenceGroup,
89+
UserSequenceStep,
90+
)
8591

8692
__all__ = (
8793
"AlphaAnalyticsDataAsyncClient",

google/analytics/data_v1alpha/services/alpha_analytics_data/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
from .client import AlphaAnalyticsDataClient
1716
from .async_client import AlphaAnalyticsDataAsyncClient
17+
from .client import AlphaAnalyticsDataClient
1818

1919
__all__ = (
2020
"AlphaAnalyticsDataClient",

google/analytics/data_v1alpha/services/alpha_analytics_data/async_client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,25 @@
1717
import functools
1818
import re
1919
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
20-
import pkg_resources
2120

22-
from google.api_core.client_options import ClientOptions
2321
from google.api_core import exceptions as core_exceptions
2422
from google.api_core import gapic_v1
2523
from google.api_core import retry as retries
24+
from google.api_core.client_options import ClientOptions
2625
from google.auth import credentials as ga_credentials # type: ignore
2726
from google.oauth2 import service_account # type: ignore
27+
import pkg_resources
2828

2929
try:
3030
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
3131
except AttributeError: # pragma: NO COVER
3232
OptionalRetry = Union[retries.Retry, object] # type: ignore
3333

34-
from google.analytics.data_v1alpha.types import analytics_data_api
35-
from google.analytics.data_v1alpha.types import data
36-
from .transports.base import AlphaAnalyticsDataTransport, DEFAULT_CLIENT_INFO
37-
from .transports.grpc_asyncio import AlphaAnalyticsDataGrpcAsyncIOTransport
34+
from google.analytics.data_v1alpha.types import analytics_data_api, data
35+
3836
from .client import AlphaAnalyticsDataClient
37+
from .transports.base import DEFAULT_CLIENT_INFO, AlphaAnalyticsDataTransport
38+
from .transports.grpc_asyncio import AlphaAnalyticsDataGrpcAsyncIOTransport
3939

4040

4141
class AlphaAnalyticsDataAsyncClient:

0 commit comments

Comments
 (0)