Coverage for mlprodict/npy/xop_sphinx.py: 0%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

11 statements  

1""" 

2@file 

3@brief Automates the generation of operators for the 

4documentation for the Xop API. 

5 

6:: 

7 

8 def setup(app): 

9 app.connect('builder-inited', generate_op_doc) 

10 

11.. versionadded:: 0.9 

12""" 

13from .xop_auto import onnx_documentation_folder 

14 

15 

16def _generate_op_doc(app): 

17 from sphinx.util import logging 

18 logger = logging.getLogger(__name__) 

19 folder = app.config.onnx_doc_folder 

20 onnx_documentation_folder(folder, fLOG=logger.info) 

21 

22 

23def setup(app): 

24 """ 

25 Sphinx extension `mlprodict.npy.xop_sphinx` displays documentation 

26 on ONN Operators. 

27 """ 

28 import sphinx 

29 app.add_config_value('onnx_doc_folder', 'onnx_doc_folder', 'env') 

30 app.connect('builder-inited', _generate_op_doc) 

31 return {'version': sphinx.__display_version__, 'parallel_read_safe': True}