-
Notifications
You must be signed in to change notification settings - Fork 1.7k
test: enables assorted tests #16611
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
test: enables assorted tests #16611
Changes from 1 commit
7b13a81
1b30c5f
cbafca8
3df718a
9f09980
bafff39
0450b6b
314a2b3
4106be3
be47e99
920be87
f90c49b
fbeffee
aa6e4d8
32d0c23
c714005
48f9953
cc20328
638f083
ddd1798
b37e6f9
6281aad
331784d
79f8706
af805b2
bfacee1
639d4b4
63a8db8
22714cb
45edec2
71db755
ae27eed
9de5395
8ac5754
65d299e
6bf488c
b3ce14c
0710d70
bf376f5
76e2a47
1ee75a8
31f2ece
fe7b8b4
bb6ac8d
030f7af
b95638a
f6296fe
f5a129f
f42905c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -929,60 +929,54 @@ def core_deps_from_source(session): | |||||
| session.skip("Core deps from source tests are not yet supported") | ||||||
|
|
||||||
|
|
||||||
| @nox.session(python=DEFAULT_PYTHON_VERSION) | ||||||
| @nox.session(python=ALL_PYTHON[-1]) | ||||||
| def prerelease_deps(session): | ||||||
| """Run all tests with prerelease versions of dependencies installed.""" | ||||||
| # TODO(https://github.com/googleapis/google-cloud-python/issues/16014): | ||||||
| # Add prerelease deps tests | ||||||
| session.skip("prerelease deps tests are not yet supported") | ||||||
| unit_prerelease(session) | ||||||
| system_prerelease(session) | ||||||
|
|
||||||
|
|
||||||
| @nox.session(python=DEFAULT_PYTHON_VERSION) | ||||||
| # NOTE: this is the mypy session that came directly from the bigframes split repo | ||||||
| @nox.session(python="3.10") | ||||||
| def mypy(session): | ||||||
| """Run the type checker.""" | ||||||
| # TODO(https://github.com/googleapis/google-cloud-python/issues/16014): | ||||||
| # Add mypy tests previously used mypy session (below) failed to run in the monorepo | ||||||
| session.skip("mypy tests are not yet supported") | ||||||
|
|
||||||
|
|
||||||
| # @nox.session(python=ALL_PYTHON) | ||||||
| # def mypy(session): | ||||||
| # """Run type checks with mypy.""" | ||||||
| # # Editable mode is not compatible with mypy when there are multiple | ||||||
| # # package directories. See: | ||||||
| # # https://github.com/python/mypy/issues/10564#issuecomment-851687749 | ||||||
| # session.install(".") | ||||||
|
|
||||||
| # # Just install the dependencies' type info directly, since "mypy --install-types" | ||||||
| # # might require an additional pass. | ||||||
| # deps = ( | ||||||
| # set( | ||||||
| # [ | ||||||
| # MYPY_VERSION, | ||||||
| # # TODO: update to latest pandas-stubs once we resolve bigframes issues. | ||||||
| # "pandas-stubs<=2.2.3.241126", | ||||||
| # "types-protobuf", | ||||||
| # "types-python-dateutil", | ||||||
| # "types-requests", | ||||||
| # "types-setuptools", | ||||||
| # "types-tabulate", | ||||||
| # "types-PyYAML", | ||||||
| # "polars", | ||||||
| # "anywidget", | ||||||
| # ] | ||||||
| # ) | ||||||
| # | set(SYSTEM_TEST_STANDARD_DEPENDENCIES) | ||||||
| # | set(UNIT_TEST_STANDARD_DEPENDENCIES) | ||||||
| # ) | ||||||
|
|
||||||
| # session.install(*deps) | ||||||
| # shutil.rmtree(".mypy_cache", ignore_errors=True) | ||||||
| # session.run( | ||||||
| # "mypy", | ||||||
| # "bigframes", | ||||||
| # os.path.join("tests", "system"), | ||||||
| # os.path.join("tests", "unit"), | ||||||
| # "--check-untyped-defs", | ||||||
| # "--explicit-package-bases", | ||||||
| # '--exclude="^third_party"', | ||||||
| # ) | ||||||
| """Run type checks with mypy.""" | ||||||
| # Editable mode is not compatible with mypy when there are multiple | ||||||
| # package directories. See: | ||||||
| # https://github.com/python/mypy/issues/10564#issuecomment-851687749 | ||||||
| session.install(".") | ||||||
|
|
||||||
| # Just install the dependencies' type info directly, since "mypy --install-types" | ||||||
| # might require an additional pass. | ||||||
| deps = ( | ||||||
| set( | ||||||
| [ | ||||||
| MYPY_VERSION, | ||||||
| # TODO: update to latest pandas-stubs once we resolve bigframes issues. | ||||||
| "pandas-stubs<=2.2.3.241126", | ||||||
| "types-protobuf", | ||||||
| "types-python-dateutil", | ||||||
| "types-requests", | ||||||
| "types-setuptools", | ||||||
| "types-tabulate", | ||||||
| "types-PyYAML", | ||||||
| "polars", | ||||||
| "anywidget", | ||||||
| ] | ||||||
| ) | ||||||
| | set(SYSTEM_TEST_STANDARD_DEPENDENCIES) | ||||||
| | set(UNIT_TEST_STANDARD_DEPENDENCIES) | ||||||
| ) | ||||||
|
|
||||||
| session.install(*deps) | ||||||
| shutil.rmtree(".mypy_cache", ignore_errors=True) | ||||||
| session.run( | ||||||
| "mypy", | ||||||
| "bigframes", | ||||||
| os.path.join("tests", "system"), | ||||||
| os.path.join("tests", "unit"), | ||||||
| "--check-untyped-defs", | ||||||
| "--explicit-package-bases", | ||||||
| '--exclude="^third_party"', | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Suggested change
|
||||||
| ) | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoding
python="3.10"for themypysession is less flexible than using a version constant likeDEFAULT_PYTHON_VERSIONorALL_PYTHON[-1], which are used elsewhere in this file. Unless there is a specific requirement to run type checks only on Python 3.10, consider using the project's default Python version for consistency and easier maintenance.