Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
branch = True

[report]
fail_under = 100
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would we be removing this requirement?

show_missing = True
omit =
google/cloud/bigquery/__init__.py
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ repos:
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.0
rev: 3.9.1
hooks:
- id: flake8
16 changes: 1 addition & 15 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,21 +160,7 @@ Running System Tests
auth settings and change some configuration in your project to
run all the tests.

- System tests will be run against an actual project and
so you'll need to provide some environment variables to facilitate
authentication to your project:

- ``GOOGLE_APPLICATION_CREDENTIALS``: The path to a JSON key file;
Such a file can be downloaded directly from the developer's console by clicking
"Generate new JSON key". See private key
`docs <https://cloud.google.com/storage/docs/authentication#generating-a-private-key>`__
for more details.

- Once you have downloaded your json keys, set the environment variable
``GOOGLE_APPLICATION_CREDENTIALS`` to the absolute path of the json file::

$ export GOOGLE_APPLICATION_CREDENTIALS="/Users/<your_username>/path/to/app_credentials.json"

- System tests will be run against an actual project. You should use local credentials from gcloud when possible. See `Best practices for application authentication <https://cloud.google.com/docs/authentication/best-practices-applications#local_development_and_testing_with_the>`__. Some tests require a service account. For those tests see `Authenticating as a service account <https://cloud.google.com/docs/authentication/production>`__.

*************
Test Coverage
Expand Down
6 changes: 5 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,13 @@
intersphinx_mapping = {
"python": ("https://python.readthedocs.org/en/latest/", None),
"google-auth": ("https://googleapis.dev/python/google-auth/latest/", None),
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
"google.api_core": (
"https://googleapis.dev/python/google-api-core/latest/",
None,
),
"grpc": ("https://grpc.github.io/grpc/python/", None),
"proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None),

}


Expand Down
14 changes: 14 additions & 0 deletions examples/feature_fragments
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@













}
29 changes: 15 additions & 14 deletions google/cloud/bigquery_v2/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -16,6 +15,8 @@
#


from .services.model_service import ModelServiceAsyncClient

from .types.encryption_config import EncryptionConfiguration
from .types.model import DeleteModelRequest
from .types.model import GetModelRequest
Expand All @@ -29,18 +30,18 @@
from .types.standard_sql import StandardSqlStructType
from .types.table_reference import TableReference


__all__ = (
"DeleteModelRequest",
"EncryptionConfiguration",
"GetModelRequest",
"ListModelsRequest",
"ListModelsResponse",
"Model",
"ModelReference",
"PatchModelRequest",
"StandardSqlDataType",
"StandardSqlField",
"StandardSqlStructType",
"TableReference",
'DeleteModelRequest',
'EncryptionConfiguration',
'GetModelRequest',
'ListModelsRequest',
'ListModelsResponse',
'Model',
'ModelReference',

'PatchModelRequest',
'StandardSqlDataType',
'StandardSqlField',
'StandardSqlStructType',
'TableReference',
)
63 changes: 63 additions & 0 deletions google/cloud/bigquery_v2/gapic_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
"language": "python",
"libraryPackage": "google.cloud.bigquery_v2",
"protoPackage": "google.cloud.bigquery.v2",
"schema": "1.0",
"services": {
"ModelService": {
"clients": {
"grpc": {
"libraryClient": "ModelServiceClient",
"rpcs": {
"DeleteModel": {
"methods": [
"delete_model"
]
},
"GetModel": {
"methods": [
"get_model"
]
},
"ListModels": {
"methods": [
"list_models"
]
},
"PatchModel": {
"methods": [
"patch_model"
]
}
}
},
"grpc-async": {
"libraryClient": "ModelServiceAsyncClient",
"rpcs": {
"DeleteModel": {
"methods": [
"delete_model"
]
},
"GetModel": {
"methods": [
"get_model"
]
},
"ListModels": {
"methods": [
"list_models"
]
},
"PatchModel": {
"methods": [
"patch_model"
]
}
}
}
}
}
}
}
38 changes: 21 additions & 17 deletions google/cloud/bigquery_v2/types/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -14,8 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

from .encryption_config import EncryptionConfiguration
from .encryption_config import (
EncryptionConfiguration,
)
from .model import (
DeleteModelRequest,
GetModelRequest,
Expand All @@ -24,25 +24,29 @@
Model,
PatchModelRequest,
)
from .model_reference import ModelReference
from .model_reference import (
ModelReference,
)
from .standard_sql import (
StandardSqlDataType,
StandardSqlField,
StandardSqlStructType,
)
from .table_reference import TableReference
from .table_reference import (
TableReference,
)

__all__ = (
"EncryptionConfiguration",
"DeleteModelRequest",
"GetModelRequest",
"ListModelsRequest",
"ListModelsResponse",
"Model",
"PatchModelRequest",
"ModelReference",
"StandardSqlDataType",
"StandardSqlField",
"StandardSqlStructType",
"TableReference",
'EncryptionConfiguration',
'DeleteModelRequest',
'GetModelRequest',
'ListModelsRequest',
'ListModelsResponse',
'Model',
'PatchModelRequest',
'ModelReference',
'StandardSqlDataType',
'StandardSqlField',
'StandardSqlStructType',
'TableReference',
)
17 changes: 10 additions & 7 deletions google/cloud/bigquery_v2/types/encryption_config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -14,21 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

import proto # type: ignore


from google.protobuf import wrappers_pb2 as wrappers # type: ignore
from google.protobuf import wrappers_pb2 # type: ignore


__protobuf__ = proto.module(
package="google.cloud.bigquery.v2", manifest={"EncryptionConfiguration",},
package='google.cloud.bigquery.v2',
manifest={
'EncryptionConfiguration',
},
)


class EncryptionConfiguration(proto.Message):
r"""

Attributes:
kms_key_name (google.protobuf.wrappers_pb2.StringValue):
Optional. Describes the Cloud KMS encryption
Expand All @@ -38,7 +37,11 @@ class EncryptionConfiguration(proto.Message):
this encryption key.
"""

kms_key_name = proto.Field(proto.MESSAGE, number=1, message=wrappers.StringValue,)
kms_key_name = proto.Field(
proto.MESSAGE,
number=1,
message=wrappers_pb2.StringValue,
)


__all__ = tuple(sorted(__protobuf__.manifest))
Loading