Skip to content

[doc] Convert ray-contribute writing-code-snippets and testing-tips to MyST - #64115

Merged
elliot-barn merged 1 commit into
ray-project:masterfrom
dstrodtman:djs-260615-raycontrib-md-tierC
Jun 16, 2026
Merged

elliot-barn merged 1 commit into
ray-project:masterfrom
dstrodtman:djs-260615-raycontrib-md-tierC

Conversation

@dstrodtman

Copy link
Copy Markdown
Contributor

Description

Convert the two doctest-heavy contributor-facing Developer Guides pages in doc/source/ray-contribute/ from reStructuredText to MyST Markdown, matching the conventions already used by docs.md and agent-development.md. Continues the in-progress migration of the section to MyST (the declared standard for new pages).

Pages converted:

  • writing-code-snippets
  • testing-tips

Faithful format conversion only — no content restructuring.

writing-code-snippets is a meta-doc that both uses and demonstrates testcode/doctest blocks, so the literal-vs-executed distinction is preserved carefully:

  • The two real examples rendered under "They're rendered like this" — the is_even doctest-style and code-output-style blocks — become {doctest} and {testcode} + {testoutput}, so they stay covered by the docs doctest rule (which globs source/**/*.md).
  • Every block shown as syntax to copy stays a plain literal fence, so it renders but is never executed.
  • The two real {literalinclude} directives (of doc_code/example_module.py) and the writing-code-snippets_ref label are preserved.

testing-tips is excluded from the doctest rule, so its 6 {testcode} blocks render without executing. Its doc/BUILD.bazel exclude entry is updated from testing-tips.rst → testing-tips.md so it stays excluded — otherwise the source/**/*.md glob would pull it into doctest and its un-imported ray references would fail.

Toctree entries are extensionless and unchanged; getting-involved.rst's {ref} to writing-code-snippets_ref and docs.md's extensionless links keep resolving; the testing-tips.html redirect target is unaffected.

Related issues

None.

Additional information

Verified locally: the {literalinclude} target and is_even markers resolve; the two executed is_even blocks produce True/False; the GPU-steps numbered list keeps its nested code fences (rendered via markdown-it). The RtD preview build confirms the page builds; the docs doctest CI target exercises the writing-code-snippets executed blocks.

…o MyST

## Why

`doc/.claude/CLAUDE.md` declares MyST Markdown the standard for new doc
pages, and a lint check rejects newly added `.rst`. This continues the
`ray-contribute/` migration with the doctest-heavy pages.

## What

Convert two Developer Guides pages from reStructuredText to MyST Markdown,
matching the conventions in the existing `docs.md` / `agent-development.md`:

- `writing-code-snippets`
- `testing-tips`

Faithful format conversion only, no content restructuring.

`writing-code-snippets` is a meta-doc that both uses and demonstrates
testcode/doctest blocks. The two real, executed examples (the `is_even`
*doctest-style* and *code-output-style* blocks under "rendered like this")
become `{doctest}` and `{testcode}` + `{testoutput}` so they stay covered
by the docs doctest rule. Every block shown as *syntax to copy* stays a
plain literal fence, so it renders but is never executed. The two real
`{literalinclude}` directives and the `writing-code-snippets_ref` label
are preserved.

`testing-tips` is excluded from the doctest rule, so its 6 `{testcode}`
blocks render without executing. Its `doc/BUILD.bazel` exclude entry is
updated from `testing-tips.rst` to `testing-tips.md` so it stays excluded
— otherwise the `source/**/*.md` glob would pull it into doctest and its
un-imported `ray` references would fail.

Toctree entries are extensionless and unchanged; `getting-involved.rst`'s
`{ref}` to `writing-code-snippets_ref` and `docs.md`'s extensionless links
keep resolving; the `testing-tips.html` redirect target is unaffected.

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
@dstrodtman
dstrodtman requested a review from a team as a code owner June 15, 2026 20:42

