|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import os |
|
import subprocess |
|
import sys |
|
|
|
import pytorch_sphinx_theme |
|
|
|
sys.path.insert(0, os.path.abspath('../../')) |
|
|
|
|
|
|
|
project = 'MMDetection3D' |
|
copyright = '2020-2023, OpenMMLab' |
|
author = 'MMDetection3D Authors' |
|
|
|
|
|
version_file = '../../mmdet3d/version.py' |
|
with open(version_file) as f: |
|
exec(compile(f.read(), version_file, 'exec')) |
|
__version__ = locals()['__version__'] |
|
release = __version__ |
|
|
|
|
|
|
|
|
|
|
|
|
|
extensions = [ |
|
'sphinx.ext.autodoc', |
|
'sphinx.ext.napoleon', |
|
'sphinx.ext.viewcode', |
|
'sphinx_markdown_tables', |
|
'sphinx_copybutton', |
|
'myst_parser', |
|
'sphinx.ext.intersphinx', |
|
'sphinx.ext.autodoc.typehints', |
|
'sphinx.ext.autosummary', |
|
'sphinx.ext.autosectionlabel', |
|
'sphinx_tabs.tabs', |
|
] |
|
autodoc_typehints = 'description' |
|
autodoc_mock_imports = ['mmcv._ext'] |
|
autosummary_generate = True |
|
|
|
|
|
copybutton_prompt_text = r'>>> |\.\.\. ' |
|
copybutton_prompt_is_regexp = True |
|
|
|
myst_enable_extensions = ['colon_fence'] |
|
|
|
|
|
templates_path = ['_templates'] |
|
|
|
|
|
|
|
|
|
source_suffix = { |
|
'.rst': 'restructuredtext', |
|
'.md': 'markdown', |
|
} |
|
|
|
|
|
master_doc = 'index' |
|
|
|
|
|
|
|
|
|
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
html_theme = 'pytorch_sphinx_theme' |
|
html_theme_path = [pytorch_sphinx_theme.get_html_theme_path()] |
|
html_theme_options = { |
|
'menu': [ |
|
{ |
|
'name': 'GitHub', |
|
'url': 'https://github.com/open-mmlab/mmdetection3d' |
|
}, |
|
{ |
|
'name': |
|
'Upstream', |
|
'children': [ |
|
{ |
|
'name': |
|
'MMEngine', |
|
'url': |
|
'https://github.com/open-mmlab/mmengine', |
|
'description': |
|
'Foundational library for training deep learning models' |
|
}, |
|
{ |
|
'name': 'MMCV', |
|
'url': 'https://github.com/open-mmlab/mmcv', |
|
'description': 'Foundational library for computer vision' |
|
}, |
|
{ |
|
'name': 'MMDetection', |
|
'url': 'https://github.com/open-mmlab/mmdetection', |
|
'description': 'Object detection toolbox and benchmark' |
|
}, |
|
] |
|
}, |
|
], |
|
|
|
'menu_lang': |
|
'en' |
|
} |
|
|
|
language = 'en' |
|
|
|
master_doc = 'index' |
|
|
|
|
|
|
|
|
|
html_static_path = ['_static'] |
|
|
|
html_css_files = [ |
|
'https://cdn.datatables.net/1.13.2/css/dataTables.bootstrap5.min.css', |
|
'css/readthedocs.css' |
|
] |
|
html_js_files = [ |
|
'https://cdn.datatables.net/1.13.2/js/jquery.dataTables.min.js', |
|
'https://cdn.datatables.net/1.13.2/js/dataTables.bootstrap5.min.js', |
|
'js/collapsed.js', |
|
'js/table.js', |
|
] |
|
|
|
myst_heading_anchors = 4 |
|
|
|
intersphinx_mapping = { |
|
'python': ('https://docs.python.org/3', None), |
|
'numpy': ('https://numpy.org/doc/stable', None), |
|
'torch': ('https://pytorch.org/docs/stable/', None), |
|
'mmcv': ('https://mmcv.readthedocs.io/en/latest/', None), |
|
'mmengine': ('https://mmengine.readthedocs.io/en/latest/', None), |
|
'mmdetection': ('https://mmdetection.readthedocs.io/en/latest/', None), |
|
} |
|
|
|
|
|
def builder_inited_handler(app): |
|
subprocess.run(['./stat.py']) |
|
|
|
|
|
def setup(app): |
|
app.connect('builder-inited', builder_inited_handler) |
|
|