Skip to content

Commit 124654c

Browse files
setup deps for new engines
1 parent 43c2e35 commit 124654c

4 files changed

Lines changed: 24 additions & 7 deletions

File tree

packages/bigframes/noxfile.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@
7272
UNIT_TEST_DEPENDENCIES: List[str] = []
7373
UNIT_TEST_EXTRAS: List[str] = ["tests"]
7474
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {
75-
"3.10": ["tests", "scikit-learn", "anywidget"],
76-
"3.11": ["tests", "polars", "scikit-learn", "anywidget"],
75+
"3.10": ["tests", "polars", "datafusion", "substrait", "scikit-learn", "anywidget"],
76+
"3.11": ["tests", "polars", "datafusion", "substrait", "scikit-learn", "anywidget"],
7777
# Make sure we leave some versions without "extras" so we know those
7878
# dependencies are actually optional.
79-
"3.13": ["tests", "polars", "scikit-learn", "anywidget"],
80-
"3.14": ["tests", "polars", "scikit-learn", "anywidget"],
79+
"3.13": ["tests", "polars", "datafusion", "substrait", "scikit-learn", "anywidget"],
80+
"3.14": ["tests", "polars", "datafusion", "substrait", "scikit-learn", "anywidget"],
8181
}
8282

8383
# 3.11 is used by colab.
@@ -106,9 +106,9 @@
106106
# Make sure we leave some versions without "extras" so we know those
107107
# dependencies are actually optional.
108108
"3.10": ["tests", "scikit-learn", "anywidget"],
109-
"3.12": ["tests", "scikit-learn", "polars", "anywidget"],
110-
"3.13": ["tests", "polars", "anywidget"],
111-
"3.14": ["tests", "polars", "anywidget"],
109+
"3.12": ["tests", "scikit-learn", "polars", "datafusion", "substrait", "anywidget"],
110+
"3.13": ["tests", "polars", "datafusion", "substrait", "anywidget"],
111+
"3.14": ["tests", "polars", "datafusion", "substrait", "anywidget"],
112112
}
113113

114114
LOGGING_NAME_ENV_VAR = "BIGFRAMES_PERFORMANCE_LOG_NAME"

packages/bigframes/setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@
7979
],
8080
# used for local engine
8181
"polars": ["polars >= 1.21.0"],
82+
"datafusion": ["datafusion >= 45.0.0", "substrait >= 0.29"],
83+
"substrait": ["substrait >= 0.29"],
8284
"scikit-learn": ["scikit-learn>=1.2.2"],
8385
# Packages required for basic development flow.
8486
"dev": [

packages/bigframes/testing/constraints-3.10.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ grpc-google-iam-v1==0.14.2
1616
numpy==1.24.0
1717
pandas==1.5.3
1818
pandas-gbq==0.26.1
19+
polars==1.21.0
20+
substrait==0.29.0
21+
datafusion==45.0.0
1922
pyarrow==23.0.1
2023
pydata-google-auth==1.8.2
2124
pyiceberg==0.7.1

packages/bigframes/tests/system/small/engines/conftest.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@
1717
import google.cloud.bigquery_storage_v1
1818
import pandas as pd
1919
import pytest
20+
21+
# Skip the entire engines test directory if required libraries are missing
22+
try:
23+
import datafusion # noqa: F401
24+
import polars # noqa: F401
25+
import substrait # noqa: F401
26+
except ImportError as e:
27+
pytest.skip(
28+
f"Skipping engines tests because dependencies are missing: {e}",
29+
allow_module_level=True,
30+
)
31+
2032
from google.cloud import bigquery
2133

2234
import bigframes

0 commit comments

Comments
 (0)