Skip to content

[docs] Ray rllib precommit fix#59592

Closed
Aydin-ab wants to merge 9 commits intoray-project:masterfrom
Aydin-ab:ray-rllib-precommit-fix
Closed

[docs] Ray rllib precommit fix#59592
Aydin-ab wants to merge 9 commits intoray-project:masterfrom
Aydin-ab:ray-rllib-precommit-fix

Conversation

@Aydin-ab
Copy link
Copy Markdown
Contributor

doc/source has been excluded from pre-commit, fixing current format/lint errors before including it back.

## 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>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 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.

Signed-off-by: Aydin Abiar <aydin@anyscale.com>
Signed-off-by: Aydin Abiar <aydin@anyscale.com>
Signed-off-by: Aydin Abiar <aydin@anyscale.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 7, 2026

This pull request has been automatically marked as stale because it has not had
any activity for 14 days. It will be closed in another 14 days if no further activity occurs.
Thank you for your contributions.

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.

@github-actions github-actions bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Jan 7, 2026
@github-actions
Copy link
Copy Markdown

This pull request has been automatically closed because there has been no more activity in the 14 days
since being marked stale.

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!

@github-actions github-actions bot closed this Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale The issue is stale. It will be closed within 7 days unless there are further conversation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant