google-cloud-dataform 0.5.14__tar.gz → 0.5.16__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. {google_cloud_dataform-0.5.14/google_cloud_dataform.egg-info → google_cloud_dataform-0.5.16}/PKG-INFO +4 -4
  2. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/README.rst +2 -2
  3. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google/cloud/dataform/gapic_version.py +1 -1
  4. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google/cloud/dataform_v1beta1/gapic_version.py +1 -1
  5. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google/cloud/dataform_v1beta1/services/dataform/client.py +94 -45
  6. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google/cloud/dataform_v1beta1/services/dataform/transports/rest.py +1153 -76
  7. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16/google_cloud_dataform.egg-info}/PKG-INFO +4 -4
  8. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google_cloud_dataform.egg-info/requires.txt +1 -1
  9. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/setup.py +1 -1
  10. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/tests/unit/gapic/dataform_v1beta1/test_dataform.py +295 -0
  11. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/LICENSE +0 -0
  12. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/MANIFEST.in +0 -0
  13. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google/cloud/dataform/__init__.py +0 -0
  14. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google/cloud/dataform/py.typed +0 -0
  15. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google/cloud/dataform_v1beta1/__init__.py +0 -0
  16. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google/cloud/dataform_v1beta1/gapic_metadata.json +0 -0
  17. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google/cloud/dataform_v1beta1/py.typed +0 -0
  18. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google/cloud/dataform_v1beta1/services/__init__.py +0 -0
  19. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google/cloud/dataform_v1beta1/services/dataform/__init__.py +0 -0
  20. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google/cloud/dataform_v1beta1/services/dataform/async_client.py +0 -0
  21. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google/cloud/dataform_v1beta1/services/dataform/pagers.py +0 -0
  22. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google/cloud/dataform_v1beta1/services/dataform/transports/__init__.py +0 -0
  23. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google/cloud/dataform_v1beta1/services/dataform/transports/base.py +0 -0
  24. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google/cloud/dataform_v1beta1/services/dataform/transports/grpc.py +0 -0
  25. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google/cloud/dataform_v1beta1/services/dataform/transports/grpc_asyncio.py +0 -0
  26. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google/cloud/dataform_v1beta1/services/dataform/transports/rest_base.py +0 -0
  27. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google/cloud/dataform_v1beta1/types/__init__.py +0 -0
  28. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google/cloud/dataform_v1beta1/types/dataform.py +0 -0
  29. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google_cloud_dataform.egg-info/SOURCES.txt +0 -0
  30. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google_cloud_dataform.egg-info/dependency_links.txt +0 -0
  31. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google_cloud_dataform.egg-info/not-zip-safe +0 -0
  32. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/google_cloud_dataform.egg-info/top_level.txt +0 -0
  33. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/setup.cfg +0 -0
  34. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/tests/__init__.py +0 -0
  35. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/tests/unit/__init__.py +0 -0
  36. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/tests/unit/gapic/__init__.py +0 -0
  37. {google_cloud_dataform-0.5.14 → google_cloud_dataform-0.5.16}/tests/unit/gapic/dataform_v1beta1/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: google-cloud-dataform
3
- Version: 0.5.14
3
+ Version: 0.5.16
4
4
  Summary: Google Cloud Dataform API client library
5
5
  Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-dataform
6
6
  Author: Google LLC
@@ -28,7 +28,7 @@ Requires-Dist: google-auth!=2.24.0,!=2.25.0,<3.0.0dev,>=2.14.1
28
28
  Requires-Dist: proto-plus<2.0.0dev,>=1.22.3
29
29
  Requires-Dist: proto-plus<2.0.0dev,>=1.25.0; python_version >= "3.13"
30
30
  Requires-Dist: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<6.0.0dev,>=3.20.2
31
- Requires-Dist: grpc-google-iam-v1<1.0.0dev,>=0.12.4
31
+ Requires-Dist: grpc-google-iam-v1<1.0.0dev,>=0.14.0
32
32
 
33
33
  Python Client for Cloud Dataform
34
34
  ================================
