-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CI] Migrate from sphinx.ext.doctest
to pytest-sphinx
#35286
Conversation
This reverts commit 5984f1e.
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
This reverts commit de05655. Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
@@ -85,7 +85,7 @@ def train_loop_per_worker(): | |||
|
|||
Example: | |||
|
|||
.. code-block:: python | |||
.. testcode:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need at least one GPU test, or else Bazel fails and complains that no tests were found.
@@ -61,6 +61,29 @@ | |||
# these tests in n different jobs. | |||
|
|||
load("//bazel:python.bzl", "py_test_module_list") | |||
load("//bazel:python.bzl", "doctest") | |||
|
|||
# TODO(@bveeramani): Enable doctests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RLLib has many failing doctests. Since it'll take a while to address those, I'd like to enable doctests for RLLib in a follow-up PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stamp for docs, also cc @can-anyscale for vis
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stamp by asking. i never review this.
nice work! |
#35286 broke CI. These issues weren't caught earlier because the PR was out of date with master.
#35286 temporarily disabled doctests for RLLib because there are many broken and (previously) untested docstring examples. This PR re-enables them. --------- Signed-off-by: Balaji Veeramani <balaji@anyscale.com> Signed-off-by: Artur Niederfahrenhorst <attaismyname@googlemail.com> Co-authored-by: Artur Niederfahrenhorst <attaismyname@googlemail.com>
…t#35286) This PR switches our doctest tooling from sphinx.ext.doctest to pytest-sphinx. Context We want to test all code snippets in CI. testcode and doctest examples are tested in CI with sphinx.ext.doctest. But, we often write code-block:: python examples, and they aren't tested in CI. Problem sphinx.ext.doctest doesn't let you test specific files. As a result, it's hard to update examples or isolate GPU examples. Solution Migrate to pytest-sphinx. Two reasons: Lets us run GPU doctests Enables developers to quickly test their examples --------- Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
ray-project#35286 broke CI. These issues weren't caught earlier because the PR was out of date with master.
…t#35286) This PR switches our doctest tooling from sphinx.ext.doctest to pytest-sphinx. Context We want to test all code snippets in CI. testcode and doctest examples are tested in CI with sphinx.ext.doctest. But, we often write code-block:: python examples, and they aren't tested in CI. Problem sphinx.ext.doctest doesn't let you test specific files. As a result, it's hard to update examples or isolate GPU examples. Solution Migrate to pytest-sphinx. Two reasons: Lets us run GPU doctests Enables developers to quickly test their examples --------- Signed-off-by: Balaji Veeramani <balaji@anyscale.com> Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
ray-project#35286 broke CI. These issues weren't caught earlier because the PR was out of date with master. Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
ray-project#35286 temporarily disabled doctests for RLLib because there are many broken and (previously) untested docstring examples. This PR re-enables them. --------- Signed-off-by: Balaji Veeramani <balaji@anyscale.com> Signed-off-by: Artur Niederfahrenhorst <attaismyname@googlemail.com> Co-authored-by: Artur Niederfahrenhorst <attaismyname@googlemail.com> Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
Stacked on:
log_once
docstring #35807TorchDetectionPredictor
type hint and docstring #35829Why are these changes needed?
This PR switches our doctest tooling from sphinx.ext.doctest to pytest-sphinx.
Context
We want to test all code snippets in CI.
testcode
and doctest examples are tested in CI withsphinx.ext.doctest
. But, we often writecode-block:: python
examples, and they aren't tested in CI.Problem
sphinx.ext.doctest
doesn't let you test specific files. As a result, it's hard to update examples or isolate GPU examples.Solution
Migrate to
pytest-sphinx
. Two reasons:Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.