|
34 | 34 | # TODO: switch to 3.13 once remote functions / cloud run adds a runtime for it (internal issue 333742751)
|
35 | 35 | LATEST_FULLY_SUPPORTED_PYTHON = "3.12"
|
36 | 36 |
|
| 37 | +# Notebook tests should match colab and BQ Studio. |
| 38 | +# Check with import sys; sys.version_info |
| 39 | +# on a fresh notebook runtime. |
| 40 | +COLAB_AND_BQ_STUDIO_PYTHON_VERSIONS = [ |
| 41 | + # BQ Studio |
| 42 | + "3.10", |
| 43 | + # colab.research.google.com |
| 44 | + "3.11", |
| 45 | +] |
| 46 | + |
37 | 47 | # pytest-retry is not yet compatible with pytest 8.x.
|
38 | 48 | # https://github.com/str0zzapreti/pytest-retry/issues/32
|
39 | 49 | PYTEST_VERSION = "pytest<8.0.0dev"
|
|
64 | 74 | UNIT_TEST_EXTRAS: List[str] = []
|
65 | 75 | UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {"3.12": ["polars"]}
|
66 | 76 |
|
67 |
| -# There are 4 different ibis-framework 9.x versions we want to test against. |
68 |
| -# 3.10 is needed for Windows tests. |
| 77 | +# 3.10 is needed for Windows tests as it is the only version installed in the |
| 78 | +# bigframes-windows container image. For more information, search |
| 79 | +# bigframes/windows-docker, internally. |
69 | 80 | SYSTEM_TEST_PYTHON_VERSIONS = ["3.9", "3.10", "3.12", "3.13"]
|
70 | 81 | SYSTEM_TEST_STANDARD_DEPENDENCIES = [
|
71 | 82 | "jinja2",
|
@@ -698,7 +709,7 @@ def system_prerelease(session: nox.sessions.Session):
|
698 | 709 | )
|
699 | 710 |
|
700 | 711 |
|
701 |
| -@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS) |
| 712 | +@nox.session(python=COLAB_AND_BQ_STUDIO_PYTHON_VERSIONS) |
702 | 713 | def notebook(session: nox.Session):
|
703 | 714 | google_cloud_project = os.getenv("GOOGLE_CLOUD_PROJECT")
|
704 | 715 | if not google_cloud_project:
|
@@ -776,27 +787,20 @@ def notebook(session: nox.Session):
|
776 | 787 | notebooks = list(filter(lambda nb: nb not in denylist, notebooks))
|
777 | 788 |
|
778 | 789 | # Regionalized notebooks
|
779 |
| - # TODO: remove exception for Python 3.13 cloud run adds a runtime for it (internal issue 333742751) |
780 |
| - # TODO: remove exception for Python 3.13 if nbmake adds support for |
781 |
| - # sys.exit(0) or pytest.skip(...). |
782 |
| - # See: https://github.com/treebeardtech/nbmake/issues/134 |
783 |
| - if session.python == "3.13": |
784 |
| - notebooks_reg = {} |
785 |
| - else: |
786 |
| - notebooks_reg = { |
787 |
| - "regionalized.ipynb": [ |
788 |
| - "asia-southeast1", |
789 |
| - "eu", |
790 |
| - "europe-west4", |
791 |
| - "southamerica-west1", |
792 |
| - "us", |
793 |
| - "us-central1", |
794 |
| - ] |
795 |
| - } |
796 |
| - notebooks_reg = { |
797 |
| - os.path.join("notebooks/location", nb): regions |
798 |
| - for nb, regions in notebooks_reg.items() |
799 |
| - } |
| 790 | + notebooks_reg = { |
| 791 | + "regionalized.ipynb": [ |
| 792 | + "asia-southeast1", |
| 793 | + "eu", |
| 794 | + "europe-west4", |
| 795 | + "southamerica-west1", |
| 796 | + "us", |
| 797 | + "us-central1", |
| 798 | + ] |
| 799 | + } |
| 800 | + notebooks_reg = { |
| 801 | + os.path.join("notebooks/location", nb): regions |
| 802 | + for nb, regions in notebooks_reg.items() |
| 803 | + } |
800 | 804 |
|
801 | 805 | # The pytest --nbmake exits silently with "no tests ran" message if
|
802 | 806 | # one of the notebook paths supplied does not exist. Let's make sure that
|
|
0 commit comments