@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 converts documentation files testing-tips and writing-code-snippets from reStructuredText (.rst) to MyST Markdown (.md) and updates the Bazel build configuration accordingly. The reviewer feedback highlights a typo in a section header in writing-code-snippets.md, suggests updating copy-paste templates to use MyST syntax instead of RST to prevent contributor confusion, and points out a missing period in testing-tips.md.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

)
```

## How to handle long or non-determnistic outputs

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.

medium

There is a typo in the section header: 'non-determnistic' should be 'non-deterministic'.

Suggested change
## How to handle long or non-determnistic outputs
## How to handle long or non-deterministic outputs

Comment on lines +17 to +21
:::{note}
The examples in this guide use reStructuredText. If you're writing
Markdown, use MyST syntax. To learn more, read the
[MyST documentation](https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html#directives-a-block-level-extension-point).
:::

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.

medium

Since this page has been successfully converted to MyST Markdown (which is the declared standard for new documentation pages), it would be highly beneficial to update the copy-paste templates throughout this guide to use MyST syntax (e.g., {doctest}, {testcode}) instead of reStructuredText (.. doctest::, .. testcode::). Keeping the RST templates as the primary copy-paste examples in a .md file is likely to confuse contributors, leading them to copy-paste RST syntax into MyST files where it won't render correctly.


By default, `ray.init()` detects the number of CPUs and GPUs on your local machine/cluster.

However, your testing environment may have a significantly lower number of resources. For example, the TravisCI build environment only has [2 cores](https://docs.travis-ci.com/user/reference/overview/)

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.

medium

Add a missing period at the end of the sentence.

Suggested change
However, your testing environment may have a significantly lower number of resources. For example, the TravisCI build environment only has [2 cores](https://docs.travis-ci.com/user/reference/overview/)
However, your testing environment may have a significantly lower number of resources. For example, the TravisCI build environment only has [2 cores](https://docs.travis-ci.com/user/reference/overview/).

@elliot-barn elliot-barn added the go add ONLY when ready to merge, run all tests label Jun 15, 2026
@elliot-barn
elliot-barn merged commit 990374f into ray-project:master Jun 16, 2026
3 checks passed
elliot-barn pushed a commit that referenced this pull request Jun 22, 2026
…vement to MyST (#64136)

## Description

Convert the final three contributor-facing **Developer Guides** pages in
`doc/source/ray-contribute/` from reStructuredText to MyST Markdown,
completing the section's migration to MyST (the declared standard for
new pages). These are the hub/entry pages — the most coupled in the
section.

Pages converted:

- `getting-involved` — the contributor hub
- `development` — building Ray from source
- `involvement` — the community-links partial included by
`getting-involved`

**Faithful format conversion only — no content restructuring.** Notable
handling:

- **`development`** — the sphinx-design `.. tab-set::` / `.. tab-item::`
and two `.. dropdown::` blocks become colon-fence directives
(`::::{tab-set}` / `:::{tab-item}` / `:::{dropdown}`) so the nested code
fences compose cleanly. All 8 cross-reference labels are preserved
(`building-ray`, `fork-ray-repo`, `prepare-venv`, `python-develop`,
`python-develop-uninstall`, `build-distributable-wheel`,
`build-ray-image`, `full-source-build`) — referenced internally and from
`getting-involved`.
- **`getting-involved`** — its two `.. testcode::` blocks (the canonical
pydoc examples) become `{testcode}`; the page stays excluded from the
doctest rule, so its `doc/BUILD.bazel` exclude entry is updated `.rst` →
`.md`. The `.. include::` of `involvement` becomes `{include}
involvement.md`, and the shared `_includes/_latest_contribution_doc.rst`
banner stays an include via `{include}` with `:parser: rst`. The
`getting-involved` label is preserved.
- **`involvement`** — a content partial (no frontmatter); its
named-reference links are inlined, which also removes the duplicate `on
GitHub` target it shared with `getting-involved`.

Companion **`.claude/`** updates point at the new `.md` paths (root
`CLAUDE.md`, the `lint` and `rebuild` skills, the python-guidelines
rule). Toctree entries are extensionless and unchanged; `.html` redirect
targets are unaffected.

**One forced rendering change:** the lettered sub-list (a/b/c) under
"Fork the Ray repository" becomes a numbered sub-list (1/2/3), since
MyST/CommonMark has no alpha-enumerated lists.

## Related issues

None.

## Additional information

Verified locally: frontmatter parses; backtick and `:::` colon fences
balance (60/60 and 10/10); all 9 labels present;
`{testcode}`/`{toctree}`/`{include}`/`{tab-set}`/`{tab-item}`/`{dropdown}`
counts are exact; no residual RST outside fences; and the
blockquote-wrapped code, the Windows nested numbered list, and the
python-develop column-0 code-block list all render correctly via
markdown-it. The RtD preview build is the authoritative check for the
sphinx-design directives and cross-references.

Completes the `ray-contribute/` RST→MyST migration (Tier A #64100, Tier
B #64111, Tier C #64115, plus the `rst-to-myst` skill #64135).

**Cross-reference fixes** (flagged by the initial RtD build):
`docs.md`'s link to the renamed `getting-involved` is now extensionless,
and `getting-involved`'s two intra-page section links use MyST `#anchor`
fragments — the original `.html#anchor` form isn't resolved by MyST and
emits `myst.xref_missing`.

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
limarkdcunha pushed a commit to limarkdcunha/ray that referenced this pull request Jun 30, 2026
…o MyST (ray-project#64115)

## Description

Convert the two doctest-heavy contributor-facing **Developer Guides**
pages in `doc/source/ray-contribute/` from reStructuredText to MyST
Markdown, matching the conventions already used by `docs.md` and
`agent-development.md`. Continues the in-progress migration of the
section to MyST (the declared standard for new pages).

Pages converted:

- `writing-code-snippets`
- `testing-tips`

**Faithful format conversion only — no content restructuring.**

`writing-code-snippets` is a meta-doc that both *uses* and
*demonstrates* testcode/doctest blocks, so the literal-vs-executed
distinction is preserved carefully:

- The two real examples rendered under "They're rendered like this" —
the `is_even` *doctest-style* and *code-output-style* blocks — become
`{doctest}` and `{testcode}` + `{testoutput}`, so they stay covered by
the docs doctest rule (which globs `source/**/*.md`).
- Every block shown as *syntax to copy* stays a plain literal fence, so
it renders but is never executed.
- The two real `{literalinclude}` directives (of
`doc_code/example_module.py`) and the `writing-code-snippets_ref` label
are preserved.

`testing-tips` is **excluded** from the doctest rule, so its 6
`{testcode}` blocks render without executing. Its `doc/BUILD.bazel`
exclude entry is updated from `testing-tips.rst` → `testing-tips.md` so
it stays excluded — otherwise the `source/**/*.md` glob would pull it
into doctest and its un-imported `ray` references would fail.

Toctree entries are extensionless and unchanged;
`getting-involved.rst`'s `{ref}` to `writing-code-snippets_ref` and
`docs.md`'s extensionless links keep resolving; the `testing-tips.html`
redirect target is unaffected.

## Related issues

None.

## Additional information

Verified locally: the `{literalinclude}` target and `is_even` markers
resolve; the two executed `is_even` blocks produce `True`/`False`; the
GPU-steps numbered list keeps its nested code fences (rendered via
markdown-it). The RtD preview build confirms the page builds; the docs
doctest CI target exercises the `writing-code-snippets` executed blocks.

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
limarkdcunha pushed a commit to limarkdcunha/ray that referenced this pull request Jun 30, 2026
…vement to MyST (ray-project#64136)

## Description

Convert the final three contributor-facing **Developer Guides** pages in
`doc/source/ray-contribute/` from reStructuredText to MyST Markdown,
completing the section's migration to MyST (the declared standard for
new pages). These are the hub/entry pages — the most coupled in the
section.

Pages converted:

- `getting-involved` — the contributor hub
- `development` — building Ray from source
- `involvement` — the community-links partial included by
`getting-involved`

**Faithful format conversion only — no content restructuring.** Notable
handling:

- **`development`** — the sphinx-design `.. tab-set::` / `.. tab-item::`
and two `.. dropdown::` blocks become colon-fence directives
(`::::{tab-set}` / `:::{tab-item}` / `:::{dropdown}`) so the nested code
fences compose cleanly. All 8 cross-reference labels are preserved
(`building-ray`, `fork-ray-repo`, `prepare-venv`, `python-develop`,
`python-develop-uninstall`, `build-distributable-wheel`,
`build-ray-image`, `full-source-build`) — referenced internally and from
`getting-involved`.
- **`getting-involved`** — its two `.. testcode::` blocks (the canonical
pydoc examples) become `{testcode}`; the page stays excluded from the
doctest rule, so its `doc/BUILD.bazel` exclude entry is updated `.rst` →
`.md`. The `.. include::` of `involvement` becomes `{include}
involvement.md`, and the shared `_includes/_latest_contribution_doc.rst`
banner stays an include via `{include}` with `:parser: rst`. The
`getting-involved` label is preserved.
- **`involvement`** — a content partial (no frontmatter); its
named-reference links are inlined, which also removes the duplicate `on
GitHub` target it shared with `getting-involved`.

Companion **`.claude/`** updates point at the new `.md` paths (root
`CLAUDE.md`, the `lint` and `rebuild` skills, the python-guidelines
rule). Toctree entries are extensionless and unchanged; `.html` redirect
targets are unaffected.

**One forced rendering change:** the lettered sub-list (a/b/c) under
"Fork the Ray repository" becomes a numbered sub-list (1/2/3), since
MyST/CommonMark has no alpha-enumerated lists.

## Related issues

None.

## Additional information

Verified locally: frontmatter parses; backtick and `:::` colon fences
balance (60/60 and 10/10); all 9 labels present;
`{testcode}`/`{toctree}`/`{include}`/`{tab-set}`/`{tab-item}`/`{dropdown}`
counts are exact; no residual RST outside fences; and the
blockquote-wrapped code, the Windows nested numbered list, and the
python-develop column-0 code-block list all render correctly via
markdown-it. The RtD preview build is the authoritative check for the
sphinx-design directives and cross-references.

Completes the `ray-contribute/` RST→MyST migration (Tier A ray-project#64100, Tier
B ray-project#64111, Tier C ray-project#64115, plus the `rst-to-myst` skill ray-project#64135).

**Cross-reference fixes** (flagged by the initial RtD build):
`docs.md`'s link to the renamed `getting-involved` is now extensionless,
and `getting-involved`'s two intra-page section links use MyST `#anchor`
fragments — the original `.html#anchor` form isn't resolved by MyST and
emits `myst.xref_missing`.

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
400Ping pushed a commit to 400Ping/ray that referenced this pull request Aug 18, 2026
…o MyST (ray-project#64115)

## Description

Convert the two doctest-heavy contributor-facing **Developer Guides**
pages in `doc/source/ray-contribute/` from reStructuredText to MyST
Markdown, matching the conventions already used by `docs.md` and
`agent-development.md`. Continues the in-progress migration of the
section to MyST (the declared standard for new pages).

Pages converted:

- `writing-code-snippets`
- `testing-tips`

**Faithful format conversion only — no content restructuring.**

`writing-code-snippets` is a meta-doc that both *uses* and
*demonstrates* testcode/doctest blocks, so the literal-vs-executed
distinction is preserved carefully:

- The two real examples rendered under "They're rendered like this" —
the `is_even` *doctest-style* and *code-output-style* blocks — become
`{doctest}` and `{testcode}` + `{testoutput}`, so they stay covered by
the docs doctest rule (which globs `source/**/*.md`).
- Every block shown as *syntax to copy* stays a plain literal fence, so
it renders but is never executed.
- The two real `{literalinclude}` directives (of
`doc_code/example_module.py`) and the `writing-code-snippets_ref` label
are preserved.

`testing-tips` is **excluded** from the doctest rule, so its 6
`{testcode}` blocks render without executing. Its `doc/BUILD.bazel`
exclude entry is updated from `testing-tips.rst` → `testing-tips.md` so
it stays excluded — otherwise the `source/**/*.md` glob would pull it
into doctest and its un-imported `ray` references would fail.

Toctree entries are extensionless and unchanged;
`getting-involved.rst`'s `{ref}` to `writing-code-snippets_ref` and
`docs.md`'s extensionless links keep resolving; the `testing-tips.html`
redirect target is unaffected.

## Related issues

None.

## Additional information

Verified locally: the `{literalinclude}` target and `is_even` markers
resolve; the two executed `is_even` blocks produce `True`/`False`; the
GPU-steps numbered list keeps its nested code fences (rendered via
markdown-it). The RtD preview build confirms the page builds; the docs
doctest CI target exercises the `writing-code-snippets` executed blocks.

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: 400Ping <[email protected]>
400Ping pushed a commit to 400Ping/ray that referenced this pull request Aug 18, 2026
…vement to MyST (ray-project#64136)

## Description

Convert the final three contributor-facing **Developer Guides** pages in
`doc/source/ray-contribute/` from reStructuredText to MyST Markdown,
completing the section's migration to MyST (the declared standard for
new pages). These are the hub/entry pages — the most coupled in the
section.

Pages converted:

- `getting-involved` — the contributor hub
- `development` — building Ray from source
- `involvement` — the community-links partial included by
`getting-involved`

**Faithful format conversion only — no content restructuring.** Notable
handling:

- **`development`** — the sphinx-design `.. tab-set::` / `.. tab-item::`
and two `.. dropdown::` blocks become colon-fence directives
(`::::{tab-set}` / `:::{tab-item}` / `:::{dropdown}`) so the nested code
fences compose cleanly. All 8 cross-reference labels are preserved
(`building-ray`, `fork-ray-repo`, `prepare-venv`, `python-develop`,
`python-develop-uninstall`, `build-distributable-wheel`,
`build-ray-image`, `full-source-build`) — referenced internally and from
`getting-involved`.
- **`getting-involved`** — its two `.. testcode::` blocks (the canonical
pydoc examples) become `{testcode}`; the page stays excluded from the
doctest rule, so its `doc/BUILD.bazel` exclude entry is updated `.rst` →
`.md`. The `.. include::` of `involvement` becomes `{include}
involvement.md`, and the shared `_includes/_latest_contribution_doc.rst`
banner stays an include via `{include}` with `:parser: rst`. The
`getting-involved` label is preserved.
- **`involvement`** — a content partial (no frontmatter); its
named-reference links are inlined, which also removes the duplicate `on
GitHub` target it shared with `getting-involved`.

Companion **`.claude/`** updates point at the new `.md` paths (root
`CLAUDE.md`, the `lint` and `rebuild` skills, the python-guidelines
rule). Toctree entries are extensionless and unchanged; `.html` redirect
targets are unaffected.

**One forced rendering change:** the lettered sub-list (a/b/c) under
"Fork the Ray repository" becomes a numbered sub-list (1/2/3), since
MyST/CommonMark has no alpha-enumerated lists.

## Related issues

None.

## Additional information

Verified locally: frontmatter parses; backtick and `:::` colon fences
balance (60/60 and 10/10); all 9 labels present;
`{testcode}`/`{toctree}`/`{include}`/`{tab-set}`/`{tab-item}`/`{dropdown}`
counts are exact; no residual RST outside fences; and the
blockquote-wrapped code, the Windows nested numbered list, and the
python-develop column-0 code-block list all render correctly via
markdown-it. The RtD preview build is the authoritative check for the
sphinx-design directives and cross-references.

Completes the `ray-contribute/` RST→MyST migration (Tier A ray-project#64100, Tier
B ray-project#64111, Tier C ray-project#64115, plus the `rst-to-myst` skill ray-project#64135).

**Cross-reference fixes** (flagged by the initial RtD build):
`docs.md`'s link to the renamed `getting-involved` is now extensionless,
and `getting-involved`'s two intra-page section links use MyST `#anchor`
fragments — the original `.html#anchor` form isn't resolved by MyST and
emits `myst.xref_missing`.

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: 400Ping <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants