123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- import os
- import subprocess
- import sys
- import pytorch_sphinx_theme
- sys.path.insert(0, os.path.abspath('../..'))
- project = 'MMDetection'
- copyright = '2018-2021, OpenMMLab'
- author = 'MMDetection Authors'
- version_file = '../../mmdet/version.py'
- def get_version():
- with open(version_file, 'r') as f:
- exec(compile(f.read(), version_file, 'exec'))
- return locals()['__version__']
- release = get_version()
- extensions = [
- 'sphinx.ext.autodoc',
- 'sphinx.ext.napoleon',
- 'sphinx.ext.viewcode',
- 'myst_parser',
- 'sphinx_markdown_tables',
- 'sphinx_copybutton',
- ]
- myst_enable_extensions = ['colon_fence']
- myst_heading_anchors = 3
- autodoc_mock_imports = [
- 'matplotlib', 'pycocotools', 'terminaltables', 'mmdet.version', 'mmcv.ops'
- ]
- 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/mmdetection'
- },
- ],
-
- 'menu_lang':
- 'en'
- }
- html_static_path = ['_static']
- html_css_files = ['css/readthedocs.css']
- copybutton_prompt_text = r'>>> |\.\.\. '
- copybutton_prompt_is_regexp = True
- def builder_inited_handler(app):
- subprocess.run(['./stat.py'])
- def setup(app):
- app.connect('builder-inited', builder_inited_handler)
|