-
Notifications
You must be signed in to change notification settings - Fork 917
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
[FEA] Make style CI and pre-commit hooks consistent #8193
Comments
The second issue you pointed out (inconsistency between the selectors used for |
After looking into this for a bit, I think most of the changes here should be relatively simple:
A more complicated hook is
But even then, it looks like it doesn't pick up the same configuration that the pre-commit hook does; not sure if there's a way to explicitly set the config file here. |
Also do we know if the separate configs for |
Closes #8193 Makes changes to the pre-commit config, gpuCI style script, and `cpp/scripts/run-clang-format.py` so that the styling of the pre-commit hooks should roughly match the style checks done by gpuCI. In particular: - pre-commit's black and flake8 hooks now only target `python/` to match with gpuCI - gpuCI's `cpp/scripts/run-clang-format.py` now runs `clang-format` on `cpp/libcudf_kafka/` and `java/src/main/native/` to match with pre-commit (also removed `cpp/include/cudf` and `cpp/include/nvtext` as they were redundant here) - isort has been split up by project (cudf, dask-cudf, etc.) and now runs on each project using its respective configuration; this was done because currently the isort check on gpuCI was only checking Python files one level deep in each project It would probably be good to run the updated hooks on the codebase either in this PR or a linked one so that this changes doesn't break tests. Authors: - Charles Blackmon-Luca (https://github.com/charlesbluca) Approvers: - AJ Schmidt (https://github.com/ajschmidt8) - Mike Wilson (https://github.com/hyperbolic2346) - MithunR (https://github.com/mythrocks) - Richard (Rick) Zamora (https://github.com/rjzamora) - GALI PREM SAGAR (https://github.com/galipremsagar) - Nghia Truong (https://github.com/ttnghia) - Jason Lowe (https://github.com/jlowe) URL: #8215
Is your feature request related to a problem? Please describe.
Running
pre-commit run --all-files
against the codebase results in various test failures, while the style CI reports these same tests as passing.Some of these are related to the pre-commit hooks checking files that are typically ignored (such as
ci/utils/nbtestlog2junitxml.py
), while others seem to be related to the fact that the config used when running the hooks is different from that used in the style CI (namelyisort
,black
, andclang-format
).Describe the solution you'd like
Either:
ci/checks/style.sh
to enforce the additional rules set by the pre-commit hooksI imagine the latter option would be preferable as it would avoid having to run the pre-commit hooks against the codebase in a large PR.
Describe alternatives you've considered
Not doing anything; this is purely a QOL thing and can be entirely ignored since the pre-commit hooks don't seem to outright conflict with the style CI.
The text was updated successfully, but these errors were encountered: