Skip to content
Draft
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
10 changes: 4 additions & 6 deletions alloydb/notebooks/e2e_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ async def test_embeddings_batch_processing(
skip_shell_commands=True,
replace={
(
"password = input(\"Please provide "
'password = input("Please provide '
"a password to be used for 'postgres' "
"database user: \")"
'database user: ")'
): f"password = '{password}'",
(
"await create_db("
Expand Down Expand Up @@ -141,14 +141,12 @@ async def test_embeddings_batch_processing(
# Get the table back to the original state
await conn.execute(
sqlalchemy.text(
f"UPDATE {table_name} set "
f"analysis_embedding = NULL"
f"UPDATE {table_name} set " f"analysis_embedding = NULL"
)
)
await conn.execute(
sqlalchemy.text(
f"UPDATE {table_name} set "
f"overview_embedding = NULL"
f"UPDATE {table_name} set " f"overview_embedding = NULL"
)
)
await conn.commit()
Expand Down
2 changes: 1 addition & 1 deletion alloydb/notebooks/noxfile_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
"ignored_versions": ["2.7", "3.7", "3.8", "3.9", "3.11", "3.12", "3.13"],
"ignored_versions": ["2.7", "3.7", "3.8", "3.9", "3.11", "3.12", "3.13", 3.14],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": True,
Expand Down
6 changes: 3 additions & 3 deletions alloydb/notebooks/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
google-cloud-alloydb-connector[asyncpg]==1.5.0
google-cloud-alloydb-connector[asyncpg]==1.12.1
sqlalchemy==2.0.40
pytest==8.3.3
pytest>=9.0.3
ipykernel==6.29.5
pytest-asyncio==0.24.0
pytest-asyncio==1.3.0
nbconvert==7.16.6
2 changes: 1 addition & 1 deletion aml-ai/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pytest==8.2.0
pytest==9.0.3
2 changes: 1 addition & 1 deletion asset/snippets/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
backoff==2.2.1
flaky==3.8.1
pytest==8.2.0
pytest==9.0.3
10 changes: 5 additions & 5 deletions asset/snippets/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
google-cloud-storage==2.9.0
google-cloud-asset==3.27.1
google-cloud-resource-manager==1.10.1
google-cloud-pubsub==2.21.5
google-cloud-bigquery==3.27.0
google-cloud-storage==3.10.1
google-cloud-asset==4.3.0
google-cloud-resource-manager==1.17.0
google-cloud-pubsub==2.38.0
google-cloud-bigquery==3.41.0
2 changes: 1 addition & 1 deletion auth/api-client/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pytest==8.2.0
pytest==9.0.3
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The version 9.0.3 for pytest does not exist on PyPI. The current stable version is in the 8.x range. This will cause installation to fail. Please check if this was a typo for a version like 8.3.3.

backoff==2.2.1
6 changes: 3 additions & 3 deletions auth/api-client/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
google-api-python-client==2.131.0
google-api-python-client==2.196.0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This PR updates production dependencies in addition to pytest. Per the general rules, PRs should be focused on a single change. Consider splitting these updates or updating the PR title to reflect the broader scope.

References
  1. To simplify the review process, pull requests should be focused on a single change.

google-auth-httplib2==0.2.0
google-auth==2.38.0
google-cloud-api-keys==0.5.13
google-cloud-api-keys==0.8.0
google-cloud-compute==1.11.0
google-cloud-language==2.15.1
google-cloud-storage==2.9.0
google-cloud-storage==3.10.1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The version 3.10.1 for google-cloud-storage does not exist on PyPI. The current stable version is in the 2.x range. This update will likely cause installation failures. Please check if this was a typo for 2.10.1.

2 changes: 1 addition & 1 deletion auth/cloud-client-temp/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
]


@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"])
@nox.session(python=["3.10", "3.11", "3.12", "3.13"])
def unit(session):
# constraints_path = str(
# CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
Expand Down
3 changes: 1 addition & 2 deletions auth/cloud-client-temp/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
google-cloud-compute==1.42.0
google-cloud-storage==3.8.0
google-auth==2.47.0
pytest===8.4.2; python_version == '3.9'
pytest==9.0.2; python_version > '3.9'
pytest==9.0.3; python_version > '3.9'
boto3>=1.26.0
requests==2.32.5
python-dotenv==1.2.1
2 changes: 1 addition & 1 deletion auth/cloud-client/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pytest==8.2.0
pytest==9.0.3
2 changes: 1 addition & 1 deletion auth/custom-credentials/okta/noxfile_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.

TEST_CONFIG_OVERRIDE = {
"ignored_versions": ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
"ignored_versions": ["2.7", "3.6", "3.7", "3.8", "3.9", "3.14"],
}
2 changes: 1 addition & 1 deletion auth/custom-credentials/okta/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
-r requirements.txt
pytest==7.1.2
pytest==9.0.3
5 changes: 2 additions & 3 deletions auth/downscoping/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
pytest==8.2.0
google-cloud-storage==2.9.0; python_version < '3.7'
google-cloud-storage==2.9.0; python_version > '3.6'
pytest==9.0.3
google-cloud-storage==3.10.1; python_version > '3.9'
6 changes: 3 additions & 3 deletions auth/downscoping/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
google-auth==2.38.0
google-cloud-storage==2.9.0; python_version < '3.7'
google-cloud-storage==2.9.0; python_version > '3.6'
google-auth==2.52.0; python_version > '3.9'
google-cloud-storage==3.10.1; python_version > '3.9'
pyOpenSSL==26.2.0
2 changes: 1 addition & 1 deletion auth/service-to-service/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pytest==8.2.0
pytest==9.0.3
4 changes: 2 additions & 2 deletions auth/service-to-service/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
google-auth==2.19.1
requests==2.32.4
google-auth==2.52.0; python_version > '3.9'
requests==2.33.1; python_version > '3.9'
2 changes: 1 addition & 1 deletion automl/snippets/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
backoff==2.2.1
pytest==8.2.0
pytest==9.0.3
6 changes: 3 additions & 3 deletions automl/snippets/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
google-cloud-translate==3.18.0
google-cloud-storage==2.9.0
google-cloud-automl==2.14.1
google-cloud-translate==3.26.0
google-cloud-storage==3.10.1
google-cloud-automl==2.19.0
8 changes: 4 additions & 4 deletions batch/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pytest==8.2.0
google-cloud-compute==1.11.0
google-cloud-resource-manager==1.10.1
google-cloud-storage==2.9.0
pytest==9.0.3
google-cloud-compute==1.47.0
google-cloud-resource-manager==1.17.0
google-cloud-storage==3.10.1
flaky==3.8.1
4 changes: 2 additions & 2 deletions batch/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
google-cloud-batch==0.17.31
google-cloud-logging==3.5.0
google-cloud-batch==0.21.0
google-cloud-logging==3.15.0
2 changes: 1 addition & 1 deletion bigquery-connection/snippets/noxfile_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
"ignored_versions": ["2.7", "3.7", "3.8", "3.10", "3.11"],
"ignored_versions": ["2.7", "3.7", "3.8", "3.9", "3.14"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": True,
Expand Down
2 changes: 1 addition & 1 deletion bigquery-connection/snippets/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pytest==8.2.0
pytest==9.0.3
google-cloud-testutils==1.5.0
2 changes: 1 addition & 1 deletion bigquery-datatransfer/snippets/noxfile_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
"ignored_versions": ["2.7", "3.7", "3.8", "3.10", "3.11"],
"ignored_versions": ["2.7", "3.7", "3.8", "3.9", "3.14"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": False,
Expand Down
4 changes: 2 additions & 2 deletions bigquery-datatransfer/snippets/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
google-cloud-bigquery==3.27.0
google-cloud-pubsub==2.28.0
pytest==8.2.0
google-cloud-pubsub==2.38.0
pytest==9.0.3
mock==5.1.0
3 changes: 2 additions & 1 deletion bigquery-datatransfer/snippets/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
google-cloud-bigquery-datatransfer==3.17.1
google-cloud-bigquery-datatransfer==3.22.0
pyOpenSsl==26.2.0
2 changes: 1 addition & 1 deletion bigquery-migration/snippets/noxfile_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
"ignored_versions": ["2.7", "3.7", "3.8", "3.10", "3.11"],
"ignored_versions": ["2.7", "3.7", "3.8", "3.9", "3.14"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": True,
Expand Down
2 changes: 1 addition & 1 deletion bigquery-migration/snippets/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pytest==8.2.0
pytest==9.0.3
google-cloud-testutils==1.5.0
google-api-core==2.17.1
google-cloud-storage==2.9.0
3 changes: 2 additions & 1 deletion bigquery-migration/snippets/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
google-cloud-bigquery-migration==0.11.15
google-cloud-bigquery-migration==0.14.0
pyOpenSSL==26.2.0
22 changes: 8 additions & 14 deletions bigquery/bigframes/call_python_udf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
import pandas as pd
import pyarrow as pa


# Using partial ordering mode enables more efficient query optimizations.
bpd.options.bigquery.ordering_mode = "partial"


def call_python_udf(
project_id: str, location: str,
project_id: str,
location: str,
) -> Tuple[pd.Series, bpd.Series]:
# Set the billing project to use for queries. This step is optional, as the
# project can be inferred from your environment in many cases.
Expand All @@ -39,30 +39,24 @@ def call_python_udf(
# Create a sample series.
xml_series = pd.Series(
[
textwrap.dedent(
"""
textwrap.dedent("""
<book id="1">
<title>The Great Gatsby</title>
<author>F. Scott Fitzgerald</author>
</book>
"""
),
textwrap.dedent(
"""
"""),
textwrap.dedent("""
<book id="2">
<title>1984</title>
<author>George Orwell</author>
</book>
"""
),
textwrap.dedent(
"""
"""),
textwrap.dedent("""
<book id="3">
<title>Brave New World</title>
<author>Aldous Huxley</author>
</book>
"""
),
"""),
],
dtype=pd.ArrowDtype(pa.string()),
)
Expand Down
4 changes: 3 additions & 1 deletion bigquery/bigframes/call_python_udf_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

def test_call_python_udf(project_id: str, location: str) -> None:
bpd.close_session()
pd_result, bf_result = call_python_udf.call_python_udf(project_id=project_id, location=location)
pd_result, bf_result = call_python_udf.call_python_udf(
project_id=project_id, location=location
)
assert len(pd_result.index) == 3
assert len(bf_result.index) == 3
2 changes: 1 addition & 1 deletion bigquery/bigframes/noxfile_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
"ignored_versions": ["2.7", "3.6", "3.8", "3.9", "3.11"],
"ignored_versions": ["2.7", "3.6", "3.8", "3.9", "3.10", "3.14"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": True,
Expand Down
2 changes: 1 addition & 1 deletion bigquery/bigframes/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
flaky==3.8.1
pytest==8.2.0
pytest==9.0.3
2 changes: 1 addition & 1 deletion bigquery/bigframes/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bigframes==2.38.0
bigframes==2.39.0
21 changes: 5 additions & 16 deletions bigquery/bqml/data_scientist_tutorial_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# [END bqml_data_scientist_tutorial_import_and_client]
import pytest


# [START bqml_data_scientist_tutorial_import_and_client]
client = bigquery.Client()
# We use a unique dataset ID for this example to avoid collisions with
Expand Down Expand Up @@ -58,9 +57,7 @@ def test_data_scientist_tutorial(delete_dataset):
`bigquery-public-data.google_analytics_sample.ga_sessions_*`
WHERE
_TABLE_SUFFIX BETWEEN '20160801' AND '20170630'
""".format(
dataset_id
)
""".format(dataset_id)
df = client.query(sql).to_dataframe()
print(df)
# [END bqml_data_scientist_tutorial_create_model]
Expand All @@ -71,9 +68,7 @@ def test_data_scientist_tutorial(delete_dataset):
*
FROM
ML.TRAINING_INFO(MODEL `{}.sample_model`)
""".format(
dataset_id
)
""".format(dataset_id)
df = client.query(sql).to_dataframe()
print(df)
# [END bqml_data_scientist_tutorial_get_training_statistics]
Expand All @@ -93,9 +88,7 @@ def test_data_scientist_tutorial(delete_dataset):
`bigquery-public-data.google_analytics_sample.ga_sessions_*`
WHERE
_TABLE_SUFFIX BETWEEN '20170701' AND '20170801'))
""".format(
dataset_id
)
""".format(dataset_id)
df = client.query(sql).to_dataframe()
print(df)
# [END bqml_data_scientist_tutorial_evaluate_model]
Expand All @@ -118,9 +111,7 @@ def test_data_scientist_tutorial(delete_dataset):
GROUP BY country
ORDER BY total_predicted_purchases DESC
LIMIT 10
""".format(
dataset_id
)
""".format(dataset_id)
df = client.query(sql).to_dataframe()
print(df)
# [END bqml_data_scientist_tutorial_predict_transactions]
Expand All @@ -144,9 +135,7 @@ def test_data_scientist_tutorial(delete_dataset):
GROUP BY fullVisitorId
ORDER BY total_predicted_purchases DESC
LIMIT 10
""".format(
dataset_id
)
""".format(dataset_id)
df = client.query(sql).to_dataframe()
print(df)
# [END bqml_data_scientist_tutorial_predict_purchases]
Loading