Skip to content

Commit

Permalink
Fix dist name used to compute 'gapic_version'. (#8100)
Browse files Browse the repository at this point in the history
Closes #8098.
  • Loading branch information
tseaver authored May 22, 2019
1 parent ec5ffe8 commit 0d82928
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 8 deletions.
7 changes: 7 additions & 0 deletions packages/google-cloud-phishing-protection/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
autodoc_default_flags = ["members"]
autosummary_generate = True


# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

Expand Down Expand Up @@ -121,6 +122,7 @@
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True


# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
Expand Down Expand Up @@ -229,6 +231,7 @@

# -- Options for warnings ------------------------------------------------------


suppress_warnings = [
# Temporarily suppress this to avoid "more than one target found for
# cross-reference" warning, which are intractable for us to avoid while in
Expand Down Expand Up @@ -284,6 +287,7 @@
# If false, no module index is generated.
# latex_domain_indices = True


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
Expand All @@ -301,6 +305,7 @@
# If true, show URL addresses after external links.
# man_show_urls = False


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
Expand Down Expand Up @@ -330,6 +335,7 @@
# If true, do not generate a @detailmenu in the "Top" node's menu.
# texinfo_no_detailmenu = False


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"python": ("http://python.readthedocs.org/en/latest/", None),
Expand All @@ -346,6 +352,7 @@
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
}


# Napoleon settings
napoleon_google_docstring = True
napoleon_numpy_docstring = True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import absolute_import

from google.cloud.phishingprotection_v1beta1 import PhishingProtectionServiceClient
from google.cloud.phishingprotection_v1beta1 import types


__all__ = ("types", "PhishingProtectionServiceClient")
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import absolute_import

from google.cloud.phishingprotection_v1beta1 import types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# 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.

"""Accesses the google.cloud.phishingprotection.v1beta1 PhishingProtectionServiceV1Beta1 API."""

import pkg_resources
Expand All @@ -36,8 +37,9 @@
from google.cloud.phishingprotection_v1beta1.proto import phishingprotection_pb2
from google.cloud.phishingprotection_v1beta1.proto import phishingprotection_pb2_grpc


_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution(
"google-cloud-phishingprotection"
"google-cloud-phishing-protection"
).version


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
config = {
"interfaces": {
"google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1": {
"retry_codes": {"idempotent": ["UNAVAILABLE"], "non_idempotent": []},
"retry_codes": {
"idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"],
"non_idempotent": [],
},
"retry_params": {
"default": {
"initial_retry_delay_millis": 100,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


import google.api_core.grpc_helpers

from google.cloud.phishingprotection_v1beta1.proto import phishingprotection_pb2_grpc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import absolute_import
import sys

from google.api_core.protobuf_helpers import get_messages

from google.cloud.phishingprotection_v1beta1.proto import phishingprotection_pb2


_shared_modules = []

_local_modules = [phishingprotection_pb2]

names = []

for module in _shared_modules:
for module in _shared_modules: # pragma: NO COVER
for name, message in get_messages(module).items():
setattr(sys.modules[__name__], name, message)
names.append(name)
Expand All @@ -37,4 +39,5 @@
setattr(sys.modules[__name__], name, message)
names.append(name)


__all__ = tuple(sorted(names))
10 changes: 5 additions & 5 deletions packages/google-cloud-phishing-protection/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-05-08T12:24:28.560729Z",
"updateTime": "2019-05-22T17:24:42.783033Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.19.0",
"dockerImage": "googleapis/artman@sha256:d3df563538225ac6caac45d8ad86499500211d1bcb2536955a6dbda15e1b368e"
"version": "0.20.0",
"dockerImage": "googleapis/artman@sha256:3246adac900f4bdbd62920e80de2e5877380e44036b3feae13667ec255ebf5ec"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "51145ff7812d2bb44c1219d0b76dac92a8bd94b2",
"internalRef": "247143125"
"sha": "9fd48dcb59a5fba8464e6dbe6f4c6ca90c7efbaf",
"internalRef": "249470705"
}
},
{
Expand Down
6 changes: 6 additions & 0 deletions packages/google-cloud-phishing-protection/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@
"tests/unit/gapic/v1beta1/test_phishing_protection_service_v1_beta1_client_v1beta1.py"
)

s.replace(
client,
"google-cloud-phishingprotection",
"google-cloud-phishing-protection",
)

files = [client, client_config, transport, unit_test]
for file_ in files:
new_name = str(file_).replace("v1_beta1_", "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# 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.

"""Unit tests."""

import mock
Expand Down

0 comments on commit 0d82928

Please sign in to comment.