From 18ff9ad3cbb73333805deff01488e9a13e5165b1 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Mon, 17 May 2021 10:42:52 -0400 Subject: [PATCH] chore: migrate to owl bot (#158) This PR migrates from autosynth to owl bot. owl bot will save time for maintainers as it will automatically open PRs when there are updates in googleapis-gen without requiring maintainers to run synthtool to build the client from protos. Additionally, similar to autosynth, PRs will be automatically opened when there are template updates. --- speech/microphone/noxfile.py | 10 ++++++++-- speech/snippets/noxfile.py | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/speech/microphone/noxfile.py b/speech/microphone/noxfile.py index 97bf7da80e39..956cdf4f9250 100644 --- a/speech/microphone/noxfile.py +++ b/speech/microphone/noxfile.py @@ -172,10 +172,16 @@ def blacken(session: nox.sessions.Session) -> None: def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None: """Runs py.test for a particular project.""" if os.path.exists("requirements.txt"): - session.install("-r", "requirements.txt") + if os.path.exists("constraints.txt"): + session.install("-r", "requirements.txt", "-c", "constraints.txt") + else: + session.install("-r", "requirements.txt") if os.path.exists("requirements-test.txt"): - session.install("-r", "requirements-test.txt") + if os.path.exists("constraints-test.txt"): + session.install("-r", "requirements-test.txt", "-c", "constraints-test.txt") + else: + session.install("-r", "requirements-test.txt") if INSTALL_LIBRARY_FROM_SOURCE: session.install("-e", _get_repo_root()) diff --git a/speech/snippets/noxfile.py b/speech/snippets/noxfile.py index 97bf7da80e39..956cdf4f9250 100644 --- a/speech/snippets/noxfile.py +++ b/speech/snippets/noxfile.py @@ -172,10 +172,16 @@ def blacken(session: nox.sessions.Session) -> None: def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None: """Runs py.test for a particular project.""" if os.path.exists("requirements.txt"): - session.install("-r", "requirements.txt") + if os.path.exists("constraints.txt"): + session.install("-r", "requirements.txt", "-c", "constraints.txt") + else: + session.install("-r", "requirements.txt") if os.path.exists("requirements-test.txt"): - session.install("-r", "requirements-test.txt") + if os.path.exists("constraints-test.txt"): + session.install("-r", "requirements-test.txt", "-c", "constraints-test.txt") + else: + session.install("-r", "requirements-test.txt") if INSTALL_LIBRARY_FROM_SOURCE: session.install("-e", _get_repo_root())