-
Notifications
You must be signed in to change notification settings - Fork 1.7k
tests: add testing for Python 3.15 #17948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
06b8967
tests: add testing for Python 3.15
parthea c5e3980
git checkout origin/main .github/workflows/unittest.yml
parthea 46fdb3d
git checkout origin/main ci/run_conditional_tests.sh
parthea 5f5d63b
Squashed commit of the following:
parthea b6cbd62
restore 3.15
parthea 2f8483a
restore 3.15
parthea ea8c9a6
address zizmor
parthea 6eb430f
address feedback
parthea f394a59
temporarily speed up feedback
parthea 527dcae
temporarily speed up feedback
parthea 6f01ed4
revert
parthea 37f1f28
apply fix
parthea 34a67f6
apply fix
parthea e3c23c9
Revert "apply fix"
parthea 26a4d62
Revert "apply fix"
parthea d0607e1
reduce shards
parthea bf8bd81
reduce shards
parthea dcb2ad1
reduce shards
parthea 9e66521
cache grpcio
parthea e0f0003
apply fix
parthea 3f89358
revert
parthea f1d158f
Restore
parthea 1c14d56
Merge branch 'main' into add-testing-315
parthea File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,3 +10,5 @@ env_vars: { | |
| key: "BIGFRAMES_TEST_PROJECT" | ||
| value: "bigframes-testing" | ||
| } | ||
|
|
||
| timeout_mins: 360 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| # Copyright 2026 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| #!/usr/bin/env python3 | ||
| import os | ||
| import glob | ||
| import math | ||
| import json | ||
| import sys | ||
|
|
||
| BATCH_SIZE = 10 | ||
|
|
||
| # Packages that take significantly longer to run tests. | ||
| # These will always be assigned to their own dedicated runner. | ||
| ISOLATED_PACKAGES = [ | ||
| "google-cloud-compute", | ||
| "google-cloud-compute-v1beta", | ||
| "google-cloud-dialogflow", | ||
| "google-cloud-dialogflow-cx", | ||
| "google-cloud-retail", | ||
| ] | ||
|
|
||
| def get_batches(): | ||
| """Splits packages into dedicated isolated batches and evenly chunked standard batches.""" | ||
| raw_paths = sorted(glob.glob("packages/*")) | ||
| package_paths = [p for p in raw_paths if os.path.isdir(p)] | ||
|
|
||
| batches = [] | ||
| standard_packages = [] | ||
|
|
||
| for path in package_paths: | ||
| pkg_name = os.path.basename(path) | ||
|
|
||
| if pkg_name in ISOLATED_PACKAGES: | ||
| # Put heavy packages into their own standalone batches immediately | ||
| batches.append([path]) | ||
| else: | ||
| standard_packages.append(path) | ||
|
|
||
| # Chunk the remaining standard packages by BATCH_SIZE | ||
| num_standard_packages = len(standard_packages) | ||
| num_standard_batches = math.ceil(num_standard_packages / BATCH_SIZE) | ||
|
|
||
| if num_standard_batches == 0 and not batches: | ||
| num_standard_batches = 1 | ||
|
|
||
| for i in range(num_standard_batches): | ||
| start_idx = i * BATCH_SIZE | ||
| chunk = standard_packages[start_idx : start_idx + BATCH_SIZE] | ||
| if chunk: | ||
| batches.append(chunk) | ||
|
|
||
| return batches | ||
|
|
||
| def get_batch_indices(): | ||
| """Returns a JSON string of the array of batch indices for GitHub Actions matrix.""" | ||
| batches = get_batches() | ||
| return json.dumps(list(range(len(batches)))) | ||
|
|
||
| def get_batch_slice(batch_index): | ||
| """Returns a space-separated string of unique package paths for a specific batch index.""" | ||
| batches = get_batches() | ||
| if batch_index < 0 or batch_index >= len(batches): | ||
| return "" | ||
| return " ".join(batches[batch_index]) | ||
|
|
||
| if __name__ == "__main__": | ||
| if len(sys.argv) > 1 and sys.argv[1] == "--count": | ||
| print(get_batch_indices()) | ||
| elif len(sys.argv) > 2 and sys.argv[1] == "--slice": | ||
| print(get_batch_slice(int(sys.argv[2]))) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,6 +34,7 @@ | |
| "3.12", | ||
| "3.13", | ||
| "3.14", | ||
| "3.15", | ||
| ] | ||
| ALL_PYTHON = list(UNIT_TEST_PYTHON_VERSIONS) | ||
|
|
||
|
|
||
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,6 +39,7 @@ | |
| "3.12", | ||
| "3.13", | ||
| "3.14", | ||
| "3.15", | ||
| ] | ||
| UNIT_TEST_STANDARD_DEPENDENCIES = [ | ||
| "mock", | ||
|
|
||
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,7 @@ | |
| "3.12", | ||
| "3.13", | ||
| "3.14", | ||
| "3.15", | ||
| ] | ||
| UNIT_TEST_STANDARD_DEPENDENCIES = [ | ||
| "mock", | ||
|
|
||
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.