Skip to content

Commit 142dd59

Browse files
committed
manual changes
1 parent 44ed114 commit 142dd59

17 files changed

Lines changed: 151 additions & 18 deletions

File tree

.github/workflows/unittest.yml

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ name: unittest
1212
permissions:
1313
contents: read
1414

15+
1516
jobs:
1617
unit:
1718
runs-on: ubuntu-22.04
1819
strategy:
1920
fail-fast: true
2021
matrix:
21-
python: ['3.9', '3.10', "3.11", "3.12", "3.13", "3.14", "3.15"]
22+
python: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
2223
steps:
2324
- name: Checkout
2425
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
@@ -33,22 +34,46 @@ jobs:
3334
with:
3435
python-version: ${{ matrix.python }}
3536
allow-prereleases: true
36-
# Caches compiled wheels locally to prevent building heavy libraries
37-
# such as grpcio, which we build from scratch on every run for Python 3.15+.
38-
# Follow https://github.com/grpc/grpc/issues/41010 for updates.
39-
cache: 'pip'
37+
- name: Setup uv
38+
uses: astral-sh/setup-uv@v5
39+
with:
40+
enable-cache: true
41+
cache-dependency-glob: 'packages/**/testing/constraints*.txt'
4042
- name: Install nox
4143
run: |
42-
python -m pip install --upgrade setuptools pip wheel
43-
python -m pip install nox
44+
uv pip install --system nox nox-uv
45+
# Caches compiled wheels locally to prevent building heavy libraries
46+
# such as grpcio, which we build from scratch on every run for Python 3.15+.
47+
# Follow https://github.com/grpc/grpc/issues/41010 for updates.
48+
- name: Cache Built Python 3.15 Wheels
49+
if: matrix.python == '3.15'
50+
uses: actions/cache@v4
51+
with:
52+
path: .uv-wheel-cache
53+
key: ${{ runner.os }}-uv-wheels-3.15-${{ hashFiles('packages/**/testing/constraints*.txt') }}
54+
restore-keys: |
55+
${{ runner.os }}-uv-wheels-3.15-
4456
- name: Run unit tests
4557
env:
4658
COVERAGE_FILE: ${{ github.workspace }}/.coverage-${{ matrix.python }}
4759
BUILD_TYPE: presubmit
4860
TARGET_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref }}
4961
TEST_TYPE: unit
5062
PY_VERSION: ${{ matrix.python }}
63+
# Workaround: Allows libcst to compile on Python 3.15+ while PyO3 catches up
64+
# Can be removed once libcst releases a version with native Python 3.15 wheels
65+
# Follow https://github.com/Instagram/LibCST/issues/1445 for updates.
66+
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: "1"
5167
run: |
68+
# Only inject overrides if we are strictly on the 3.15 pre-release
69+
# This is needed to speed up builds
70+
if [ "${{ matrix.python }}" = "3.15" ]; then
71+
# Tell uv it is allowed to use the pre-release 3.15 toolchain
72+
export UV_PRERELEASE="allow"
73+
74+
# Route uv's wheel and environment cache to our persistent workspace directory
75+
export UV_CACHE_DIR="${{ github.workspace }}/.uv-wheel-cache"
76+
fi
5277
ci/run_conditional_tests.sh
5378
- name: Upload coverage results
5479
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4

.kokoro/presubmit/system.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ env_vars: {
1010
key: "BIGFRAMES_TEST_PROJECT"
1111
value: "bigframes-testing"
1212
}
13+
14+
timeout_mins: 360

ci/run_single_test.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ case ${TEST_TYPE} in
9999
nox -s unit-3.14
100100
retval=$?
101101
;;
102+
"3.15")
103+
# This is needed to speed up builds
104+
nox --force-venv-backend uv -s unit-3.15
105+
retval=$?
106+
;;
102107
*)
103108
echo "unsupported PY_VERSION"
104109
exit 1

mypy.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,5 @@ warn_unreachable = True
9797
disallow_any_generics = True
9898
ignore_errors = False
9999

100-
100+
[mypy-google.cloud.datastore._app_engine_key_pb2]
101+
ignore_errors = True

