Skip to content

Commit

Permalink
chang owlbot file to test optional bf deps
Browse files Browse the repository at this point in the history
  • Loading branch information
sycai committed Sep 19, 2024
1 parent e7daa6b commit a4104fe
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 20 deletions.
12 changes: 1 addition & 11 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,19 +200,12 @@ def install_unittest_dependencies(session, *constraints):
"protobuf_implementation",
["python", "upb", "cpp"],
)
@nox.parametrize(
"install_bigframes",
[True, False],
)
def unit(session, protobuf_implementation, install_bigframes):
def unit(session, protobuf_implementation):
# Install all test dependencies, then install this package in-place.

if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12"):
session.skip("cpp implementation is not supported in python 3.11+")

if install_bigframes and session.python in ("3.7", "3.8"):
session.skip("Bigframes only supports Python 3.9+")

constraints_path = str(
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
)
Expand All @@ -224,9 +217,6 @@ def unit(session, protobuf_implementation, install_bigframes):
if protobuf_implementation == "cpp":
session.install("protobuf<4")

if install_bigframes:
session.install("bigframes >= 1.17.0")

# Run py.test against the unit tests.
session.run(
"py.test",
Expand Down
18 changes: 9 additions & 9 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,20 @@
# Add templated files
# ----------------------------------------------------------------------------

extras = ["bqstorage"]
extras_storage = ["bqstorage"]
extras_bf = ["bqstorage", "bigframes"]
extras_by_python = {
"3.7": extras,
"3.8": extras,
"3.9": extras,
"3.10": extras,
"3.7": extras_storage,
"3.8": extras_storage,
"3.9": extras_bf,
"3.10": extras_bf,
# Use a middle version of Python to test when no extras are installed.
"3.11": [],
"3.12": extras,
"3.12": extras_bf,
}
templated_files = common.py_library(
unit_test_python_versions=["3.7", "3.8", "3.11", "3.12"],
system_test_python_versions=["3.8", "3.11", "3.12"],
unit_test_python_versions=["3.7", "3.8", "3.9", "3.11", "3.12"],
system_test_python_versions=["3.8", "3.9", "3.11", "3.12"],
cov_level=100,
unit_test_extras_by_python=extras_by_python,
unit_test_external_dependencies=["google-cloud-testutils"],
Expand All @@ -56,7 +57,6 @@
# Multi-processing note isn't relevant, as bigquery-magics is responsible for
# creating clients, not the end user.
"docs/multiprocessing.rst",
"noxfile.py",
"README.rst",
".github/workflows/unittest.yml",
],
Expand Down
1 change: 1 addition & 0 deletions testing/constraints-3.9.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
# We try to test across major versions of our dependencies.
# This is the last pandas 2.0.x release.
pandas==2.0.3
bigframes==1.17.0

0 comments on commit a4104fe

Please sign in to comment.