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

Add/generate examples for operators #721

Open
jsntsay opened this issue Jun 15, 2021 · 1 comment
Open

Add/generate examples for operators #721

jsntsay opened this issue Jun 15, 2021 · 1 comment
Labels
documentation Improvements or additions to documentation usability

Comments

@jsntsay
Copy link
Member

jsntsay commented Jun 15, 2021

Similar to sklearn docs, each operator should have some working examples to demonstrate how to use them

@jsntsay jsntsay added documentation Improvements or additions to documentation usability labels Jun 15, 2021
@hirzel
Copy link
Member

hirzel commented Jun 17, 2021

We could use doctest. That way, the examples would serve a dual purpose of both illustrating intended usage and detecting regressions in the functionality. We would need to set it up so the doctests run as part of our GitHub Actions CI tests. However, another complicating factor is that the docstrings for operators are auto-generated from schemas. So we would want to make sure the flow from schemas to docstrings to doctests to regression tests works.

By the way, a handful of operators already have embedded code examples today:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation usability
Projects
None yet
Development

No branches or pull requests

2 participants