-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
[SPARK-36989][TESTS][PYTHON] Add type hints data tests #34296
Conversation
cc @HyukjinKwon @itholic @ueshin @xinrong-databricks FYI |
Test build #144306 has finished for PR 34296 at commit
|
Kubernetes integration test starting |
Kubernetes integration test starting |
Kubernetes integration test status failure |
Kubernetes integration test status failure |
Test build #144307 has finished for PR 34296 at commit
|
thanks @zero323 for working on this! |
Kubernetes integration test starting |
Kubernetes integration test status failure |
Test build #144331 has finished for PR 34296 at commit
|
Kubernetes integration test starting |
Kubernetes integration test status failure |
Test build #144371 has finished for PR 34296 at commit
|
Kubernetes integration test starting |
Quick update: All test files from However, I hit typeddjango/pytest-mypy-plugins#83, which has serious impact on test performance, when numpy is installed (the whole suite requires > 20 minutes, compared to ~50 seconds when numpy is not present). |
Kubernetes integration test status failure |
Test build #144374 has finished for PR 34296 at commit
|
Kubernetes integration test starting |
Kubernetes integration test status failure |
Test build #144457 has finished for PR 34296 at commit
|
echo "starting mypy annotations test..." | ||
PYTEST_REPORT=$( ($MYPY_BUILD \ | ||
--config-file python/mypy.ini \ | ||
--cache-dir /tmp/.mypy_cache/ \ |
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.
If we set --cache-dir
here explicitly, we can reuse cached for the data tests.
Alternatively, we can use $PWD
as the --mypy-testing-base
in the data tests, but I'd prefer to avoid that, because temporary files are written there.
Kubernetes integration test starting |
Kubernetes integration test status failure |
Kubernetes integration test starting |
Test build #144557 has finished for PR 34296 at commit
|
Kubernetes integration test status failure |
Test build #144558 has finished for PR 34296 at commit
|
Kubernetes integration test starting |
Kubernetes integration test status failure |
Test build #144560 has finished for PR 34296 at commit
|
Merged to master. |
What changes were proposed in this pull request?
This PR:
dev/lint-python
, usingtypeddjango/pytest-mypy-plugins
pyspark-stubs
In case of failure, a message similar to the following one
will be displayed.
Why are the changes needed?
Currently, type annotations are tested primarily for integrity and, to lesser extent, against actual API. Testing against examples is work in progress (SPARK-36997). Data tests allow us to improve coverage and test negative cases (code, that should fail type checker validation).
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Running linter tests with additions proposed in this PR