Skip to content

Commit 87b8ae5

Browse files
renovate-botpartheagcf-owl-bot[bot]
authored
chore(deps): update all dependencies (#285)
* chore(deps): update all dependencies * exclude python 3.6 from samples that require pillow9.0.0 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Anthonios Partheniou <[email protected]> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 1af94f0 commit 87b8ae5

File tree

15 files changed

+303
-278
lines changed

15 files changed

+303
-278
lines changed

vision/snippets/crop_hints/noxfile.py

Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
from __future__ import print_function
1616

17-
import glob
1817
import os
1918
from pathlib import Path
2019
import sys
@@ -185,44 +184,37 @@ def blacken(session: nox.sessions.Session) -> None:
185184
def _session_tests(
186185
session: nox.sessions.Session, post_install: Callable = None
187186
) -> None:
188-
# check for presence of tests
189-
test_list = glob.glob("*_test.py") + glob.glob("test_*.py")
190-
if len(test_list) == 0:
191-
print("No tests found, skipping directory.")
192-
else:
193-
if TEST_CONFIG["pip_version_override"]:
194-
pip_version = TEST_CONFIG["pip_version_override"]
195-
session.install(f"pip=={pip_version}")
196-
"""Runs py.test for a particular project."""
197-
if os.path.exists("requirements.txt"):
198-
if os.path.exists("constraints.txt"):
199-
session.install("-r", "requirements.txt", "-c", "constraints.txt")
200-
else:
201-
session.install("-r", "requirements.txt")
202-
203-
if os.path.exists("requirements-test.txt"):
204-
if os.path.exists("constraints-test.txt"):
205-
session.install(
206-
"-r", "requirements-test.txt", "-c", "constraints-test.txt"
207-
)
208-
else:
209-
session.install("-r", "requirements-test.txt")
210-
211-
if INSTALL_LIBRARY_FROM_SOURCE:
212-
session.install("-e", _get_repo_root())
213-
214-
if post_install:
215-
post_install(session)
216-
217-
session.run(
218-
"pytest",
219-
*(PYTEST_COMMON_ARGS + session.posargs),
220-
# Pytest will return 5 when no tests are collected. This can happen
221-
# on travis where slow and flaky tests are excluded.
222-
# See http://doc.pytest.org/en/latest/_modules/_pytest/main.html
223-
success_codes=[0, 5],
224-
env=get_pytest_env_vars(),
225-
)
187+
if TEST_CONFIG["pip_version_override"]:
188+
pip_version = TEST_CONFIG["pip_version_override"]
189+
session.install(f"pip=={pip_version}")
190+
"""Runs py.test for a particular project."""
191+
if os.path.exists("requirements.txt"):
192+
if os.path.exists("constraints.txt"):
193+
session.install("-r", "requirements.txt", "-c", "constraints.txt")
194+
else:
195+
session.install("-r", "requirements.txt")
196+
197+
if os.path.exists("requirements-test.txt"):
198+
if os.path.exists("constraints-test.txt"):
199+
session.install("-r", "requirements-test.txt", "-c", "constraints-test.txt")
200+
else:
201+
session.install("-r", "requirements-test.txt")
202+
203+
if INSTALL_LIBRARY_FROM_SOURCE:
204+
session.install("-e", _get_repo_root())
205+
206+
if post_install:
207+
post_install(session)
208+
209+
session.run(
210+
"pytest",
211+
*(PYTEST_COMMON_ARGS + session.posargs),
212+
# Pytest will return 5 when no tests are collected. This can happen
213+
# on travis where slow and flaky tests are excluded.
214+
# See http://doc.pytest.org/en/latest/_modules/_pytest/main.html
215+
success_codes=[0, 5],
216+
env=get_pytest_env_vars(),
217+
)
226218

227219

228220
@nox.session(python=ALL_VERSIONS)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Default TEST_CONFIG_OVERRIDE for python repos.
16+
17+
# You can copy this file into your directory, then it will be inported from
18+
# the noxfile.py.
19+
20+
# The source of truth:
21+
# https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/noxfile_config.py
22+
23+
TEST_CONFIG_OVERRIDE = {
24+
# You can opt out from the test for specific Python versions.
25+
# Pillow 9.0.0 does not support python 3.6
26+
"ignored_versions": ["3.6"],
27+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
google-cloud-vision==2.6.3
2-
pillow==8.4.0
2+
pillow==9.0.0

vision/snippets/detect/noxfile.py

Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
from __future__ import print_function
1616

17-
import glob
1817
import os
1918
from pathlib import Path
2019
import sys
@@ -185,44 +184,37 @@ def blacken(session: nox.sessions.Session) -> None:
185184
def _session_tests(
186185
session: nox.sessions.Session, post_install: Callable = None
187186
) -> None:
188-
# check for presence of tests
189-
test_list = glob.glob("*_test.py") + glob.glob("test_*.py")
190-
if len(test_list) == 0:
191-
print("No tests found, skipping directory.")
192-
else:
193-
if TEST_CONFIG["pip_version_override"]:
194-
pip_version = TEST_CONFIG["pip_version_override"]
195-
session.install(f"pip=={pip_version}")
196-
"""Runs py.test for a particular project."""
197-
if os.path.exists("requirements.txt"):
198-
if os.path.exists("constraints.txt"):
199-
session.install("-r", "requirements.txt", "-c", "constraints.txt")
200-
else:
201-
session.install("-r", "requirements.txt")
202-
203-
if os.path.exists("requirements-test.txt"):
204-
if os.path.exists("constraints-test.txt"):
205-
session.install(
206-
"-r", "requirements-test.txt", "-c", "constraints-test.txt"
207-
)
208-
else:
209-
session.install("-r", "requirements-test.txt")
210-
211-
if INSTALL_LIBRARY_FROM_SOURCE:
212-
session.install("-e", _get_repo_root())
213-
214-
if post_install:
215-
post_install(session)
216-
217-
session.run(
218-
"pytest",
219-
*(PYTEST_COMMON_ARGS + session.posargs),
220-
# Pytest will return 5 when no tests are collected. This can happen
221-
# on travis where slow and flaky tests are excluded.
222-
# See http://doc.pytest.org/en/latest/_modules/_pytest/main.html
223-
success_codes=[0, 5],
224-
env=get_pytest_env_vars(),
225-
)
187+
if TEST_CONFIG["pip_version_override"]:
188+
pip_version = TEST_CONFIG["pip_version_override"]
189+
session.install(f"pip=={pip_version}")
190+
"""Runs py.test for a particular project."""
191+
if os.path.exists("requirements.txt"):
192+
if os.path.exists("constraints.txt"):
193+
session.install("-r", "requirements.txt", "-c", "constraints.txt")
194+
else:
195+
session.install("-r", "requirements.txt")
196+
197+
if os.path.exists("requirements-test.txt"):
198+
if os.path.exists("constraints-test.txt"):
199+
session.install("-r", "requirements-test.txt", "-c", "constraints-test.txt")
200+
else:
201+
session.install("-r", "requirements-test.txt")
202+
203+
if INSTALL_LIBRARY_FROM_SOURCE:
204+
session.install("-e", _get_repo_root())
205+
206+
if post_install:
207+
post_install(session)
208+
209+
session.run(
210+
"pytest",
211+
*(PYTEST_COMMON_ARGS + session.posargs),
212+
# Pytest will return 5 when no tests are collected. This can happen
213+
# on travis where slow and flaky tests are excluded.
214+
# See http://doc.pytest.org/en/latest/_modules/_pytest/main.html
215+
success_codes=[0, 5],
216+
env=get_pytest_env_vars(),
217+
)
226218

227219

228220
@nox.session(python=ALL_VERSIONS)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
google-cloud-vision==2.6.3
2-
google-cloud-storage==1.43.0
2+
google-cloud-storage==1.44.0

vision/snippets/document_text/noxfile.py

Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
from __future__ import print_function
1616

17-
import glob
1817
import os
1918
from pathlib import Path
2019
import sys
@@ -185,44 +184,37 @@ def blacken(session: nox.sessions.Session) -> None:
185184
def _session_tests(
186185
session: nox.sessions.Session, post_install: Callable = None
187186
) -> None:
188-
# check for presence of tests
189-
test_list = glob.glob("*_test.py") + glob.glob("test_*.py")
190-
if len(test_list) == 0:
191-
print("No tests found, skipping directory.")
192-
else:
193-
if TEST_CONFIG["pip_version_override"]:
194-
pip_version = TEST_CONFIG["pip_version_override"]
195-
session.install(f"pip=={pip_version}")
196-
"""Runs py.test for a particular project."""
197-
if os.path.exists("requirements.txt"):
198-
if os.path.exists("constraints.txt"):
199-
session.install("-r", "requirements.txt", "-c", "constraints.txt")
200-
else:
201-
session.install("-r", "requirements.txt")
202-
203-
if os.path.exists("requirements-test.txt"):
204-
if os.path.exists("constraints-test.txt"):
205-
session.install(
206-
"-r", "requirements-test.txt", "-c", "constraints-test.txt"
207-
)
208-
else:
209-
session.install("-r", "requirements-test.txt")
210-
211-
if INSTALL_LIBRARY_FROM_SOURCE:
212-
session.install("-e", _get_repo_root())
213-
214-
if post_install:
215-
post_install(session)
216-
217-
session.run(
218-
"pytest",
219-
*(PYTEST_COMMON_ARGS + session.posargs),
220-
# Pytest will return 5 when no tests are collected. This can happen
221-
# on travis where slow and flaky tests are excluded.
222-
# See http://doc.pytest.org/en/latest/_modules/_pytest/main.html
223-
success_codes=[0, 5],
224-
env=get_pytest_env_vars(),
225-
)
187+
if TEST_CONFIG["pip_version_override"]:
188+
pip_version = TEST_CONFIG["pip_version_override"]
189+
session.install(f"pip=={pip_version}")
190+
"""Runs py.test for a particular project."""
191+
if os.path.exists("requirements.txt"):
192+
if os.path.exists("constraints.txt"):
193+
session.install("-r", "requirements.txt", "-c", "constraints.txt")
194+
else:
195+
session.install("-r", "requirements.txt")
196+
197+
if os.path.exists("requirements-test.txt"):
198+
if os.path.exists("constraints-test.txt"):
199+
session.install("-r", "requirements-test.txt", "-c", "constraints-test.txt")
200+
else:
201+
session.install("-r", "requirements-test.txt")
202+
203+
if INSTALL_LIBRARY_FROM_SOURCE:
204+
session.install("-e", _get_repo_root())
205+
206+
if post_install:
207+
post_install(session)
208+
209+
session.run(
210+
"pytest",
211+
*(PYTEST_COMMON_ARGS + session.posargs),
212+
# Pytest will return 5 when no tests are collected. This can happen
213+
# on travis where slow and flaky tests are excluded.
214+
# See http://doc.pytest.org/en/latest/_modules/_pytest/main.html
215+
success_codes=[0, 5],
216+
env=get_pytest_env_vars(),
217+
)
226218

227219

228220
@nox.session(python=ALL_VERSIONS)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Default TEST_CONFIG_OVERRIDE for python repos.
16+
17+
# You can copy this file into your directory, then it will be inported from
18+
# the noxfile.py.
19+
20+
# The source of truth:
21+
# https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/noxfile_config.py
22+
23+
TEST_CONFIG_OVERRIDE = {
24+
# You can opt out from the test for specific Python versions.
25+
# Pillow 9.0.0 does not support python 3.6
26+
"ignored_versions": ["3.6"],
27+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
google-cloud-vision==2.6.3
2-
pillow==8.4.0
2+
pillow==9.0.0

0 commit comments

Comments
 (0)