-
-
Notifications
You must be signed in to change notification settings - Fork 653
Closed
Labels
Description
📚 Documentation
Example snippets are inserted into the docstring to show usage. However, these pieces of code might be deprecated, or might not work. The module doctest
aims to execute the tests written in docstring and it works fine with sphinx. It could help to detect earlier doc issues and provide a better doc.
Useful links
- https://docs.python.org/3/library/doctest.html
- https://www.sphinx-doc.org/en/master/usage/extensions/doctest.html
Note that some tests was written according to doctest
ignite/ignite/handlers/timing.py
Line 30 in b3d9849
>>> from ignite.handlers import Timer |
The main point is the refactoring of every test to pass the validation. It means have consistent pieces of code (define training fn, engines, etc.) to provide reproducible examples.
ydcjeff