packages/bigframes/mypy.ini

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# https://mypy.readthedocs.io/en/stable/config_file.html#config-file
2+
3+
[mypy]
4+
exclude = ^third_party/
5+
6+
[mypy-google.auth.*]
7+
ignore_missing_imports = True
8+
9+
[mypy-cloudpickle.*]
10+
ignore_missing_imports = True
11+
12+
[mypy-flask]
13+
ignore_missing_imports = True
14+
15+
[mypy-pydata_google_auth]
16+
ignore_missing_imports = True
17+
18+
[mypy-google.colab]
19+
ignore_missing_imports = True
20+
21+
[mypy-google.iam.*]
22+
ignore_missing_imports = True
23+
24+
[mypy-pytz]
25+
ignore_missing_imports = True
26+
27+
[mypy-pyarrow]
28+
ignore_missing_imports = True
29+
30+
[mypy-ibis.*]
31+
ignore_missing_imports = True
32+
33+
[mypy-ipywidgets]
34+
ignore_missing_imports = True
35+
36+
[mypy-pyarrow.feather]
37+
ignore_missing_imports = True
38+
39+
[mypy-google.cloud.pubsub]
40+
ignore_missing_imports = True
41+
42+
[mypy-google.cloud.bigtable]
43+
ignore_missing_imports = True
44+
45+
[mypy-anywidget]
46+
ignore_missing_imports = True
47+
48+
[mypy-bigframes_vendored.*]
49+
ignore_errors = True

packages/bigframes/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
DEFAULT_PYTHON_VERSION = "3.14"
6262

63-
ALL_PYTHON = ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
63+
ALL_PYTHON = ["3.10", "3.11", "3.12", "3.13", "3.14"]
6464
UNIT_TEST_STANDARD_DEPENDENCIES = [
6565
"mock",
6666
PYTEST_VERSION,

packages/gcp-sphinx-docfx-yaml/noxfile.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,16 @@
1717
import nox
1818

1919
DEFAULT_PYTHON_VERSION = "3.14"
20-
UNIT_TEST_PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
20+
UNIT_TEST_PYTHON_VERSIONS = [
21+
"3.8",
22+
"3.9",
23+
"3.10",
24+
"3.11",
25+
"3.12",
26+
"3.13",
27+
"3.14",
28+
"3.15",
29+
]
2130
RUFF_VERSION = "ruff==0.14.14"
2231

2332
ALL_PYTHON = list(UNIT_TEST_PYTHON_VERSIONS)
@@ -138,7 +147,9 @@ def unit(session):
138147
# Re-enable 3.8, 3.9, 3.11, 3.12, and 3.13 after environment verification.
139148
# TODO(https://github.com/googleapis/google-cloud-python/issues/16176):
140149
# Track 3.14 compatibility as upstream dependencies stabilize.
141-
_skip_python_session(session, ["3.7", "3.8", "3.9", "3.11", "3.12", "3.13", "3.14", "3.15"])
150+
_skip_python_session(
151+
session, ["3.7", "3.8", "3.9", "3.11", "3.12", "3.13", "3.14", "3.15"]
152+
)
142153
session.install("-r", "requirements.txt")
143154
session.install("pytest", "pytest-cov")
144155
session.run(

packages/google-cloud-access-context-manager/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"3.15",
4242
]
4343

44-
DEFAULT_PYTHON_VERSION = UNIT_TEST_PYTHON_VERSIONS[-1]
44+
DEFAULT_PYTHON_VERSION = "3.14"
4545

4646
UNIT_TEST_STANDARD_DEPENDENCIES = [
4747
"mock",

packages/google-cloud-audit-log/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"3.15",
4242
]
4343

44-
DEFAULT_PYTHON_VERSION = UNIT_TEST_PYTHON_VERSIONS[-1]
44+
DEFAULT_PYTHON_VERSION = "3.14"
4545

4646
UNIT_TEST_STANDARD_DEPENDENCIES = [
4747
"mock",
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[mypy]
2+
python_version = 3.13
3+
namespace_packages = True
4+
check_untyped_defs = True
5+
warn_unreachable = True
6+
disallow_any_generics = True
7+
exclude = tests/unit/gapic/
8+
9+
[mypy-grpc.*]
10+
ignore_missing_imports = True
11+
12+
[mypy-google.auth.*]
13+
ignore_missing_imports = True
14+
15+
[mypy-google.iam.*]
16+
ignore_missing_imports = True
17+
18+
[mypy-google.longrunning.*]
19+
ignore_missing_imports = True
20+
21+
[mypy-google.oauth2.*]
22+
ignore_missing_imports = True
23+
24+
[mypy-google.rpc.*]
25+
ignore_missing_imports = True
26+
27+
[mypy-proto.*]
28+
ignore_missing_imports = True
29+
30+
[mypy-pytest]
31+
ignore_missing_imports = True
32+
33+
[mypy-google.cloud.*]
34+
ignore_errors = True
35+
36+
# only verify data client
37+
[mypy-google.cloud.bigtable.data.*]
38+
ignore_errors = False

0 commit comments

Comments
 (0)