Skip to content

Commit 1e967a1

Browse files
fix(deps): Require google-api-core >=1.34.0, >=2.11.0 (#591)
* chore: update to gapic-generator-python 1.5.0 feat: add support for `google.cloud.<api>.__version__` PiperOrigin-RevId: 484665853 Source-Link: googleapis/googleapis@8eb249a Source-Link: https://github.com/googleapis/googleapis-gen/commit/c8aa327b5f478865fc3fd91e3c2768e54e26ad44 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzhhYTMyN2I1ZjQ3ODg2NWZjM2ZkOTFlM2MyNzY4ZTU0ZTI2YWQ0NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update version in gapic_version.py * add .release-please-manifest.json with correct version * set manifest to true in .github/release-please.yml * add release-please-config.json * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: Update to gapic-generator-python 1.6.0 feat(python): Add typing to proto.Message based class attributes feat(python): Snippetgen handling of repeated enum field PiperOrigin-RevId: 487326846 Source-Link: googleapis/googleapis@da380c7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/61ef5762ee6731a0cbbfea22fd0eecee51ab1c8e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjFlZjU3NjJlZTY3MzFhMGNiYmZlYTIyZmQwZWVjZWU1MWFiMWM4ZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: new APIs added to reflect updates to the filestore service - Add ENTERPRISE Tier - Add snapshot APIs: RevertInstance, ListSnapshots, CreateSnapshot, DeleteSnapshot, UpdateSnapshot - Add multi-share APIs: ListShares, GetShare, CreateShare, DeleteShare, UpdateShare - Add ConnectMode to NetworkConfig (for Private Service Access support) - New status codes (SUSPENDED/SUSPENDING, REVERTING/RESUMING) - Add SuspensionReason (for KMS related suspension) - Add new fields to Instance information: max_capacity_gb, capacity_step_size_gb, max_share_count, capacity_gb, multi_share_enabled PiperOrigin-RevId: 487492758 Source-Link: googleapis/googleapis@5be5981 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ab0e217f560cc2c1afc11441c2eab6b6950efd2b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWIwZTIxN2Y1NjBjYzJjMWFmYzExNDQxYzJlYWI2YjY5NTBlZmQyYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update path to snippet metadata json * chore: Update gapic-generator-python to v1.6.1 PiperOrigin-RevId: 488036204 Source-Link: googleapis/googleapis@08f275f Source-Link: https://github.com/googleapis/googleapis-gen/commit/555c0945e60649e38739ae64bc45719cdf72178f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTU1YzA5NDVlNjA2NDllMzg3MzlhZTY0YmM0NTcxOWNkZjcyMTc4ZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: added cx_current_page field to AutomatedAgentReply docs: clarified docs for Sentiment PiperOrigin-RevId: 489494136 Source-Link: googleapis/googleapis@813e2fa Source-Link: https://github.com/googleapis/googleapis-gen/commit/dcf495943f59026b392927c19c652f61bd1f9869 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGNmNDk1OTQzZjU5MDI2YjM5MjkyN2MxOWM2NTJmNjFiZDFmOTg2OSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: added cx_current_page field to AutomatedAgentReply docs: clarified docs for Sentiment PiperOrigin-RevId: 490103678 Source-Link: googleapis/googleapis@8f95a5f Source-Link: https://github.com/googleapis/googleapis-gen/commit/fed1c108dbe9291c14f7f305ca1e8bf2830c9c60 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZmVkMWMxMDhkYmU5MjkxYzE0ZjdmMzA1Y2ExZThiZjI4MzBjOWM2MCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * use templated owlbot.py and setup.py * run nox format session * fix(deps): Require google-api-core >=1.34.0, >=2.11.0 fix: Drop usage of pkg_resources fix: Fix timeout default values docs(samples): Snippetgen should call await on the operation coroutine before calling result PiperOrigin-RevId: 493260409 Source-Link: googleapis/googleapis@fea4387 Source-Link: https://github.com/googleapis/googleapis-gen/commit/387b7344c7529ee44be84e613b19a820508c612b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzg3YjczNDRjNzUyOWVlNDRiZTg0ZTYxM2IxOWE4MjA1MDhjNjEyYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add gapic_version.py Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent 5ef9172 commit 1e967a1

14 files changed

+33
-31
lines changed

dialogflow/analyze_content_stream_test.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import conversation_profile_management
2222
import participant_management
2323

24-
2524
PROJECT_ID = os.getenv("GOOGLE_CLOUD_PROJECT")
2625
AUDIO_FILE_PATH = "{0}/resources/book_a_room.wav".format(
2726
os.path.realpath(os.path.dirname(__file__)),
@@ -37,8 +36,7 @@ def conversation_profile_display_name():
3736
def conversation_profile_id(conversation_profile_display_name):
3837
# Create conversation profile.
3938
response = conversation_profile_management.create_conversation_profile_article_faq(
40-
project_id=PROJECT_ID,
41-
display_name=conversation_profile_display_name
39+
project_id=PROJECT_ID, display_name=conversation_profile_display_name
4240
)
4341
conversation_profile_id = response.name.split("conversationProfiles/")[1].rstrip()
4442

@@ -61,7 +59,9 @@ def conversation_id(conversation_profile_id):
6159
yield conversation_id
6260

6361
# Complete the conversation.
64-
conversation_management.complete_conversation(project_id=PROJECT_ID, conversation_id=conversation_id)
62+
conversation_management.complete_conversation(
63+
project_id=PROJECT_ID, conversation_id=conversation_id
64+
)
6565

6666

6767
@pytest.fixture
@@ -79,7 +79,7 @@ def test_analyze_content_audio_stream(capsys, conversation_id, participant_id):
7979
participant_management.analyze_content_audio_stream(
8080
project_id=PROJECT_ID,
8181
conversation_id=conversation_id,
82-
participant_id=participant_id ,
82+
participant_id=participant_id,
8383
audio_file_path=AUDIO_FILE_PATH,
8484
)
8585
out, _ = capsys.readouterr()

dialogflow/answer_record_management_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626

2727

2828
def test_smart_reply(capsys):
29-
"""Test smart reply feature.
30-
"""
29+
"""Test smart reply feature."""
3130

3231
# Create conversation profile.
3332
conversation_profile_management.create_conversation_profile_smart_reply(

dialogflow/conversation_profile_management.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ def create_conversation_profile_smart_reply(
139139
}
140140
feature_config = {
141141
"suggestion_feature": {"type_": "SMART_REPLY"},
142-
"suggestion_trigger_settings": {"no_small_talk": True, "only_end_user": True, },
142+
"suggestion_trigger_settings": {
143+
"no_small_talk": True,
144+
"only_end_user": True,
145+
},
143146
"query_config": {
144147
"document_query_source": {"documents": [smart_reply_allowlist_name]},
145148
"max_results": 3,

dialogflow/create_document_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import uuid
1919

2020
from google.cloud import dialogflow_v2beta1 as dialogflow
21-
2221
import pytest
2322

2423
import document_management

dialogflow/detect_intent_audio.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ def detect_intent_audio(project_id, session_id, audio_file_path, language_code):
5858
query_input = dialogflow.QueryInput(audio_config=audio_config)
5959

6060
request = dialogflow.DetectIntentRequest(
61-
session=session, query_input=query_input, input_audio=input_audio,
61+
session=session,
62+
query_input=query_input,
63+
input_audio=input_audio,
6264
)
6365
response = session_client.detect_intent(request=request)
6466

dialogflow/document_management.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535

3636
import argparse
3737

38-
3938
KNOWLEDGE_TYPES = [
4039
"KNOWLEDGE_TYPE_UNSPECIFIED",
4140
"FAQ",

dialogflow/list_training_phrases_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818

1919
import list_training_phrases
2020

21-
2221
_, PROJECT_ID = google.auth.default()
2322
INTENT_ID = "7b5bd47e-6dd9-4b45-8624-565862bd2d85"
2423

2524

2625
def test_list_training_phrases(capsys):
2726
training_phrases = list_training_phrases.list_training_phrases(
28-
PROJECT_ID, INTENT_ID,
27+
PROJECT_ID,
28+
INTENT_ID,
2929
)
3030
assert len(training_phrases) >= 9 # Number of training phrases at this point.

dialogflow/noxfile.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
import nox
2424

25-
2625
# WARNING - WARNING - WARNING - WARNING - WARNING
2726
# WARNING - WARNING - WARNING - WARNING - WARNING
2827
# DO NOT EDIT THIS FILE EVER!
@@ -160,6 +159,7 @@ def blacken(session: nox.sessions.Session) -> None:
160159
# format = isort + black
161160
#
162161

162+
163163
@nox.session
164164
def format(session: nox.sessions.Session) -> None:
165165
"""
@@ -187,7 +187,9 @@ def _session_tests(
187187
session: nox.sessions.Session, post_install: Callable = None
188188
) -> None:
189189
# check for presence of tests
190-
test_list = glob.glob("**/*_test.py", recursive=True) + glob.glob("**/test_*.py", recursive=True)
190+
test_list = glob.glob("**/*_test.py", recursive=True) + glob.glob(
191+
"**/test_*.py", recursive=True
192+
)
191193
test_list.extend(glob.glob("**/tests", recursive=True))
192194

193195
if len(test_list) == 0:
@@ -209,9 +211,7 @@ def _session_tests(
209211

210212
if os.path.exists("requirements-test.txt"):
211213
if os.path.exists("constraints-test.txt"):
212-
session.install(
213-
"-r", "requirements-test.txt", "-c", "constraints-test.txt"
214-
)
214+
session.install("-r", "requirements-test.txt", "-c", "constraints-test.txt")
215215
else:
216216
session.install("-r", "requirements-test.txt")
217217
with open("requirements-test.txt") as rtfile:
@@ -224,9 +224,9 @@ def _session_tests(
224224
post_install(session)
225225

226226
if "pytest-parallel" in packages:
227-
concurrent_args.extend(['--workers', 'auto', '--tests-per-worker', 'auto'])
227+
concurrent_args.extend(["--workers", "auto", "--tests-per-worker", "auto"])
228228
elif "pytest-xdist" in packages:
229-
concurrent_args.extend(['-n', 'auto'])
229+
concurrent_args.extend(["-n", "auto"])
230230

231231
session.run(
232232
"pytest",
@@ -256,7 +256,7 @@ def py(session: nox.sessions.Session) -> None:
256256

257257

258258
def _get_repo_root() -> Optional[str]:
259-
""" Returns the root folder of the project. """
259+
"""Returns the root folder of the project."""
260260
# Get root of this repository. Assume we don't have directories nested deeper than 10 items.
261261
p = Path(os.getcwd())
262262
for i in range(10):

dialogflow/participant_management.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ def analyze_content_text(project_id, conversation_id, participant_id, text):
111111
# [END dialogflow_analyze_content_text]
112112

113113
# [START dialogflow_analyze_content_audio_stream]
114-
def analyze_content_audio_stream(project_id, conversation_id, participant_id, audio_file_path):
114+
def analyze_content_audio_stream(
115+
project_id, conversation_id, participant_id, audio_file_path
116+
):
115117
"""Analyze audio content for END_USER
116118
117119
Args:
@@ -156,12 +158,12 @@ def request_generator(audio_config, audio_file_path):
156158

157159
audio_config = dialogflow.InputAudioConfig(
158160
audio_encoding=audio_encoding,
159-
language_code='en-US',
161+
language_code="en-US",
160162
sample_rate_hertz=sample_rate_hertz,
161163
single_utterance=True,
162-
model='phone_call',
164+
model="phone_call",
163165
# Make sure your project is Dialogflow ES ENTERPRISE_TIER in order to "USE_ENHANCED" model.
164-
model_variant='USE_ENHANCED'
166+
model_variant="USE_ENHANCED",
165167
)
166168
requests = request_generator(audio_config, audio_file_path)
167169
responses = client.streaming_analyze_content(requests=requests)
@@ -171,4 +173,5 @@ def request_generator(audio_config, audio_file_path):
171173

172174
print("=" * 20)
173175

176+
174177
# [END dialogflow_analyze_content_audio_stream]

dialogflow/participant_management_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727

2828

2929
def test_analyze_content_text(capsys):
30-
"""Test analyze content api with text only messages.
31-
"""
30+
"""Test analyze content api with text only messages."""
3231
# Create knowledge base.
3332
knowledge_base_management.create_knowledge_base(
3433
PROJECT_ID, KNOWLEDGE_BASE_DISPLAY_NAME

dialogflow/set_agent.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414

1515
# [START dialogflow_set_agent_sample]
1616

17-
from google.cloud.dialogflow_v2 import Agent
18-
from google.cloud.dialogflow_v2 import AgentsClient
17+
from google.cloud.dialogflow_v2 import Agent, AgentsClient
1918

2019

2120
def set_agent(project_id, display_name):

dialogflow/set_agent_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import os
1616

1717
from google.api_core.exceptions import InvalidArgument
18-
1918
import pytest
2019

2120
from set_agent import set_agent

dialogflow/update_intent_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
from google.cloud.dialogflow_v2.services.agents.client import AgentsClient
1919
from google.cloud.dialogflow_v2.services.intents.client import IntentsClient
2020
from google.cloud.dialogflow_v2.types.intent import Intent
21-
2221
import pytest
2322

2423
from update_intent import update_intent

dialogflow/webhook.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
# TODO: change the default Entry Point text to handleWebhook
1919

20+
2021
def handleWebhook(request):
2122

2223
req = request.get_json()

0 commit comments

Comments
 (0)