@@ -58,12 +58,12 @@ In order to use this library, you first need to go through the following steps:
58
58
  1. `Select or create a Cloud Platform project.`_
59
59
  2. `Enable billing for your project.`_
60
60
  3. `Enable the Cloud Dataform.`_
61
- 4. `Setup Authentication.`_
61
+ 4. `Set up Authentication.`_
62
62
 
63
63
  .. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
64
64
  .. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
65
65
  .. _Enable the Cloud Dataform.: https://cloud.google.com
66
- .. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
66
+ .. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
67
67
 
68
68
  Installation
69
69
  ~~~~~~~~~~~~
@@ -26,12 +26,12 @@ In order to use this library, you first need to go through the following steps:
26
26
  1. `Select or create a Cloud Platform project.`_
27
27
  2. `Enable billing for your project.`_
28
28
  3. `Enable the Cloud Dataform.`_
29
- 4. `Setup Authentication.`_
29
+ 4. `Set up Authentication.`_
30
30
 
31
31
  .. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
32
32
  .. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
33
33
  .. _Enable the Cloud Dataform.: https://cloud.google.com
34
- .. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
34
+ .. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
35
35
 
36
36
  Installation
37
37
  ~~~~~~~~~~~~
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- __version__ = "0.5.14" # {x-release-please-version}
16
+ __version__ = "0.5.16" # {x-release-please-version}
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- __version__ = "0.5.14" # {x-release-please-version}
16
+ __version__ = "0.5.16" # {x-release-please-version}
@@ -14,6 +14,8 @@
14
14
  # limitations under the License.
15
15
  #
16
16
  from collections import OrderedDict
17
+ from http import HTTPStatus
18
+ import json
17
19
  import logging as std_logging
18
20
  import os
19
21
  import re
@@ -634,6 +636,33 @@ class DataformClient(metaclass=DataformClientMeta):
634
636
  # NOTE (b/349488459): universe validation is disabled until further notice.
635
637
  return True
636
638
 
639
+ def _add_cred_info_for_auth_errors(
640
+ self, error: core_exceptions.GoogleAPICallError
641
+ ) -> None:
642
+ """Adds credential info string to error details for 401/403/404 errors.
643
+
644
+ Args:
645
+ error (google.api_core.exceptions.GoogleAPICallError): The error to add the cred info.
646
+ """
647
+ if error.code not in [
648
+ HTTPStatus.UNAUTHORIZED,
649
+ HTTPStatus.FORBIDDEN,
650
+ HTTPStatus.NOT_FOUND,
651
+ ]:
652
+ return
653
+
654
+ cred = self._transport._credentials
655
+
656
+ # get_cred_info is only available in google-auth>=2.35.0
657
+ if not hasattr(cred, "get_cred_info"):
658
+ return
659
+
660
+ # ignore the type check since pypy test fails when get_cred_info
661
+ # is not available
662
+ cred_info = cred.get_cred_info() # type: ignore
663
+ if cred_info and hasattr(error._details, "append"):
664
+ error._details.append(json.dumps(cred_info))
665
+
637
666
  @property
638
667
  def api_endpoint(self):
