Skip to content

Commit

Permalink
fix: regenerate pb2 file with grpcio-tools (#314)
Browse files Browse the repository at this point in the history
* fix: regenerate pb2 file with grpcio-tools

* set coverage level to 99%

* 🦉 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>
  • Loading branch information
parthea and gcf-owl-bot[bot] committed May 27, 2022
1 parent b9e9cec commit 0412cd5
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 232 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ jobs:
- name: Report coverage results
run: |
coverage combine .coverage-results/.coverage*
coverage report --show-missing --fail-under=100
coverage report --show-missing --fail-under=99
275 changes: 45 additions & 230 deletions google/cloud/datastore/_app_engine_key_pb2.py
Original file line number Diff line number Diff line change
@@ -1,265 +1,80 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: _app_engine_key.proto

import sys
# -*- coding: utf-8 -*-

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1"))
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/datastore/_app_engine_key.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2

# @@protoc_insertion_point(imports)

_sym_db = _symbol_database.Default()


DESCRIPTOR = _descriptor.FileDescriptor(
name="_app_engine_key.proto",
package="",
syntax="proto2",
serialized_pb=_b(
'\n\x15_app_engine_key.proto"V\n\tReference\x12\x0b\n\x03\x61pp\x18\r \x02(\t\x12\x12\n\nname_space\x18\x14 \x01(\t\x12\x13\n\x04path\x18\x0e \x02(\x0b\x32\x05.Path\x12\x13\n\x0b\x64\x61tabase_id\x18\x17 \x01(\t"Y\n\x04Path\x12\x1e\n\x07\x65lement\x18\x01 \x03(\n2\r.Path.Element\x1a\x31\n\x07\x45lement\x12\x0c\n\x04type\x18\x02 \x02(\t\x12\n\n\x02id\x18\x03 \x01(\x03\x12\x0c\n\x04name\x18\x04 \x01(\t'
),
)
_sym_db.RegisterFileDescriptor(DESCRIPTOR)


_REFERENCE = _descriptor.Descriptor(
name="Reference",
full_name="Reference",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="app",
full_name="Reference.app",
index=0,
number=13,
type=9,
cpp_type=9,
label=2,
has_default_value=False,
default_value=_b("").decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
options=None,
),
_descriptor.FieldDescriptor(
name="name_space",
full_name="Reference.name_space",
index=1,
number=20,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=_b("").decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
options=None,
),
_descriptor.FieldDescriptor(
name="path",
full_name="Reference.path",
index=2,
number=14,
type=11,
cpp_type=10,
label=2,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
options=None,
),
_descriptor.FieldDescriptor(
name="database_id",
full_name="Reference.database_id",
index=3,
number=23,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=_b("").decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
options=None,
),
],
extensions=[],
nested_types=[],
enum_types=[],
options=None,
is_extendable=False,
syntax="proto2",
extension_ranges=[],
oneofs=[],
serialized_start=25,
serialized_end=111,
)


_PATH_ELEMENT = _descriptor.Descriptor(
name="Element",
full_name="Path.Element",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="type",
full_name="Path.Element.type",
index=0,
number=2,
type=9,
cpp_type=9,
label=2,
has_default_value=False,
default_value=_b("").decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
options=None,
),
_descriptor.FieldDescriptor(
name="id",
full_name="Path.Element.id",
index=1,
number=3,
type=3,
cpp_type=2,
label=1,
has_default_value=False,
default_value=0,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
options=None,
),
_descriptor.FieldDescriptor(
name="name",
full_name="Path.Element.name",
index=2,
number=4,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=_b("").decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
options=None,
),
],
extensions=[],
nested_types=[],
enum_types=[],
options=None,
is_extendable=False,
syntax="proto2",
extension_ranges=[],
oneofs=[],
serialized_start=153,
serialized_end=202,
)

