From 7b8145d102d8c380586764af005d1ab60ee66874 Mon Sep 17 00:00:00 2001 From: Balaji Veeramani Date: Mon, 12 Jun 2023 14:49:24 -0700 Subject: [PATCH] [Doc][CI] Test examples in MyST files (#35964) 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 --- bazel/python.bzl | 1 + doc/BUILD | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bazel/python.bzl b/bazel/python.bzl index 703ada4cb7658..9f60dddd47bdb 100644 --- a/bazel/python.bzl +++ b/bazel/python.bzl @@ -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], diff --git a/doc/BUILD b/doc/BUILD index f036c4f319bcc..0f8321ba9bd2d 100644 --- a/doc/BUILD +++ b/doc/BUILD @@ -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", @@ -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" ]