Skip to content

[docs] Capitalize the term after a colon label prefix in headings - #65526

Merged
dstrodtman merged 2 commits into
ray-project:masterfrom
dstrodtman:djs-260817-heading-label-prefix-rule
Sep 2, 2026
Merged

dstrodtman merged 2 commits into
ray-project:masterfrom
dstrodtman:djs-260817-heading-label-prefix-rule

Conversation

@dstrodtman

Copy link
Copy Markdown
Contributor

Summary

Adds one rule to the writing style guide: when a heading opens with a short label and a colon, capitalize the first term after the colon. Fixes the six headings under doc/source that don't follow it.

Use:  Example: Creating a custom mean aggregator
Not:  Example: creating a custom mean aggregator
Not:  Example: Creating a Custom Mean Aggregator

The label before the colon is a prefix, not the start of the sentence, so the title that follows begins like a title. Sentence case still governs the rest of the heading, so this isn't a return to title case.

This codifies existing practice

I audited every heading under doc/source before writing the rule, rather than asserting a preference:

Colon-prefixed headings Capitalized after the colon Not capitalized
708 664 6

(The raw scan reported 44 non-conforming, but 38 were kubectl describe output inside literal blocks that my heuristic mistook for RST headings. The six below are the real ones.)

So the convention is already what Ray docs overwhelmingly do. This writes it down and cleans up the stragglers.

Headings fixed

  • train/user-guides/asynchronous-validation.rst — "Example: validation with Ray Train TorchTrainer" and "Example: validation with Ray Data map_batches"
  • ray-core/internals/rpc-fault-tolerance.rst — "Hidden problem: long-polling RPCs"
  • ray-core/runtime_env_auth.md — "Running on VMs: the netrc File" (also lowercases the stray "File")
  • serve/production-guide/fault-tolerance.md — "Guide: end-to-end fault tolerance for your Serve app"
  • cluster/configure-manage-dashboard.md — "Dashboard message: either Prometheus or Grafana server is not detected"

The identifier carve-out

The rule explicitly exempts code identifiers. ## Pod configuration: headGroupSpec and workerGroupSpecs in cluster/kubernetes/user-guides/config.md is correct as written and is deliberately not touched here, because headGroupSpec is a real API field name. Without the carve-out this rule invites someone to "fix" it into HeadGroupSpec, which would be wrong.

No anchor churn

Every change here is capitalization only, and both MyST and Sphinx lowercase heading text when generating anchor slugs. #guide-end-to-end-fault-tolerance-for-your-serve-app is the slug before and after. No inbound deep link breaks, and the one heading carrying an explicit label ((serve-e2e-ft-guide)=) keeps it.

Why it's worth a rule

A naive sentence-case pass actively breaks these headings — it lowercases through the colon and makes the page read worse. That happened in #65374 and had to be reverted. Since Google.Headings is disabled repo-wide, heading case is a human check with no tool behind it, so the guide is the only place this can live.

Add the rule to the writing style guide and fix the six headings in doc/source
that don't follow it.

A heading like 'Example: creating a custom mean aggregator' reads as a sentence
fragment because sentence case gets applied through the colon. The label before
the colon is a prefix rather than the start of the sentence, so the title after
it should begin like a title.

This codifies what the docs already do. Of 708 colon-prefixed headings under
doc/source, 664 already capitalize the term after the colon and only these six
don't. Carve out code identifiers, which keep their real casing, so nobody
'fixes' headGroupSpec into HeadGroupSpec.

Signed-off-by: Douglas Strodtman <[email protected]>
@dstrodtman
dstrodtman requested review from a team as code owners August 17, 2026 11:17

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 updates the documentation style guide to require capitalizing the first term after a colon when a heading starts with a short label. It also updates several documentation files to adhere to this new rule and ensure consistent sentence casing. As there are no review comments, I have no feedback to provide.

The example used a gerund three lines above the rule that says to write task
headings as imperatives, which endorsed the pattern the guide asks you to avoid.
The example doesn't have to match any published page.

Signed-off-by: Douglas Strodtman <[email protected]>
@dstrodtman dstrodtman added go add ONLY when ready to merge, run all tests docs-go RtD-only checks for docs-only changes. Doesn't run full library doc-test suites. labels Aug 17, 2026
@ray-gardener ray-gardener Bot added the core Issues that should be addressed in Ray Core label Aug 17, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

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 Sep 1, 2026

@ronny-anyscale ronny-anyscale left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

crackle

@dstrodtman
dstrodtman merged commit c76067e into ray-project:master Sep 2, 2026
7 checks passed
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…y-project#65526)

## Summary

Adds one rule to the writing style guide: when a heading opens with a
short label and a colon, capitalize the first term after the colon.
Fixes the six headings under `doc/source` that don't follow it.

```
Use:  Example: Creating a custom mean aggregator
Not:  Example: creating a custom mean aggregator
Not:  Example: Creating a Custom Mean Aggregator
```

The label before the colon is a prefix, not the start of the sentence,
so the title that follows begins like a title. Sentence case still
governs the rest of the heading, so this isn't a return to title case.

## This codifies existing practice

I audited every heading under `doc/source` before writing the rule,
rather than asserting a preference:

| Colon-prefixed headings | Capitalized after the colon | Not
capitalized |
|---|---|---|
| 708 | 664 | 6 |

(The raw scan reported 44 non-conforming, but 38 were `kubectl describe`
output inside literal blocks that my heuristic mistook for RST headings.
The six below are the real ones.)

So the convention is already what Ray docs overwhelmingly do. This
writes it down and cleans up the stragglers.

## Headings fixed

- `train/user-guides/asynchronous-validation.rst` — "Example: validation
with Ray Train TorchTrainer" and "Example: validation with Ray Data
map_batches"
- `ray-core/internals/rpc-fault-tolerance.rst` — "Hidden problem:
long-polling RPCs"
- `ray-core/runtime_env_auth.md` — "Running on VMs: the netrc File"
(also lowercases the stray "File")
- `serve/production-guide/fault-tolerance.md` — "Guide: end-to-end fault
tolerance for your Serve app"
- `cluster/configure-manage-dashboard.md` — "Dashboard message: either
Prometheus or Grafana server is not detected"

## The identifier carve-out

The rule explicitly exempts code identifiers. `## Pod configuration:
headGroupSpec and workerGroupSpecs` in
`cluster/kubernetes/user-guides/config.md` is correct as written and is
deliberately not touched here, because `headGroupSpec` is a real API
field name. Without the carve-out this rule invites someone to "fix" it
into `HeadGroupSpec`, which would be wrong.

## No anchor churn

Every change here is capitalization only, and both MyST and Sphinx
lowercase heading text when generating anchor slugs.
`#guide-end-to-end-fault-tolerance-for-your-serve-app` is the slug
before and after. No inbound deep link breaks, and the one heading
carrying an explicit label (`(serve-e2e-ft-guide)=`) keeps it.

## Why it's worth a rule

A naive sentence-case pass actively breaks these headings — it
lowercases through the colon and makes the page read worse. That
happened in ray-project#65374 and had to be reverted. Since `Google.Headings` is
disabled repo-wide, heading case is a human check with no tool behind
it, so the guide is the only place this can live.

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core docs-go RtD-only checks for docs-only changes. Doesn't run full library doc-test suites. go add ONLY when ready to merge, run all tests 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.

3 participants