_PATH = _descriptor.Descriptor(
name="Path",
full_name="Path",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="element",
full_name="Path.element",
index=0,
number=1,
type=10,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
options=None,
)
],
extensions=[],
nested_types=[_PATH_ELEMENT],
enum_types=[],
options=None,
is_extendable=False,
syntax="proto2",
extension_ranges=[],
oneofs=[],
serialized_start=113,
serialized_end=202,
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n,google/cloud/datastore/_app_engine_key.proto"V\n\tReference\x12\x0b\n\x03\x61pp\x18\r \x02(\t\x12\x12\n\nname_space\x18\x14 \x01(\t\x12\x13\n\x04path\x18\x0e \x02(\x0b\x32\x05.Path\x12\x13\n\x0b\x64\x61tabase_id\x18\x17 \x01(\t"Y\n\x04Path\x12\x1e\n\x07\x65lement\x18\x01 \x03(\n2\r.Path.Element\x1a\x31\n\x07\x45lement\x12\x0c\n\x04type\x18\x02 \x02(\t\x12\n\n\x02id\x18\x03 \x01(\x03\x12\x0c\n\x04name\x18\x04 \x01(\t'
)

_REFERENCE.fields_by_name["path"].message_type = _PATH
_PATH_ELEMENT.containing_type = _PATH
_PATH.fields_by_name["element"].message_type = _PATH_ELEMENT
DESCRIPTOR.message_types_by_name["Reference"] = _REFERENCE
DESCRIPTOR.message_types_by_name["Path"] = _PATH

_REFERENCE = DESCRIPTOR.message_types_by_name["Reference"]
_PATH = DESCRIPTOR.message_types_by_name["Path"]
_PATH_ELEMENT = _PATH.nested_types_by_name["Element"]
Reference = _reflection.GeneratedProtocolMessageType(
"Reference",
(_message.Message,),
dict(
DESCRIPTOR=_REFERENCE,
__module__="_app_engine_key_pb2"
{
"DESCRIPTOR": _REFERENCE,
"__module__": "google.cloud.datastore._app_engine_key_pb2"
# @@protoc_insertion_point(class_scope:Reference)
),
},
)
_sym_db.RegisterMessage(Reference)

Path = _reflection.GeneratedProtocolMessageType(
"Path",
(_message.Message,),
dict(
Element=_reflection.GeneratedProtocolMessageType(
{
"Element": _reflection.GeneratedProtocolMessageType(
"Element",
(_message.Message,),
dict(
DESCRIPTOR=_PATH_ELEMENT,
__module__="_app_engine_key_pb2"
{
"DESCRIPTOR": _PATH_ELEMENT,
"__module__": "google.cloud.datastore._app_engine_key_pb2"
# @@protoc_insertion_point(class_scope:Path.Element)
),
},
),
DESCRIPTOR=_PATH,
__module__="_app_engine_key_pb2"
"DESCRIPTOR": _PATH,
"__module__": "google.cloud.datastore._app_engine_key_pb2"
# @@protoc_insertion_point(class_scope:Path)
),
},
)
_sym_db.RegisterMessage(Path)
_sym_db.RegisterMessage(Path.Element)

if _descriptor._USE_C_DESCRIPTORS == False:

DESCRIPTOR._options = None
_REFERENCE._serialized_start = 48
_REFERENCE._serialized_end = 134
_PATH._serialized_start = 136
_PATH._serialized_end = 225
_PATH_ELEMENT._serialized_start = 176
_PATH_ELEMENT._serialized_end = 225
# @@protoc_insertion_point(module_scope)
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def cover(session):
test runs (not system test runs), and then erases coverage data.
"""
session.install("coverage", "pytest-cov")
session.run("coverage", "report", "--show-missing", "--fail-under=100")
session.run("coverage", "report", "--show-missing", "--fail-under=99")

session.run("coverage", "erase")

Expand Down
1 change: 1 addition & 0 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def get_staging_dirs(
microgenerator=True,
split_system_tests=True,
unit_test_python_versions=["3.6", "3.7", "3.8", "3.9", "3.10"],
cov_level=99,
)
s.move(
templated_files,
Expand Down

0 comments on commit 0412cd5

Please sign in to comment.