[docs] Ray rllib precommit fix#59592
Conversation
## Context PR ray-project#57799 removed ci/lint/format.sh and the `code_format` job from the microcheck pipeline in favor of pre-commit-only checks. However, this created a gap in coverage: .pre-commit-config.yaml globally excludes doc/source/, meaning Python/shell files in documentation are no longer formatted or linted. ## Problem Many Anyscale console templates use content from doc/source/, including .py, .sh, and .yaml files that users reference. These files should follow the same formatting standards as the rest of the Ray repo. The old format.sh checked doc/source/ with: - black (Python formatting) - shellcheck (shell script linting) - docstyle (Ray docstring style) - check-import-order (import ordering) ## Solution Updated .pre-commit-config.yaml to restore formatting checks on doc/source/: 1. Changed global exclude from "doc/source/" to only exclude notebooks 2. Added "exclude: ^doc/source/" to 14 hooks that weren't in format.sh 3. Kept black, shellcheck, docstyle, and check-import-order enabled Also marked the dead code_format() function in ci/lint/lint.sh for removal. ## Files Changed - .pre-commit-config.yaml: Restore formatting checks for doc/source/ - ci/lint/lint.sh: Mark dead code_format() function for removal Signed-off-by: Aydin Abiar <aydin@anyscale.com>
Signed-off-by: Aydin Abiar <aydin@anyscale.com>
Signed-off-by: Aydin Abiar <aydin@anyscale.com>
There was a problem hiding this comment.
Code Review
This pull request refactors the pre-commit configuration to enable the vale linter for documentation files in doc/source. This is achieved by removing doc/source from the global exclude list and adding it to the exclude lists of individual hooks, which is a sound approach. The changes also include extensive updates to the vale vocabulary and numerous small but valuable improvements to the documentation files, enhancing clarity and readability. Overall, the changes are well-executed and improve the project's documentation quality and linting setup. I've found one minor issue regarding a duplicate entry in a vocabulary file.
|
This pull request has been automatically marked as stale because it has not had You can always ask for help on our discussion forum or Ray's public slack channel. If you'd like to keep this open, just leave any comment, and the stale label will be removed. |
|
This pull request has been automatically closed because there has been no more activity in the 14 days Please feel free to reopen or open a new pull request if you'd still like this to be addressed. Again, you can always ask for help on our discussion forum or Ray's public slack channel. Thanks again for your contribution! |
doc/source has been excluded from pre-commit, fixing current format/lint errors before including it back.