Skip to content
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

Deprecate MOCK in favor of SKIP #3

Merged
merged 2 commits into from
Jun 12, 2023
Merged

Deprecate MOCK in favor of SKIP #3

merged 2 commits into from
Jun 12, 2023

Conversation

bveeramani
Copy link
Member

@bveeramani bveeramani commented Jun 12, 2023

Problem

sphinx.ext.doctest renders testcode and doctest blocks in our documentation. While rendering documentation, the extension complains about our custom MOCK option:

/ray/doc/source/data/iterating-over-data.rst:72: WARNING: 'MOCK' is not a valid option.

This wasn't caught before because warnings were accidentally disabled by ray-project/ray#32741.

Solution

Make SKIP behave like MOCK.

SKIP is a valid option. It tells Sphinx to completely skip an example. To avoid warnings, this PR changes the behavior of SKIP so that it runs example code but skips the output.

This won't cause any problems:

  1. We don't use SKIP anywhere, so this wouldn't break anything. `
  2. SKIP is functionally equivalent to skipif: True, so we can still completely skip examples if we want to.

Signed-off-by: Balaji Veeramani <[email protected]>
@bveeramani bveeramani changed the title Update pytest_sphinx.py Deprecate 'MOCK' in favor of 'SKIP Jun 12, 2023
@bveeramani bveeramani changed the title Deprecate 'MOCK' in favor of 'SKIP Deprecate MOCK in favor of `SKIP Jun 12, 2023
@bveeramani bveeramani changed the title Deprecate MOCK in favor of `SKIP Deprecate MOCK in favor of SKIP Jun 12, 2023
@bveeramani bveeramani merged commit 77ea922 into master Jun 12, 2023
@bveeramani bveeramani deleted the replace-mock branch June 12, 2023 22:18
bveeramani added a commit that referenced this pull request Jun 13, 2023
This reverts commit 77ea922.

Signed-off-by: Balaji Veeramani <[email protected]>
bveeramani added a commit that referenced this pull request Jun 13, 2023
This reverts commit 77ea922.

Signed-off-by: Balaji Veeramani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant