Skip to content

chore: move polar and scikit-learn to test extras pacakges #1740

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
wants to merge 3 commits into from
Closed
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
19 changes: 6 additions & 13 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@
UNIT_TEST_LOCAL_DEPENDENCIES: List[str] = []
UNIT_TEST_DEPENDENCIES: List[str] = []
UNIT_TEST_EXTRAS: List[str] = ["tests"]
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {
"3.12": ["polars", "scikit-learn"],
}
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}

# 3.10 is needed for Windows tests as it is the only version installed in the
# bigframes-windows container image. For more information, search
Expand All @@ -103,13 +101,8 @@
]
SYSTEM_TEST_LOCAL_DEPENDENCIES: List[str] = []
SYSTEM_TEST_DEPENDENCIES: List[str] = []
SYSTEM_TEST_EXTRAS: List[str] = []
SYSTEM_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {
"3.9": ["tests"],
"3.10": ["tests"],
"3.12": ["tests", "scikit-learn"],
"3.13": ["tests"],
}
SYSTEM_TEST_EXTRAS: List[str] = ["tests"]
SYSTEM_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}

LOGGING_NAME_ENV_VAR = "BIGFRAMES_PERFORMANCE_LOG_NAME"

Expand Down Expand Up @@ -312,7 +305,7 @@ def install_systemtest_dependencies(session, install_test_extra, *constraints):

if install_test_extra and SYSTEM_TEST_EXTRAS_BY_PYTHON:
extras = SYSTEM_TEST_EXTRAS_BY_PYTHON.get(session.python, [])
elif install_test_extra and SYSTEM_TEST_EXTRAS:
if install_test_extra and SYSTEM_TEST_EXTRAS:
extras = SYSTEM_TEST_EXTRAS
else:
extras = []
Expand Down Expand Up @@ -489,7 +482,7 @@ def cover(session):
@nox.session(python=DEFAULT_PYTHON_VERSION)
def docs(session):
"""Build the docs for this library."""
session.install("-e", ".[scikit-learn]")
session.install("-e", ".[tests]")
session.install(
# We need to pin to specific versions of the `sphinxcontrib-*` packages
# which still support sphinx 4.x.
Expand Down Expand Up @@ -530,7 +523,7 @@ def docs(session):
def docfx(session):
"""Build the docfx yaml files for this library."""

session.install("-e", ".[scikit-learn]")
session.install("-e", ".[tests]")
session.install(
# We need to pin to specific versions of the `sphinxcontrib-*` packages
# which still support sphinx 4.x.
Expand Down
7 changes: 3 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,12 @@
# Optional test dependencies packages. If they're missed, may skip some tests.
"tests": [
"freezegun",
"pytest-snapshot",
"google-cloud-bigtable >=2.24.0",
"google-cloud-pubsub >=2.21.4",
"polars >= 1.7.0",
"pytest-snapshot",
"scikit-learn>=1.2.2",
],
# used for local engine, which is only needed for unit tests at present.
"polars": ["polars >= 1.7.0"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Might actually be using this stuff for user-facing features soon, so would rather not move to test-only dependencies

Copy link
Contributor Author

@chelsea-lin chelsea-lin May 16, 2025

Choose a reason for hiding this comment

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

The extract category in setup.py is being generalized for better organization, moving away from test-specific configurations. This is primarily a cleanup effort. If you want to add Polars later if needed, please sent another PR with "deps: " title for better release notes.

"scikit-learn": ["scikit-learn>=1.2.2"],
# Packages required for basic development flow.
"dev": [
"pytest",
Expand Down