Skip to content

[Feature Request][Doc] Enable doctest extension for Sphinx #664

@tcbegley

Description

@tcbegley

Motivation

The docs for TorchRL, and the docstrings from which they are built, contain many example snippets. Currently these snippets are only tested for correctness manually and on a fairly ad-hoc basis.

Solution

There is a sphinx extension called doctest which is able to run the snippets when building the docs to make sure there are no syntax errors. If we enable this in our CI pipelines we can be much more confident that examples in our documentation are syntactically correct and use up to date APIs.

Checklist

  • I have checked that there is no similar issue in the repo (required)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions