Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .kokoro/samples/lint/presubmit.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions .kokoro/samples/python3.10/presubmit.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions .kokoro/samples/python3.11/continuous.cfg

This file was deleted.

11 changes: 0 additions & 11 deletions .kokoro/samples/python3.11/periodic-head.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions .kokoro/samples/python3.11/presubmit.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions .kokoro/samples/python3.12/continuous.cfg

This file was deleted.

11 changes: 0 additions & 11 deletions .kokoro/samples/python3.12/periodic-head.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions .kokoro/samples/python3.12/presubmit.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions .kokoro/samples/python3.13/continuous.cfg

This file was deleted.

11 changes: 0 additions & 11 deletions .kokoro/samples/python3.13/periodic-head.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions .kokoro/samples/python3.13/presubmit.cfg

This file was deleted.

40 changes: 0 additions & 40 deletions .kokoro/samples/python3.9/common.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions .kokoro/samples/python3.9/continuous.cfg

This file was deleted.

11 changes: 0 additions & 11 deletions .kokoro/samples/python3.9/periodic-head.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions .kokoro/samples/python3.9/periodic.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions .kokoro/samples/python3.9/presubmit.cfg

This file was deleted.

51 changes: 30 additions & 21 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ def default(session):
# Run py.test against the unit tests.
session.run(
"py.test",
"-n",
"auto", # Use all available CPU cores
"--quiet",
f"--junitxml=unit_{session.python}_sponge_log.xml",
"--ignore=tests/unit/vertex_ray",
Expand All @@ -233,6 +235,8 @@ def default(session):
# Run tests that require isolation.
session.run(
"py.test",
"-n",
"auto", # Use all available CPU cores
"--quiet",
f"--junitxml=unit_{session.python}_test_vertexai_import_sponge_log.xml",
os.path.join("tests", "unit", "architecture", "test_vertexai_import.py"),
Expand All @@ -243,32 +247,11 @@ def default(session):
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS)
def unit(session):
"""Run the unit test suite."""
# First run the minimal GenAI tests
unit_genai_minimal_dependencies(session)

# Then run the default full test suite
default(session)


def unit_genai_minimal_dependencies(session):
# Install minimal test dependencies, then install this package in-place.

standard_deps = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_DEPENDENCIES
session.install(*standard_deps)
session.install("-e", ".")

# Run py.test against the unit tests.
session.run(
"py.test",
"--quiet",
f"--junitxml=unit_{session.python}_sponge_log.xml",
# These tests require the PIL module
# "--ignore=TestGenerativeModels::test_image_mime_types",
os.path.join("tests", "unit", "vertexai", "test_generative_models.py"),
*session.posargs,
)


@nox.session(python=["3.10", "3.11"])
@nox.parametrize("ray", ["2.9.3", "2.33.0", "2.42.0", "2.47.1"])
def unit_ray(session, ray):
Expand All @@ -288,6 +271,8 @@ def unit_ray(session, ray):
# Run py.test against the unit tests.
session.run(
"py.test",
"-n",
"auto", # Use all available CPU cores
"--quiet",
f"--junitxml=unit_ray_{ray}_py_{session.python}_sponge_log.xml",
"--cov=google",
Expand All @@ -314,6 +299,8 @@ def unit_agentplatform_adk(session):
# Run py.test against the unit tests.
session.run(
"py.test",
"-n",
"auto", # Use all available CPU cores
"--quiet",
"--junitxml=unit_agentplatform_adk_sponge_log.xml",
"--cov=google",
Expand Down Expand Up @@ -342,6 +329,8 @@ def unit_agentplatform_langchain(session):
# Run py.test against the unit tests.
session.run(
"py.test",
"-n",
"auto", # Use all available CPU cores
"--quiet",
"--junitxml=unit_agentplatform_langchain_sponge_log.xml",
"--cov=google",
Expand Down Expand Up @@ -381,6 +370,8 @@ def unit_agentplatform_ag2(session):
# Run py.test against the unit tests.
session.run(
"py.test",
"-n",
"auto", # Use all available CPU cores
"--quiet",
"--junitxml=unit_agentplatform_ag2_sponge_log.xml",
"--cov=google",
Expand Down Expand Up @@ -411,6 +402,8 @@ def unit_agentplatform_llama_index(session):
# Run py.test against the unit tests.
session.run(
"py.test",
"-n",
"auto", # Use all available CPU cores
"--quiet",
"--junitxml=unit_agentplatform_llama_index_sponge_log.xml",
"--cov=google",
Expand Down Expand Up @@ -443,6 +436,8 @@ def unit_langchain(session):
# Run py.test against the unit tests.
session.run(
"py.test",
"-n",
"auto", # Use all available CPU cores
"--quiet",
"--junitxml=unit_langchain_sponge_log.xml",
"--cov=google",
Expand All @@ -469,6 +464,8 @@ def unit_ag2(session):
# Run py.test against the unit tests.
session.run(
"py.test",
"-n",
"auto", # Use all available CPU cores
"--quiet",
"--junitxml=unit_ag2_sponge_log.xml",
"--cov=google",
Expand Down Expand Up @@ -497,6 +494,8 @@ def unit_llama_index(session):
# Run py.test against the unit tests.
session.run(
"py.test",
"-n",
"auto", # Use all available CPU cores
"--quiet",
"--junitxml=unit_llama_index_sponge_log.xml",
"--cov=google",
Expand Down Expand Up @@ -567,6 +566,8 @@ def system(session):
if system_test_exists:
session.run(
"py.test",
"-n",
"auto", # Use all available CPU cores
"--quiet",
f"--junitxml=system_{session.python}_sponge_log.xml",
system_test_path,
Expand All @@ -575,6 +576,8 @@ def system(session):
if system_test_folder_exists:
session.run(
"py.test",
"-n",
"auto", # Use all available CPU cores
"-v",
f"--junitxml=system_{session.python}_sponge_log.xml",
system_test_folder_path,
Expand Down Expand Up @@ -776,6 +779,8 @@ def prerelease_deps(session):

session.run(
"py.test",
"-n",
"auto", # Use all available CPU cores
"--ignore=tests/unit/vertexai/genai/replays",
"--ignore=tests/unit/agentplatform/genai/replays",
"tests/unit",
Expand All @@ -788,6 +793,8 @@ def prerelease_deps(session):
if os.path.exists(system_test_path):
session.run(
"py.test",
"-n",
"auto", # Use all available CPU cores
"--verbose",
f"--junitxml=system_{session.python}_sponge_log.xml",
system_test_path,
Expand All @@ -796,6 +803,8 @@ def prerelease_deps(session):
if os.path.exists(system_test_folder_path):
session.run(
"py.test",
"-n",
"auto", # Use all available CPU cores
"--verbose",
f"--junitxml=system_{session.python}_sponge_log.xml",
system_test_folder_path,
Expand Down
18 changes: 8 additions & 10 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,16 @@
".kokoro/release.sh",
".kokoro/release/common.cfg",
".kokoro/requirements*",
# exclude sample configs so they are tested against main
# instead of pypi
".kokoro/samples/lint/**",
".kokoro/samples/python3.7/**",
".kokoro/samples/python3.8/**",
# exclude sample configs so periodic samples are tested against main
# instead of pypi
".kokoro/samples/python3.10/common.cfg",
".kokoro/samples/python3.11/common.cfg",
".kokoro/samples/python3.12/common.cfg",
".kokoro/samples/python3.13/common.cfg",
".kokoro/samples/python3.10/periodic.cfg",
".kokoro/samples/python3.11/periodic.cfg",
".kokoro/samples/python3.12/periodic.cfg",
".kokoro/samples/python3.13/periodic.cfg",
".kokoro/samples/python3.9/**",
".kokoro/samples/python3.10/**",
".kokoro/samples/python3.11/**",
".kokoro/samples/python3.12/**",
".kokoro/samples/python3.13/**",
".github/auto-label.yaml",
".github/blunderbuss.yml",
".github/CODEOWNERS",
Expand Down
Loading