facebookresearch / CompilerGym

Reinforcement learning environments for compiler and program optimization tasks
https://compilergym.ai/
MIT License
906 stars 127 forks source link

Add DocTest to CI #553

Open mostafaelhoushi opened 2 years ago

mostafaelhoushi commented 2 years ago

🚀 Feature

Ensure that code examples in our documentation are covered by CI.

Motivation

To ensure that no user tries a code example in our documentation and gets surprised by wrong results or an error message.

Pitch

Start here: Doctest at docs.python.org -https://docs.python.org/3/library/doctest.html

Other content: Doctest at sphinx-doc.org - https://www.sphinx-doc.org/en/master/usage/extensions/doctest.html Sphinx Tutorial at RTD - https://sphinx-tutorial.readthedocs.io/step-3/ How to include doctest... - https://thomas-cokelaer.info/tutorials/sphinx/doctest.html

Alternatives

Not sure if DocTest can check code examples in README files. Maybe we may need to look for other tools.

Additional context

N/A