639
668
  """Return the API endpoint used by the client instance.
@@ -5951,16 +5980,20 @@ class DataformClient(metaclass=DataformClientMeta):
5951
5980
  # Validate the universe domain.
5952
5981
  self._validate_universe_domain()
5953
5982
 
5954
- # Send the request.
5955
- response = rpc(
5956
- request,
5957
- retry=retry,
5958
- timeout=timeout,
5959
- metadata=metadata,
5960
- )
5983
+ try:
5984
+ # Send the request.
5985
+ response = rpc(
5986
+ request,
5987
+ retry=retry,
5988
+ timeout=timeout,
5989
+ metadata=metadata,
5990
+ )
5961
5991
 
5962
- # Done; return the response.
5963
- return response
5992
+ # Done; return the response.
5993
+ return response
5994
+ except core_exceptions.GoogleAPICallError as e:
5995
+ self._add_cred_info_for_auth_errors(e)
5996
+ raise e
5964
5997
 
5965
5998
  def get_iam_policy(
5966
5999
  self,
@@ -6073,16 +6106,20 @@ class DataformClient(metaclass=DataformClientMeta):
6073
6106
  # Validate the universe domain.
6074
6107
  self._validate_universe_domain()
6075
6108
 
6076
- # Send the request.
6077
- response = rpc(
6078
- request,
6079
- retry=retry,
6080
- timeout=timeout,
6081
- metadata=metadata,
6082
- )
6109
+ try:
6110
+ # Send the request.
6111
+ response = rpc(
6112
+ request,
6113
+ retry=retry,
6114
+ timeout=timeout,
6115
+ metadata=metadata,
6116
+ )
6083
6117
 
6084
- # Done; return the response.
6085
- return response
6118
+ # Done; return the response.
6119
+ return response
6120
+ except core_exceptions.GoogleAPICallError as e:
6121
+ self._add_cred_info_for_auth_errors(e)
6122
+ raise e
6086
6123
 
6087
6124
  def test_iam_permissions(
6088
6125
  self,
@@ -6133,16 +6170,20 @@ class DataformClient(metaclass=DataformClientMeta):
6133
6170
  # Validate the universe domain.
6134
6171
  self._validate_universe_domain()
6135
6172
 
6136
- # Send the request.
6137
- response = rpc(
6138
- request,
6139
- retry=retry,
6140
- timeout=timeout,
6141
- metadata=metadata,
6142
- )
6173
+ try:
6174
+ # Send the request.
6175
+ response = rpc(
6176
+ request,
6177
+ retry=retry,
6178
+ timeout=timeout,
6179
+ metadata=metadata,
6180
+ )
6143
6181
 
6144
- # Done; return the response.
6145
- return response
6182
+ # Done; return the response.
6183
+ return response
6184
+ except core_exceptions.GoogleAPICallError as e:
6185
+ self._add_cred_info_for_auth_errors(e)
6186
+ raise e
6146
6187
 
6147
6188
  def get_location(
6148
6189
  self,
@@ -6188,16 +6229,20 @@ class DataformClient(metaclass=DataformClientMeta):
6188
6229
  # Validate the universe domain.
6189
6230
  self._validate_universe_domain()
6190
6231
 
6191
- # Send the request.
6192
- response = rpc(
6193
- request,
6194
- retry=retry,
6195
- timeout=timeout,
6196
- metadata=metadata,
6197
- )
6232
+ try:
6233
+ # Send the request.
6234
+ response = rpc(
6235
+ request,
6236
+ retry=retry,
6237
+ timeout=timeout,
6238
+ metadata=metadata,
6239
+ )
6198
6240
 
6199
- # Done; return the response.
6200
- return response
6241
+ # Done; return the response.
6242
+ return response
6243
+ except core_exceptions.GoogleAPICallError as e:
6244
+ self._add_cred_info_for_auth_errors(e)
6245
+ raise e
6201
6246
 
6202
6247
  def list_locations(
6203
6248
  self,
@@ -6243,16 +6288,20 @@ class DataformClient(metaclass=DataformClientMeta):
6243
6288
  # Validate the universe domain.
6244
6289
  self._validate_universe_domain()
6245
6290
 
6246
- # Send the request.
6247
- response = rpc(
6248
- request,
6249
- retry=retry,
6250
- timeout=timeout,
6251
- metadata=metadata,
6252
- )
6291
+ try:
6292
+ # Send the request.
6293
+ response = rpc(
6294
+ request,
6295
+ retry=retry,
6296
+ timeout=timeout,
6297
+ metadata=metadata,
6298
+ )
6253
6299
 
6254
- # Done; return the response.
6255
- return response
6300
+ # Done; return the response.
6301
+ return response
6302
+ except core_exceptions.GoogleAPICallError as e:
6303
+ self._add_cred_info_for_auth_errors(e)
6304
+ raise e
6256
6305
 
6257
6306
 
6258
6307
  DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(