[Python API][Docs] Remove excess info (#10672)
* [Python API][Docs] Remove excess info * autodoc: add skip methods (#68) * remove utils from docs * undo changes Co-authored-by: Nikolay Tyukaev <nikolay.tyukaev@intel.com>
This commit is contained in:
1 parent
c54926ecb8
commit
cd52cc6767
2 files changed
+20
-15
No files matched your search
@@ -67,12 +67,6 @@ OpenVINO Python API
|
||||
|
||||
openvino.runtime.passes
|
||||
|
||||
.. autosummary::
|
||||
:toctree: _autosummary
|
||||
:template: custom-module-template.rst
|
||||
|
||||
openvino.runtime.utils
|
||||
|
||||
.. autosummary::
|
||||
:toctree: _autosummary
|
||||
:template: custom-module-template.rst
|
||||
@@ -85,12 +79,6 @@ OpenVINO Python API
|
||||
|
||||
openvino.frontend
|
||||
|
||||
.. autosummary::
|
||||
:toctree: _autosummary
|
||||
:template: custom-module-template.rst
|
||||
|
||||
openvino.offline_transformations
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:hidden:
|
||||
|
||||
+20
-3
@@ -63,7 +63,8 @@ templates_path = ['_templates']
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
# This pattern also affects html_static_path and html_extra_path.
|
||||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'openvino/inference-engine']
|
||||
exclude_patterns = ['_build', 'Thumbs.db',
|
||||
'.DS_Store', 'openvino/inference-engine']
|
||||
|
||||
|
||||
panels_add_bootstrap_css = False
|
||||
@@ -134,6 +135,7 @@ html_static_path = ['_static']
|
||||
# monkeypatch sphinx api doc to prevent showing inheritance from object and enum.Enum
|
||||
add_line = ClassDocumenter.add_line
|
||||
|
||||
|
||||
def add_line_no_base_object(self, line, *args, **kwargs):
|
||||
if line.strip() in ['Bases: :class:`object`', 'Bases: :class:`enum.Enum`']:
|
||||
return
|
||||
@@ -143,15 +145,30 @@ def add_line_no_base_object(self, line, *args, **kwargs):
|
||||
|
||||
ClassDocumenter.add_line = add_line_no_base_object
|
||||
|
||||
# OpenVINO Python API Reference Configuration
|
||||
exclude_pyapi_methods = ('__weakref__',
|
||||
'__doc__',
|
||||
'__module__',
|
||||
'__dict__',
|
||||
'add_openvino_libs_to_path'
|
||||
)
|
||||
|
||||
|
||||
def autodoc_skip_member(app, what, name, obj, skip, options):
|
||||
return name in exclude_pyapi_methods
|
||||
|
||||
|
||||
def setup(app):
|
||||
logger = logging.getLogger(__name__)
|
||||
app.add_config_value('doxygen_mapping_file', doxygen_mapping_file, rebuild=True)
|
||||
app.add_config_value('doxygen_mapping_file',
|
||||
doxygen_mapping_file, rebuild=True)
|
||||
app.add_config_value('repositories', repositories, rebuild=True)
|
||||
app.connect('autodoc-skip-member', autodoc_skip_member)
|
||||
app.add_js_file('js/custom.js')
|
||||
app.add_js_file('js/graphs.js')
|
||||
app.add_js_file('js/graphs_ov_tf.js')
|
||||
try:
|
||||
shutil.copytree(os.path.join(app.srcdir, 'csv'), os.path.join(app.outdir, 'csv'), dirs_exist_ok=True)
|
||||
shutil.copytree(os.path.join(app.srcdir, 'csv'), os.path.join(
|
||||
app.outdir, 'csv'), dirs_exist_ok=True)
|
||||
except FileNotFoundError:
|
||||
logger.warning('csv directory not found.')
|
||||
Reference in new issue
Block a user