Repository navigation
[doc] Add Vale rules for patterns the Ray Data style pass fixed by hand - #66424
dstrodtman wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces several new Vale style rules for the Ray project, including checks for brand capitalization (e.g., 'Hugging Face'), lowercasing generic Ray nouns, flagging filler words like 'under the hood' and 'seamlessly', requiring complete-sentence lead-ins, and preferring 'such as' over 'like' for examples. The feedback suggests expanding these rules to be more comprehensive: adding more generic nouns (like objects, clusters, workers, nodes, and placement groups) to the capitalization checks, flagging 'for instance:' as an incomplete lead-in, and including domain-specific nouns (like datasets, apis, and blocks) in the 'such as' rule.
| # legitimately keep the title's capitals, and scripts/ray_style_autofix.py would | ||
| # rewrite those blindly. | ||
| tokens: | ||
| - 'Ray (?:Tasks?|Actors?)\b' |
There was a problem hiding this comment.
The Ray style guide also lists other generic nouns that should be lowercased even when they name a Ray concept, such as object, cluster, worker, node, and placement group. Consider extending this rule to catch capitalized versions of these as well.
- 'Ray (?:Tasks?|Actors?|Objects?|Clusters?|Workers?|Nodes?|Placement [Gg]roups?)\b'References
- Lowercase generic nouns even when they name a Ray concept: task, actor, object, cluster, worker, node, placement group. (link)
There was a problem hiding this comment.
Mostly applied in 24405cb: added Objects, Workers, Nodes, and Placement Groups. Left out "Ray Cluster". Most of its uses in the docs are page and section titles, such as "Ray Clusters Overview", or the "Ray Cluster Launcher" component name, so flagging it would be mostly noise.
| # complete sentences that end with a colon. These fragments recur before code | ||
| # blocks. Flag only, since the right rewrite depends on what the example shows. | ||
| tokens: | ||
| - '\bfor example:' |
There was a problem hiding this comment.
Consider also flagging for instance: as an incomplete-sentence lead-in, as it is a common alternative to for example:.
- '\bfor (?:example|instance):'References
- Write list lead-ins as complete sentences, and end them with a colon. (link)
| # So this rule only flags, and only when "like" follows a plural noun that | ||
| # typically introduces a list of examples. Other uses are left to the prose pass. | ||
| tokens: | ||
| - '(?:formats|methods|functions|frameworks|libraries|services|operations|databases|tools|models) like' |
There was a problem hiding this comment.
Since these rules are inspired by the Ray Data style pass, consider adding other common domain-specific nouns like datasets, apis, and blocks to the list of nouns checked before like.
- '(?:formats|methods|functions|frameworks|libraries|services|operations|databases|tools|models|datasets|apis|blocks) like'References
- Use 'such as,' not 'like,' for examples. (link)
There was a problem hiding this comment.
Added datasets and APIs in 24405cb. Left out blocks, which never precedes an example list in the docs. Testing the APIs case also showed that the accept-list entry for APIs shadowed the rule, so Ray.SuchAs now sets vocab: false.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b6b2a0b. Configure here.
| ignorecase: false | ||
| vocab: false | ||
| swap: | ||
| HuggingFace: Hugging Face |
There was a problem hiding this comment.
Conflicting Hugging Face substitutions
Low Severity
Ray.Brands swaps HuggingFace to Hugging Face, but Google.WordList already maps huggingface and Huggingface to HuggingFace at error level. Both styles run on RLlib pages, so the error-level fix is the form this new warning then rejects.
Reviewed by Cursor Bugbot for commit b6b2a0b. Configure here.
53fca29 to
035ef43
Compare
24405cb to
f51c6d7
Compare
Add four rules to the shared Ray Vale style and extend Filler, for patterns that recurred across the Ray Data style pass: - Ray.SuchAs flags "like" only after a plural noun that introduces examples, such as "formats like". It's an existence rule rather than a substitution, because "like" is also a comparison and a verb and a swap would corrupt that prose. - Ray.Brands swaps "HuggingFace" for "Hugging Face", case-sensitively. - Ray.Capitalization flags "Ray Tasks" and "Ray Actors" in prose. - Ray.LeadIns flags "For example:" and "Here's an example" fragments. - Ray.Filler adds "under the hood" and "seamlessly". The Ray style stays registered for RLlib only. Nothing changes what Vale runs in CI. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
Add objects, workers, nodes, and placement groups to Ray.Capitalization, add datasets and APIs to Ray.SuchAs, and add "for instance:" to Ray.LeadIns. Set vocab: false on Ray.SuchAs, because the APIs accept-list entry shadowed the rule. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
cc85fba to
76c2545
Compare
f51c6d7 to
4546ffd
Compare
… for Ray Data docs (#66412) ## Why This PR collects the Vale configuration changes for the Ray Data docs into one review: - It prepares the Ray Data docs for a style and grammar pass. Vale can then flag real problems, such as future tense, without noise from valid terms it doesn't know. - It adds Vale rules to the shared `Ray` style for patterns that the Ray Data style pass fixed by hand, over and over, across the style-pass PRs stacked above this one. The rules were written after the style pass, so they sit lower in the stack than the work that motivated them. They touch the same Vale configuration for the same reason, so they're reviewed and landed together here. The rule changes were previously in #66424, now closed. Stacked on #66381, which is stacked on #66375 and #66352. Review and merge those first. This branch targets `doc-1524-data-prose-softwrap`. ## What ### Vocabulary and suppressions - Removes the two `<!-- vale off -->` / `<!-- vale on -->` blocks from `custom-datasource-example.md`. This was the only Ray Data page that disabled Vale. Both blocks suppressed the future-tense check, and the style pass should fix that prose rather than hide it. - Updates `.vale/styles/config/vocabularies/Data/accept.txt`: - Adds `BentoML`, `CIFAR`, `[Dd]ownscal(e|es|ed|ing)`, `JPEG`, `Kinetica`, `NVTabular`, `Petastorm`, `Psycopg`, `PyArrow`, `Tekken`, `torchtext`, and `torchvision`. - Changes `Datasinks?` to `[Dd]atasinks?` so lowercase "datasink" is accepted, matching `[Dd]atasource(s)?`. - Removes entries that duplicate other vocabularies: `docstrings`, `NLP`, `PIL`, and `TPU(s)?` are in General, and `XGBoost` is in Train. - Removes entries that don't appear in the prose of any `.md` or `.rst` page under `doc/source/`: `assess_quality`, `process_file`, `[Mm]ultiget(s)?`, `PDFs`, `Predibase('s)?`, `[Rr]eformat(s)?`, and `[Pp]ostprocessor(s)?`. - Renames the `ABS` tab to `Azure Blob Storage` in `loading-data.md` and `saving-data.md`, because the acronym isn't widely known. The remaining spelling and terms alerts are intentional. They point at text the style pass fixes: `Bento ML`, `Sagemaker`, `Numpy`, `pyarrow`, `underly`, `undersaturated`, and the unformatted `map_batches` and `smart_resize` identifiers. ### New rules These are rule files only. The `Ray` style is still registered for RLlib pages only, in `.vale.ini`, and nothing changes what Vale runs in CI. Vale on the Ray Data docs is disabled on purpose for now. | Rule | Type | Catches | Why this type | |---|---|---|---| | `Ray.SuchAs` | existence, warning | "like" after a plural noun that introduces examples, such as "formats like", "methods like", and "APIs like" | "like" is also a comparison ("works like a queue") and a verb ("if you'd like"), so a substitution would corrupt that prose. The rule only flags, and only after these nouns. | | `Ray.Brands` | substitution, case-sensitive | `HuggingFace` becomes `Hugging Face` | The literal has no other sense. The match is case-sensitive so lowercase identifiers such as `huggingface_hub` never match, and inline code is skipped anyway. | | `Ray.Capitalization` | existence, case-sensitive | `Ray Tasks`, `Ray Actors`, `Ray Objects`, `Ray Workers`, `Ray Nodes`, `Ray Placement Groups` | The style guide lowercases generic nouns that name a Ray concept. Flag only, because link text that quotes a page title can keep the title's capitals. | | `Ray.LeadIns` | existence, warning | `For example:`, `For instance:`, and `Here's an example` fragments used as lead-ins | The guide wants complete-sentence lead-ins. The right rewrite depends on the example, so the rule only flags. | | `Ray.Filler` additions | existence | "under the hood", "seamlessly" | Both came up repeatedly in the pass. | Each rule links to the matching section of `writing-style.md`. Left out on purpose: - **Slashes between words:** `I/O`, `TCP/IP`, and `and/or` are legitimate, and a pattern can't tell them apart. - **Gerund task headings:** some gerund H1s, such as "Loading data", are kept on purpose to match the nav titles. - **"Ray Cluster" in `Ray.Capitalization`:** it appears mostly in page and section titles ("Ray Clusters Overview") and in the "Ray Cluster Launcher" component name. - **"Pandas" to "pandas":** a case-sensitive swap misfires at the start of a sentence. ## Verification Vocabulary: `vale doc/source/data` with Vale 3.12: `Vale.Spelling` drops from 26 to 10 alerts, `Google.Acronyms` from 4 to 0, and the remaining `Vale.Spelling` and `Vale.Terms` alerts are all in the list above. `custom-datasource-example.md` now reports its three `Google.Will` alerts. Rules: - A test file with positive and negative cases, run with the real vocabularies loaded, so accept-list shadowing would show up. That check caught the `APIs` accept-list entry shadowing `Ray.SuchAs`, so the rule sets `vocab: false`. Every positive case fires. None of these fire: - "works like a queue" and "if you'd like" - `huggingface_hub` in inline code - "Ray Tasks" as `{ref}` link text - lowercase "Ray tasks" - The full `Ray` style, run by hand against all 25 top-level `doc/source/data/*.md` pages at the head of the style-pass stack, reports five warnings and none from the new rules: - "For now" in `mixing-data.md` and "Currently" in `performance-tips.md` are temporary-limitation signals that the stack keeps on purpose. - "seamlessly" in `comparisons.md` and "very" twice in `shuffling-data.md` were filler that the pass missed. They're now fixed in #66413 and #66420, the style PRs for those pages. - That run was at the head of the style-pass stack, not at this branch. Running the `Ray` style by hand against the Data pages here might report matches that the stack above fixes. That doesn't affect CI, since the `Ray` style isn't registered for Data pages. The Vale pre-commit hook is still commented out, so this doesn't change CI. ## AI assistance I made these changes with AI assistance (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
… for Ray Data docs (ray-project#66412) ## Why This PR collects the Vale configuration changes for the Ray Data docs into one review: - It prepares the Ray Data docs for a style and grammar pass. Vale can then flag real problems, such as future tense, without noise from valid terms it doesn't know. - It adds Vale rules to the shared `Ray` style for patterns that the Ray Data style pass fixed by hand, over and over, across the style-pass PRs stacked above this one. The rules were written after the style pass, so they sit lower in the stack than the work that motivated them. They touch the same Vale configuration for the same reason, so they're reviewed and landed together here. The rule changes were previously in ray-project#66424, now closed. Stacked on ray-project#66381, which is stacked on ray-project#66375 and ray-project#66352. Review and merge those first. This branch targets `doc-1524-data-prose-softwrap`. ## What ### Vocabulary and suppressions - Removes the two `<!-- vale off -->` / `<!-- vale on -->` blocks from `custom-datasource-example.md`. This was the only Ray Data page that disabled Vale. Both blocks suppressed the future-tense check, and the style pass should fix that prose rather than hide it. - Updates `.vale/styles/config/vocabularies/Data/accept.txt`: - Adds `BentoML`, `CIFAR`, `[Dd]ownscal(e|es|ed|ing)`, `JPEG`, `Kinetica`, `NVTabular`, `Petastorm`, `Psycopg`, `PyArrow`, `Tekken`, `torchtext`, and `torchvision`. - Changes `Datasinks?` to `[Dd]atasinks?` so lowercase "datasink" is accepted, matching `[Dd]atasource(s)?`. - Removes entries that duplicate other vocabularies: `docstrings`, `NLP`, `PIL`, and `TPU(s)?` are in General, and `XGBoost` is in Train. - Removes entries that don't appear in the prose of any `.md` or `.rst` page under `doc/source/`: `assess_quality`, `process_file`, `[Mm]ultiget(s)?`, `PDFs`, `Predibase('s)?`, `[Rr]eformat(s)?`, and `[Pp]ostprocessor(s)?`. - Renames the `ABS` tab to `Azure Blob Storage` in `loading-data.md` and `saving-data.md`, because the acronym isn't widely known. The remaining spelling and terms alerts are intentional. They point at text the style pass fixes: `Bento ML`, `Sagemaker`, `Numpy`, `pyarrow`, `underly`, `undersaturated`, and the unformatted `map_batches` and `smart_resize` identifiers. ### New rules These are rule files only. The `Ray` style is still registered for RLlib pages only, in `.vale.ini`, and nothing changes what Vale runs in CI. Vale on the Ray Data docs is disabled on purpose for now. | Rule | Type | Catches | Why this type | |---|---|---|---| | `Ray.SuchAs` | existence, warning | "like" after a plural noun that introduces examples, such as "formats like", "methods like", and "APIs like" | "like" is also a comparison ("works like a queue") and a verb ("if you'd like"), so a substitution would corrupt that prose. The rule only flags, and only after these nouns. | | `Ray.Brands` | substitution, case-sensitive | `HuggingFace` becomes `Hugging Face` | The literal has no other sense. The match is case-sensitive so lowercase identifiers such as `huggingface_hub` never match, and inline code is skipped anyway. | | `Ray.Capitalization` | existence, case-sensitive | `Ray Tasks`, `Ray Actors`, `Ray Objects`, `Ray Workers`, `Ray Nodes`, `Ray Placement Groups` | The style guide lowercases generic nouns that name a Ray concept. Flag only, because link text that quotes a page title can keep the title's capitals. | | `Ray.LeadIns` | existence, warning | `For example:`, `For instance:`, and `Here's an example` fragments used as lead-ins | The guide wants complete-sentence lead-ins. The right rewrite depends on the example, so the rule only flags. | | `Ray.Filler` additions | existence | "under the hood", "seamlessly" | Both came up repeatedly in the pass. | Each rule links to the matching section of `writing-style.md`. Left out on purpose: - **Slashes between words:** `I/O`, `TCP/IP`, and `and/or` are legitimate, and a pattern can't tell them apart. - **Gerund task headings:** some gerund H1s, such as "Loading data", are kept on purpose to match the nav titles. - **"Ray Cluster" in `Ray.Capitalization`:** it appears mostly in page and section titles ("Ray Clusters Overview") and in the "Ray Cluster Launcher" component name. - **"Pandas" to "pandas":** a case-sensitive swap misfires at the start of a sentence. ## Verification Vocabulary: `vale doc/source/data` with Vale 3.12: `Vale.Spelling` drops from 26 to 10 alerts, `Google.Acronyms` from 4 to 0, and the remaining `Vale.Spelling` and `Vale.Terms` alerts are all in the list above. `custom-datasource-example.md` now reports its three `Google.Will` alerts. Rules: - A test file with positive and negative cases, run with the real vocabularies loaded, so accept-list shadowing would show up. That check caught the `APIs` accept-list entry shadowing `Ray.SuchAs`, so the rule sets `vocab: false`. Every positive case fires. None of these fire: - "works like a queue" and "if you'd like" - `huggingface_hub` in inline code - "Ray Tasks" as `{ref}` link text - lowercase "Ray tasks" - The full `Ray` style, run by hand against all 25 top-level `doc/source/data/*.md` pages at the head of the style-pass stack, reports five warnings and none from the new rules: - "For now" in `mixing-data.md` and "Currently" in `performance-tips.md` are temporary-limitation signals that the stack keeps on purpose. - "seamlessly" in `comparisons.md` and "very" twice in `shuffling-data.md` were filler that the pass missed. They're now fixed in ray-project#66413 and ray-project#66420, the style PRs for those pages. - That run was at the head of the style-pass stack, not at this branch. Running the `Ray` style by hand against the Data pages here might report matches that the stack above fixes. That doesn't affect CI, since the `Ray` style isn't registered for Data pages. The Vale pre-commit hook is still commented out, so this doesn't change CI. ## AI assistance I made these changes with AI assistance (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>


Description
Adds Vale rules to the shared
Raystyle for patterns that the Ray Data style pass fixed by hand, over and over, across the five PRs below it.Stacked on #66423, the last of the five Ray Data style-pass PRs. This branch targets
doc-1524-data-style-perf.This PR adds rule files only. The
Raystyle is still registered for RLlib pages only, in.vale.ini, and nothing changes what Vale runs in CI. Vale on the Ray Data docs is disabled on purpose for now.New rules
Ray.SuchAsRay.BrandsHuggingFacebecomesHugging Facehuggingface_hubnever match, and inline code is skipped anyway.Ray.CapitalizationRay Tasks,Ray Actors,Ray Objects,Ray Workers,Ray Nodes,Ray Placement GroupsRay.LeadInsFor example:,For instance:, andHere's an examplefragments used as lead-insRay.FilleradditionsEach rule links to the matching section of
writing-style.md.Left out on purpose
I/O,TCP/IP, andand/orare legitimate, and a pattern can't tell them apart.Ray.Capitalization: it appears mostly in page and section titles ("Ray Clusters Overview") and in the "Ray Cluster Launcher" component name.Verification
APIsaccept-list entry shadowingRay.SuchAs, so the rule setsvocab: false. Every positive case fires. None of these fire:huggingface_hubin inline code{ref}link textRaystyle, run by hand against all 25 top-leveldoc/source/data/*.mdpages at the head of the style-pass stack, reports five warnings and none from the new rules:mixing-data.mdand "Currently" inperformance-tips.mdare temporary-limitation signals that the stack keeps on purpose.comparisons.mdand "very" twice inshuffling-data.mdwere filler that the pass missed. They're now fixed in [doc] Style and grammar pass on Ray Data docs #66413 and [doc] Style pass on Ray Data operation guides #66420, the style PRs for those pages.AI assistance
I made these changes with AI assistance (Claude Code).
🤖 Generated with Claude Code