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

[POC] Run arbitrary bash commands in doc as test #50988

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MortalHappiness
Copy link
Member

@MortalHappiness MortalHappiness commented Feb 28, 2025

This is a POC to automate the docs that requires manual testing by running arbitrary bash commands in doc as test using Jupyter notebooks.

This PR tries to convert KubeRay MobileNet example to automated test.

Note: It seems that currently the readthedoc CI build fails for all PRs. So there is no link for doc yet.

Run this PR

Prerequisites

  • kind, helm, kubectl, python
  • cd doc/source/cluster/kubernetes/
  • pip install pytest nbval bash_kernel jupyterlab requests
  • python -m bash_kernel.install
  • wget https://raw.githubusercontent.com/ray-project/serve_config_examples/607d1264c2c998e4a85eaf5403efcd3bc9ed3039/mobilenet/mobilenet_req.py
  • Prepare an image. And edit line 4 of the downloaded mobilenet_req.py to the path of your image.

Run test

py.test --nbval notebook.ipynb --nbval-kernel-name bash --sanitize-with doc_sanitize.cfg

Limitations

  • We cannot use tab-set in Jupyter notebooks.

References

@MortalHappiness MortalHappiness force-pushed the spike/doc-bash-command-as-test branch 2 times, most recently from 8e21aac to ba962f9 Compare February 28, 2025 13:12
@MortalHappiness MortalHappiness force-pushed the spike/doc-bash-command-as-test branch from ba962f9 to 7b2de40 Compare February 28, 2025 13:34
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