Skip to content

Commit 7b13a81

Browse files
committed
test: enables assorted tests
1 parent 493df65 commit 7b13a81

File tree

1 file changed

+44
-50
lines changed

1 file changed

+44
-50
lines changed

packages/bigframes/noxfile.py

Lines changed: 44 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -929,60 +929,54 @@ def core_deps_from_source(session):
929929
session.skip("Core deps from source tests are not yet supported")
930930

931931

932-
@nox.session(python=DEFAULT_PYTHON_VERSION)
932+
@nox.session(python=ALL_PYTHON[-1])
933933
def prerelease_deps(session):
934934
"""Run all tests with prerelease versions of dependencies installed."""
935935
# TODO(https://github.com/googleapis/google-cloud-python/issues/16014):
936936
# Add prerelease deps tests
937-
session.skip("prerelease deps tests are not yet supported")
937+
unit_prerelease(session)
938+
system_prerelease(session)
938939

939940

940-
@nox.session(python=DEFAULT_PYTHON_VERSION)
941+
# NOTE: this is the mypy session that came directly from the bigframes split repo
942+
@nox.session(python="3.10")
941943
def mypy(session):
942-
"""Run the type checker."""
943-
# TODO(https://github.com/googleapis/google-cloud-python/issues/16014):
944-
# Add mypy tests previously used mypy session (below) failed to run in the monorepo
945-
session.skip("mypy tests are not yet supported")
946-
947-
948-
# @nox.session(python=ALL_PYTHON)
949-
# def mypy(session):
950-
# """Run type checks with mypy."""
951-
# # Editable mode is not compatible with mypy when there are multiple
952-
# # package directories. See:
953-
# # https://github.com/python/mypy/issues/10564#issuecomment-851687749
954-
# session.install(".")
955-
956-
# # Just install the dependencies' type info directly, since "mypy --install-types"
957-
# # might require an additional pass.
958-
# deps = (
959-
# set(
960-
# [
961-
# MYPY_VERSION,
962-
# # TODO: update to latest pandas-stubs once we resolve bigframes issues.
963-
# "pandas-stubs<=2.2.3.241126",
964-
# "types-protobuf",
965-
# "types-python-dateutil",
966-
# "types-requests",
967-
# "types-setuptools",
968-
# "types-tabulate",
969-
# "types-PyYAML",
970-
# "polars",
971-
# "anywidget",
972-
# ]
973-
# )
974-
# | set(SYSTEM_TEST_STANDARD_DEPENDENCIES)
975-
# | set(UNIT_TEST_STANDARD_DEPENDENCIES)
976-
# )
977-
978-
# session.install(*deps)
979-
# shutil.rmtree(".mypy_cache", ignore_errors=True)
980-
# session.run(
981-
# "mypy",
982-
# "bigframes",
983-
# os.path.join("tests", "system"),
984-
# os.path.join("tests", "unit"),
985-
# "--check-untyped-defs",
986-
# "--explicit-package-bases",
987-
# '--exclude="^third_party"',
988-
# )
944+
"""Run type checks with mypy."""
945+
# Editable mode is not compatible with mypy when there are multiple
946+
# package directories. See:
947+
# https://github.com/python/mypy/issues/10564#issuecomment-851687749
948+
session.install(".")
949+
950+
# Just install the dependencies' type info directly, since "mypy --install-types"
951+
# might require an additional pass.
952+
deps = (
953+
set(
954+
[
955+
MYPY_VERSION,
956+
# TODO: update to latest pandas-stubs once we resolve bigframes issues.
957+
"pandas-stubs<=2.2.3.241126",
958+
"types-protobuf",
959+
"types-python-dateutil",
960+
"types-requests",
961+
"types-setuptools",
962+
"types-tabulate",
963+
"types-PyYAML",
964+
"polars",
965+
"anywidget",
966+
]
967+
)
968+
| set(SYSTEM_TEST_STANDARD_DEPENDENCIES)
969+
| set(UNIT_TEST_STANDARD_DEPENDENCIES)
970+
)
971+
972+
session.install(*deps)
973+
shutil.rmtree(".mypy_cache", ignore_errors=True)
974+
session.run(
975+
"mypy",
976+
"bigframes",
977+
os.path.join("tests", "system"),
978+
os.path.join("tests", "unit"),
979+
"--check-untyped-defs",
980+
"--explicit-package-bases",
981+
'--exclude="^third_party"',
982+
)

0 commit comments

Comments
 (0)