diff --git a/.flake8 b/.flake8 index 2e438749..87f6e408 100644 --- a/.flake8 +++ b/.flake8 @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 98994f47..a3da1b0d 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:2d816f26f728ac8b24248741e7d4c461c09764ef9f7be3684d557c9632e46dbd -# created: 2023-06-28T17:03:33.371210701Z + digest: sha256:3e3800bb100af5d7f9e810d48212b37812c1856d20ffeafb99ebe66461b61fc7 +# created: 2023-08-02T10:53:29.114535628Z diff --git a/.github/auto-label.yaml b/.github/auto-label.yaml index 41bff0b5..b2016d11 100644 --- a/.github/auto-label.yaml +++ b/.github/auto-label.yaml @@ -1,4 +1,4 @@ -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 35889ffd..a492ad71 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2018 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/docker/docs/Dockerfile b/.kokoro/docker/docs/Dockerfile index f8137d0a..8e39a2cc 100644 --- a/.kokoro/docker/docs/Dockerfile +++ b/.kokoro/docker/docs/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/populate-secrets.sh b/.kokoro/populate-secrets.sh index f5251425..6f397214 100755 --- a/.kokoro/populate-secrets.sh +++ b/.kokoro/populate-secrets.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020 Google LLC. +# Copyright 2023 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/publish-docs.sh b/.kokoro/publish-docs.sh index 1c4d6237..9eafe0be 100755 --- a/.kokoro/publish-docs.sh +++ b/.kokoro/publish-docs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/release.sh b/.kokoro/release.sh index 95adc789..f61d2b72 100755 --- a/.kokoro/release.sh +++ b/.kokoro/release.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index c7929db6..029bd342 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -20,9 +20,9 @@ cachetools==5.2.0 \ --hash=sha256:6a94c6402995a99c3970cc7e4884bb60b4a8639938157eeed436098bf9831757 \ --hash=sha256:f9f17d2aec496a9aa6b76f53e3b614c965223c061982d434d160f930c698a9db # via google-auth -certifi==2022.12.7 \ - --hash=sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3 \ - --hash=sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18 +certifi==2023.7.22 \ + --hash=sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082 \ + --hash=sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9 # via requests cffi==1.15.1 \ --hash=sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5 \ @@ -113,26 +113,30 @@ commonmark==0.9.1 \ --hash=sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60 \ --hash=sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9 # via rich -cryptography==41.0.0 \ - --hash=sha256:0ddaee209d1cf1f180f1efa338a68c4621154de0afaef92b89486f5f96047c55 \ - --hash=sha256:14754bcdae909d66ff24b7b5f166d69340ccc6cb15731670435efd5719294895 \ - --hash=sha256:344c6de9f8bda3c425b3a41b319522ba3208551b70c2ae00099c205f0d9fd3be \ - --hash=sha256:34d405ea69a8b34566ba3dfb0521379b210ea5d560fafedf9f800a9a94a41928 \ - --hash=sha256:3680248309d340fda9611498a5319b0193a8dbdb73586a1acf8109d06f25b92d \ - --hash=sha256:3c5ef25d060c80d6d9f7f9892e1d41bb1c79b78ce74805b8cb4aa373cb7d5ec8 \ - --hash=sha256:4ab14d567f7bbe7f1cdff1c53d5324ed4d3fc8bd17c481b395db224fb405c237 \ - --hash=sha256:5c1f7293c31ebc72163a9a0df246f890d65f66b4a40d9ec80081969ba8c78cc9 \ - --hash=sha256:6b71f64beeea341c9b4f963b48ee3b62d62d57ba93eb120e1196b31dc1025e78 \ - --hash=sha256:7d92f0248d38faa411d17f4107fc0bce0c42cae0b0ba5415505df72d751bf62d \ - --hash=sha256:8362565b3835ceacf4dc8f3b56471a2289cf51ac80946f9087e66dc283a810e0 \ - --hash=sha256:84a165379cb9d411d58ed739e4af3396e544eac190805a54ba2e0322feb55c46 \ - --hash=sha256:88ff107f211ea696455ea8d911389f6d2b276aabf3231bf72c8853d22db755c5 \ - --hash=sha256:9f65e842cb02550fac96536edb1d17f24c0a338fd84eaf582be25926e993dde4 \ - --hash=sha256:a4fc68d1c5b951cfb72dfd54702afdbbf0fb7acdc9b7dc4301bbf2225a27714d \ - --hash=sha256:b7f2f5c525a642cecad24ee8670443ba27ac1fab81bba4cc24c7b6b41f2d0c75 \ - --hash=sha256:b846d59a8d5a9ba87e2c3d757ca019fa576793e8758174d3868aecb88d6fc8eb \ - --hash=sha256:bf8fc66012ca857d62f6a347007e166ed59c0bc150cefa49f28376ebe7d992a2 \ - --hash=sha256:f5d0bf9b252f30a31664b6f64432b4730bb7038339bd18b1fafe129cfc2be9be +cryptography==41.0.3 \ + --hash=sha256:0d09fb5356f975974dbcb595ad2d178305e5050656affb7890a1583f5e02a306 \ + --hash=sha256:23c2d778cf829f7d0ae180600b17e9fceea3c2ef8b31a99e3c694cbbf3a24b84 \ + --hash=sha256:3fb248989b6363906827284cd20cca63bb1a757e0a2864d4c1682a985e3dca47 \ + --hash=sha256:41d7aa7cdfded09b3d73a47f429c298e80796c8e825ddfadc84c8a7f12df212d \ + --hash=sha256:42cb413e01a5d36da9929baa9d70ca90d90b969269e5a12d39c1e0d475010116 \ + --hash=sha256:4c2f0d35703d61002a2bbdcf15548ebb701cfdd83cdc12471d2bae80878a4207 \ + --hash=sha256:4fd871184321100fb400d759ad0cddddf284c4b696568204d281c902fc7b0d81 \ + --hash=sha256:5259cb659aa43005eb55a0e4ff2c825ca111a0da1814202c64d28a985d33b087 \ + --hash=sha256:57a51b89f954f216a81c9d057bf1a24e2f36e764a1ca9a501a6964eb4a6800dd \ + --hash=sha256:652627a055cb52a84f8c448185922241dd5217443ca194d5739b44612c5e6507 \ + --hash=sha256:67e120e9a577c64fe1f611e53b30b3e69744e5910ff3b6e97e935aeb96005858 \ + --hash=sha256:6af1c6387c531cd364b72c28daa29232162010d952ceb7e5ca8e2827526aceae \ + --hash=sha256:6d192741113ef5e30d89dcb5b956ef4e1578f304708701b8b73d38e3e1461f34 \ + --hash=sha256:7efe8041897fe7a50863e51b77789b657a133c75c3b094e51b5e4b5cec7bf906 \ + --hash=sha256:84537453d57f55a50a5b6835622ee405816999a7113267739a1b4581f83535bd \ + --hash=sha256:8f09daa483aedea50d249ef98ed500569841d6498aa9c9f4b0531b9964658922 \ + --hash=sha256:95dd7f261bb76948b52a5330ba5202b91a26fbac13ad0e9fc8a3ac04752058c7 \ + --hash=sha256:a74fbcdb2a0d46fe00504f571a2a540532f4c188e6ccf26f1f178480117b33c4 \ + --hash=sha256:a983e441a00a9d57a4d7c91b3116a37ae602907a7618b882c8013b5762e80574 \ + --hash=sha256:ab8de0d091acbf778f74286f4989cf3d1528336af1b59f3e5d2ebca8b5fe49e1 \ + --hash=sha256:aeb57c421b34af8f9fe830e1955bf493a86a7996cc1338fe41b30047d16e962c \ + --hash=sha256:ce785cf81a7bdade534297ef9e490ddff800d956625020ab2ec2780a556c313e \ + --hash=sha256:d0d651aa754ef58d75cec6edfbd21259d93810b73f6ec246436a21b7841908de # via # gcp-releasetool # secretstorage @@ -392,9 +396,9 @@ pycparser==2.21 \ --hash=sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9 \ --hash=sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206 # via cffi -pygments==2.13.0 \ - --hash=sha256:56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1 \ - --hash=sha256:f643f331ab57ba3c9d89212ee4a2dabc6e94f117cf4eefde99a0574720d14c42 +pygments==2.15.0 \ + --hash=sha256:77a3299119af881904cd5ecd1ac6a66214b6e9bed1f2db16993b54adede64094 \ + --hash=sha256:f7e36cffc4c517fbc252861b9a6e4644ca0e5abadf9a113c72d1358ad09b9500 # via # readme-renderer # rich diff --git a/.kokoro/test-samples-against-head.sh b/.kokoro/test-samples-against-head.sh index ba3a707b..63ac41df 100755 --- a/.kokoro/test-samples-against-head.sh +++ b/.kokoro/test-samples-against-head.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/test-samples-impl.sh b/.kokoro/test-samples-impl.sh index 2c6500ca..5a0f5fab 100755 --- a/.kokoro/test-samples-impl.sh +++ b/.kokoro/test-samples-impl.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2021 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/test-samples.sh b/.kokoro/test-samples.sh index 11c042d3..50b35a48 100755 --- a/.kokoro/test-samples.sh +++ b/.kokoro/test-samples.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh index f39236e9..d85b1f26 100755 --- a/.kokoro/trampoline.sh +++ b/.kokoro/trampoline.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2017 Google Inc. +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/trampoline_v2.sh b/.kokoro/trampoline_v2.sh index 4af6cdc2..59a7cf3a 100755 --- a/.kokoro/trampoline_v2.sh +++ b/.kokoro/trampoline_v2.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5405cc8f..19409cbd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,4 @@ -# Copyright 2021 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -26,6 +26,6 @@ repos: hooks: - id: black - repo: https://github.com/pycqa/flake8 - rev: 3.9.2 + rev: 6.1.0 hooks: - id: flake8 diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7b51ca08..b05f59a8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.17.0" + ".": "0.17.1" } diff --git a/.trampolinerc b/.trampolinerc index 0eee72ab..a7dfeb42 100644 --- a/.trampolinerc +++ b/.trampolinerc @@ -1,4 +1,4 @@ -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Template for .trampolinerc - # Add required env vars here. required_envvars+=( ) diff --git a/CHANGELOG.md b/CHANGELOG.md index a23d900d..21a6de03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [0.17.1](https://github.com/googleapis/python-analytics-data/compare/v0.17.0...v0.17.1) (2023-08-06) + + +### Documentation + +* Add clarifications ([e1cecc7](https://github.com/googleapis/python-analytics-data/commit/e1cecc717db10b1069b50b2e1f2ff90741c71075)) +* Minor formatting ([e1cecc7](https://github.com/googleapis/python-analytics-data/commit/e1cecc717db10b1069b50b2e1f2ff90741c71075)) + ## [0.17.0](https://github.com/googleapis/python-analytics-data/compare/v0.16.3...v0.17.0) (2023-07-11) diff --git a/MANIFEST.in b/MANIFEST.in index e783f4c6..e0a66705 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/README.rst b/README.rst index 2df06ccf..81ca6344 100644 --- a/README.rst +++ b/README.rst @@ -36,21 +36,24 @@ In order to use this library, you first need to go through the following steps: Installation ~~~~~~~~~~~~ -Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to -create isolated Python environments. The basic problem it addresses is one of -dependencies and versions, and indirectly permissions. +Install this library in a virtual environment using `venv`_. `venv`_ is a tool that +creates isolated Python environments. These isolated environments can have separate +versions of Python packages, which allows you to isolate one project's dependencies +from the dependencies of other projects. -With `virtualenv`_, it's possible to install this library without needing system +With `venv`_, it's possible to install this library without needing system install permissions, and without clashing with the installed system dependencies. -.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/ +.. _`venv`: https://docs.python.org/3/library/venv.html Code samples and snippets ~~~~~~~~~~~~~~~~~~~~~~~~~ -Code samples and snippets live in the `samples/` folder. +Code samples and snippets live in the `samples/`_ folder. + +.. _samples/: https://github.com/googleapis/python-analytics-data/tree/main/samples Supported Python Versions @@ -77,10 +80,9 @@ Mac/Linux .. code-block:: console - pip install virtualenv - virtualenv + python3 -m venv source /bin/activate - /bin/pip install google-analytics-data + pip install google-analytics-data Windows @@ -88,10 +90,9 @@ Windows .. code-block:: console - pip install virtualenv - virtualenv - \Scripts\activate - \Scripts\pip.exe install google-analytics-data + py -m venv + .\\Scripts\activate + pip install google-analytics-data Next Steps ~~~~~~~~~~ diff --git a/docs/conf.py b/docs/conf.py index 4e98c34d..1730bc17 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2021 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/analytics/data/gapic_version.py b/google/analytics/data/gapic_version.py index 3dfeb982..e53cc28d 100644 --- a/google/analytics/data/gapic_version.py +++ b/google/analytics/data/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.17.0" # {x-release-please-version} +__version__ = "0.17.1" # {x-release-please-version} diff --git a/google/analytics/data_v1alpha/gapic_version.py b/google/analytics/data_v1alpha/gapic_version.py index 3dfeb982..e53cc28d 100644 --- a/google/analytics/data_v1alpha/gapic_version.py +++ b/google/analytics/data_v1alpha/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.17.0" # {x-release-please-version} +__version__ = "0.17.1" # {x-release-please-version} diff --git a/google/analytics/data_v1beta/gapic_version.py b/google/analytics/data_v1beta/gapic_version.py index 3dfeb982..e53cc28d 100644 --- a/google/analytics/data_v1beta/gapic_version.py +++ b/google/analytics/data_v1beta/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.17.0" # {x-release-please-version} +__version__ = "0.17.1" # {x-release-please-version} diff --git a/google/analytics/data_v1beta/types/analytics_data_api.py b/google/analytics/data_v1beta/types/analytics_data_api.py index d2bdb84a..579c0d76 100644 --- a/google/analytics/data_v1beta/types/analytics_data_api.py +++ b/google/analytics/data_v1beta/types/analytics_data_api.py @@ -57,11 +57,6 @@ class CheckCompatibilityRequest(proto.Message): ``runReport`` request. Example: properties/1234 - - Set the Property ID to 0 for compatibility checking on - dimensions and metrics common to all properties. In this - special mode, this method will not return custom dimensions - and metrics. dimensions (MutableSequence[google.analytics.data_v1beta.types.Dimension]): The dimensions in this report. ``dimensions`` should be the same value as in your ``runReport`` request. @@ -193,9 +188,9 @@ class RunReportRequest(proto.Message): both date ranges. In a cohort request, this ``dateRanges`` must be unspecified. dimension_filter (google.analytics.data_v1beta.types.FilterExpression): - Dimension filters allow you to ask for only specific - dimension values in the report. To learn more, see - `Fundamentals of Dimension + Dimension filters let you ask for only specific dimension + values in the report. To learn more, see `Fundamentals of + Dimension Filters `__ for examples. Metrics cannot be used in this filter. metric_filter (google.analytics.data_v1beta.types.FilterExpression): @@ -217,7 +212,7 @@ class RunReportRequest(proto.Message): `Pagination `__. limit (int): The number of rows to return. If unspecified, 10,000 rows - are returned. The API returns a maximum of 100,000 rows per + are returned. The API returns a maximum of 250,000 rows per request, no matter how many you ask for. ``limit`` must be positive. @@ -246,10 +241,18 @@ class RunReportRequest(proto.Message): there is a cohort group in the request the 'cohort' dimension must be present. keep_empty_rows (bool): - If false or unspecified, each row with all - metrics equal to 0 will not be returned. If - true, these rows will be returned if they are - not separately removed by a filter. + If false or unspecified, each row with all metrics equal to + 0 will not be returned. If true, these rows will be returned + if they are not separately removed by a filter. + + Regardless of this ``keep_empty_rows`` setting, only data + recorded by the Google Analytics (GA4) property can be + displayed in a report. + + For example if a property never logs a ``purchase`` event, + then a query for the ``eventName`` dimension and + ``eventCount`` metric will not have a row eventName: + "purchase" and eventCount: 0. return_property_quota (bool): Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in @@ -473,10 +476,18 @@ class RunPivotReportRequest(proto.Message): there is a cohort group in the request the 'cohort' dimension must be present. keep_empty_rows (bool): - If false or unspecified, each row with all - metrics equal to 0 will not be returned. If - true, these rows will be returned if they are - not separately removed by a filter. + If false or unspecified, each row with all metrics equal to + 0 will not be returned. If true, these rows will be returned + if they are not separately removed by a filter. + + Regardless of this ``keep_empty_rows`` setting, only data + recorded by the Google Analytics (GA4) property can be + displayed in a report. + + For example if a property never logs a ``purchase`` event, + then a query for the ``eventName`` dimension and + ``eventCount`` metric will not have a row eventName: + "purchase" and eventCount: 0. return_property_quota (bool): Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in @@ -814,7 +825,7 @@ class RunRealtimeReportRequest(proto.Message): Dimensions cannot be used in this filter. limit (int): The number of rows to return. If unspecified, 10,000 rows - are returned. The API returns a maximum of 100,000 rows per + are returned. The API returns a maximum of 250,000 rows per request, no matter how many you ask for. ``limit`` must be positive. diff --git a/google/analytics/data_v1beta/types/data.py b/google/analytics/data_v1beta/types/data.py index 5e899bff..c78d4240 100644 --- a/google/analytics/data_v1beta/types/data.py +++ b/google/analytics/data_v1beta/types/data.py @@ -175,9 +175,8 @@ class Compatibility(proto.Enum): class DateRange(proto.Message): - r"""A contiguous set of days: startDate, startDate + 1, ..., - endDate. Requests - are allowed up to 4 date ranges. + r"""A contiguous set of days: ``startDate``, ``startDate + 1``, ..., + ``endDate``. Requests are allowed up to 4 date ranges. Attributes: start_date (str): @@ -215,9 +214,9 @@ class DateRange(proto.Message): class MinuteRange(proto.Message): - r"""A contiguous set of minutes: startMinutesAgo, startMinutesAgo - + 1, ..., - endMinutesAgo. Requests are allowed up to 2 minute ranges. + r"""A contiguous set of minutes: ``startMinutesAgo``, + ``startMinutesAgo + 1``, ..., ``endMinutesAgo``. Requests are + allowed up to 2 minute ranges. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -945,7 +944,7 @@ class Pivot(proto.Message): ``limit`` of 10,000 is common for single pivot requests. The product of the ``limit`` for each ``pivot`` in a - ``RunPivotReportRequest`` must not exceed 100,000. For + ``RunPivotReportRequest`` must not exceed 250,000. For example, a two pivot request with ``limit: 1000`` in each pivot will fail because the product is ``1,000,000``. metric_aggregations (MutableSequence[google.analytics.data_v1beta.types.MetricAggregation]): @@ -1196,9 +1195,23 @@ class ResponseMetaData(proto.Message): Attributes: data_loss_from_other_row (bool): - If true, indicates some buckets of dimension - combinations are rolled into "(other)" row. This - can happen for high cardinality reports. + If true, indicates some buckets of dimension combinations + are rolled into "(other)" row. This can happen for high + cardinality reports. + + The metadata parameter dataLossFromOtherRow is populated + based on the aggregated data table used in the report. The + parameter will be accurately populated regardless of the + filters and limits in the report. + + For example, the (other) row could be dropped from the + report because the request contains a filter on + sessionSource = google. This parameter will still be + populated if data loss from other row was present in the + input aggregate data used to generate this report. + + To learn more, see `About the (other) row and data + sampling `__. schema_restriction_response (google.analytics.data_v1beta.types.ResponseMetaData.SchemaRestrictionResponse): Describes the schema restrictions actively enforced in creating this report. To learn more, see `Access and @@ -1552,13 +1565,13 @@ class PropertyQuota(proto.Message): Attributes: tokens_per_day (google.analytics.data_v1beta.types.QuotaStatus): Standard Analytics Properties can use up to - 25,000 tokens per day; Analytics 360 Properties - can use 250,000 tokens per day. Most requests + 200,000 tokens per day; Analytics 360 Properties + can use 2,000,000 tokens per day. Most requests consume fewer than 10 tokens. tokens_per_hour (google.analytics.data_v1beta.types.QuotaStatus): Standard Analytics Properties can use up to - 5,000 tokens per hour; Analytics 360 Properties - can use 50,000 tokens per hour. An API request + 40,000 tokens per hour; Analytics 360 Properties + can use 400,000 tokens per hour. An API request consumes a single number of tokens, and that number is deducted from all of the hourly, daily, and per project hourly quotas. @@ -1580,15 +1593,15 @@ class PropertyQuota(proto.Message): if the request contains potentially thresholded dimensions. tokens_per_project_per_hour (google.analytics.data_v1beta.types.QuotaStatus): - Analytics Properties can use up to 25% of + Analytics Properties can use up to 35% of their tokens per project per hour. This amounts to standard Analytics Properties can use up to - 1,250 tokens per project per hour, and Analytics - 360 Properties can use 12,500 tokens per project - per hour. An API request consumes a single - number of tokens, and that number is deducted - from all of the hourly, daily, and per project - hourly quotas. + 14,000 tokens per project per hour, and + Analytics 360 Properties can use 140,000 tokens + per project per hour. An API request consumes a + single number of tokens, and that number is + deducted from all of the hourly, daily, and per + project hourly quotas. """ tokens_per_day: "QuotaStatus" = proto.Field( diff --git a/noxfile.py b/noxfile.py index 7d411fea..40007331 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2018 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ import nox +FLAKE8_VERSION = "flake8==6.1.0" BLACK_VERSION = "black==22.3.0" ISORT_VERSION = "isort==5.10.1" LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] @@ -82,7 +83,7 @@ def lint(session): Returns a failure if the linters find linting errors or sufficiently serious code quality issues. """ - session.install("flake8", BLACK_VERSION) + session.install(FLAKE8_VERSION, BLACK_VERSION) session.run( "black", "--check", @@ -400,6 +401,7 @@ def prerelease_deps(session): "python", "-c", "import google.protobuf; print(google.protobuf.__version__)" ) session.run("python", "-c", "import grpc; print(grpc.__version__)") + session.run("python", "-c", "import google.auth; print(google.auth.__version__)") session.run("py.test", "tests/unit") diff --git a/samples/generated_samples/snippet_metadata_google.analytics.data.v1alpha.json b/samples/generated_samples/snippet_metadata_google.analytics.data.v1alpha.json index 11b5f2e9..8c6b1011 100644 --- a/samples/generated_samples/snippet_metadata_google.analytics.data.v1alpha.json +++ b/samples/generated_samples/snippet_metadata_google.analytics.data.v1alpha.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-analytics-data", - "version": "0.17.0" + "version": "0.17.1" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.analytics.data.v1beta.json b/samples/generated_samples/snippet_metadata_google.analytics.data.v1beta.json index 77327bea..879bda9d 100644 --- a/samples/generated_samples/snippet_metadata_google.analytics.data.v1beta.json +++ b/samples/generated_samples/snippet_metadata_google.analytics.data.v1beta.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-analytics-data", - "version": "0.17.0" + "version": "0.17.1" }, "snippets": [ { diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index cac9d0e4..a3048c48 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1,2 +1,2 @@ -google-analytics-data==0.16.3 +google-analytics-data==0.17.0 google-auth-oauthlib==1.0.0 \ No newline at end of file diff --git a/scripts/decrypt-secrets.sh b/scripts/decrypt-secrets.sh index 21f6d2a2..0018b421 100755 --- a/scripts/decrypt-secrets.sh +++ b/scripts/decrypt-secrets.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 Google Inc. All rights reserved. +# Copyright 2023 Google LLC All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/scripts/readme-gen/readme_gen.py b/scripts/readme-gen/readme_gen.py index 91b59676..1acc1198 100644 --- a/scripts/readme-gen/readme_gen.py +++ b/scripts/readme-gen/readme_gen.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2016 Google Inc +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -33,17 +33,17 @@ autoescape=True, ) -README_TMPL = jinja_env.get_template('README.tmpl.rst') +README_TMPL = jinja_env.get_template("README.tmpl.rst") def get_help(file): - return subprocess.check_output(['python', file, '--help']).decode() + return subprocess.check_output(["python", file, "--help"]).decode() def main(): parser = argparse.ArgumentParser() - parser.add_argument('source') - parser.add_argument('--destination', default='README.rst') + parser.add_argument("source") + parser.add_argument("--destination", default="README.rst") args = parser.parse_args() @@ -51,9 +51,9 @@ def main(): root = os.path.dirname(source) destination = os.path.join(root, args.destination) - jinja_env.globals['get_help'] = get_help + jinja_env.globals["get_help"] = get_help - with io.open(source, 'r') as f: + with io.open(source, "r") as f: config = yaml.load(f) # This allows get_help to execute in the right directory. @@ -61,9 +61,9 @@ def main(): output = README_TMPL.render(config) - with io.open(destination, 'w') as f: + with io.open(destination, "w") as f: f.write(output) -if __name__ == '__main__': +if __name__ == "__main__": main() diff --git a/setup.cfg b/setup.cfg index c3a2b39f..05235008 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.