Skip to content

[Docs]: Find a way to check all docs code snippets #379

Description

@CalMacCQ

Documentation Type

Missing documentation

Documentation Location

Docstrings of public classes and functions in guppyft.

Issue Description

All of the code in the .md and .ipynb docs is executed in C.I. and will therefore fail if a PR contains changes that break the API.

The code snippets in the docstrings e.g. valid_clifford_implementation are not tested so could potentially get out of sync with the API if we aren't careful.

Suggested Improvement

Find a way to check these example snippets at docs build time

Maybe using jupyter-execute:: directives would work? This has to be rst syntax rather than md to work with docstrings.

Theres also Python doctest which could be worth looking at https://docs.python.org/3/library/doctest.html

Additional Context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions