Skip to content

Commit

Permalink
[Doc][CI] Test examples in MyST files (ray-project#35964)
Browse files Browse the repository at this point in the history
This PR makes CI test code-block-style (testcode) and doctest-style (>>>) examples in Markdown files.

Previously, CI only tested RST files (all libraries except for Serve use RST).

---------

Signed-off-by: Balaji Veeramani <[email protected]>
  • Loading branch information
bveeramani committed Jun 12, 2023
1 parent fb4942b commit 7b8145d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions bazel/python.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def doctest(files, gpu = False, name="doctest", deps=[], srcs=[], data=[], args=
size = size,
args = [
"--doctest-modules",
"--doctest-glob='*.md'",
"-c=$(location //bazel:conftest.py)",
"-v"
] + args + ["$(location :%s)" % file for file in files],
Expand Down
5 changes: 4 additions & 1 deletion doc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ py_test_run_all_subdirectory(

doctest(
files = glob(
include=["source/**/*.rst"],
include=["source/**/*.rst", "source/**/*.md"],
exclude=[
"source/ray-contribute/getting-involved.rst",
"source/ray-core/handling-dependencies.rst",
Expand All @@ -317,6 +317,9 @@ doctest(
"source/ray-observability/user-guides/cli-sdk.rst",
"source/rllib/rllib-env.rst",
"source/rllib/rllib-sample-collection.rst",
"source/serve/multi-app.md",
"source/serve/production-guide/deploy-vm.md",
"source/serve/production-guide/fault-tolerance.md",
"source/data/batch_inference.rst",
"source/data/transforming-data.rst"
]
Expand Down

0 comments on commit 7b8145d

Please sign in to comment.