-
Notifications
You must be signed in to change notification settings - Fork 6.9k
[Data][CI] Add lint to ensure tests actually run #57601
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
Conversation
Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: Balaji Veeramani <[email protected]>
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.
Code Review
This pull request introduces a valuable linting check to ensure all tests in ray.data
are executable, which is a great improvement for CI reliability. The changes correctly add the necessary pytest.main
call to several test files. My review includes a few minor suggestions to improve code style consistency in the newly added code snippets by grouping imports, following PEP 8 guidelines. This also includes updating the semgrep
rule's suggested snippet to reflect this style.
types-PyYAML==6.0.12.2 | ||
black==22.10.0 | ||
semgrep==1.32.0 | ||
semgrep==1.136.0 |
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.
Needed to upgrade the version to make this work properly
Signed-off-by: Balaji Veeramani <[email protected]>
@@ -0,0 +1,2 @@ | |||
def test_ham(): | |||
assert False |
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.
I think we already have a lint for this? |
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.
leaving this for @elliot-barn to review. hail lord of lints!
I think we already have a lint for that, if we want to migrate to use semgrep, maybe remove the old one?
@aslonnie do you remember what the old one is called? Don't think it's working properly, because there are several Data tests that aren't actually run |
Line 96 in cef177f
https://buildkite.com/ray-project/microcheck/builds/28197#0199c9f9-72b5-4352-842a-b068bd23b377 |
Lets use semgrep and get rid of the pytest_checker script? Ill open a PR with these changes and pre-commit checks |
Closing in favor of #57617 |
Why are these changes needed?
Our CI runs tests with Bazel. Rather than running the tests with
pytest
, Bazel's executes the test Python files directly. So, to ensure that the tests actually run, we need to invokepytest
explicitly in our test files like this:This PR adds a lint to enforce this.
Related issue number
Checks
git commit -s
) in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.