| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| | import os
|
| | import subprocess
|
| | import sys
|
| |
|
| | import pytorch_sphinx_theme
|
| |
|
| | sys.path.insert(0, os.path.abspath('../..'))
|
| |
|
| |
|
| |
|
| | project = 'MMAction2'
|
| | copyright = '2020, OpenMMLab'
|
| | author = 'MMAction2 Authors'
|
| | version_file = '../.././mmaction/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.autosummary',
|
| | 'sphinx.ext.intersphinx',
|
| | 'sphinx.ext.napoleon',
|
| | 'sphinx.ext.viewcode',
|
| | 'myst_parser',
|
| | 'sphinx_copybutton',
|
| | 'sphinx_tabs.tabs',
|
| | 'notfound.extension',
|
| | 'sphinxcontrib.jquery',
|
| | ]
|
| |
|
| |
|
| | autodoc_mock_imports = ['mmaction.version', 'PIL']
|
| |
|
| | copybutton_prompt_text = r'>>> |\.\.\. '
|
| | copybutton_prompt_is_regexp = True
|
| |
|
| |
|
| | templates_path = ['_templates']
|
| |
|
| |
|
| |
|
| |
|
| | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
| |
|
| |
|
| | source_suffix = {'.rst': 'restructuredtext', '.md': 'markdown'}
|
| |
|
| |
|
| |
|
| |
|
| | html_theme = 'pytorch_sphinx_theme'
|
| |
|
| |
|
| |
|
| |
|
| |
|
| | html_theme_path = [pytorch_sphinx_theme.get_html_theme_path()]
|
| | html_theme_options = {
|
| |
|
| | 'menu': [
|
| | {
|
| | 'name':
|
| | 'Tutorial',
|
| | 'url':
|
| | 'https://colab.research.google.com/github/'
|
| | 'open-mmlab/mmaction2/blob/master/demo/mmaction2_tutorial.ipynb'
|
| | },
|
| | {
|
| | 'name': 'GitHub',
|
| | 'url': 'https://github.com/open-mmlab/mmaction2'
|
| | },
|
| | {
|
| | 'name':
|
| | 'Upstream',
|
| | 'children': [{
|
| | 'name':
|
| | 'MMCV',
|
| | 'url':
|
| | 'https://github.com/open-mmlab/mmcv',
|
| | 'description':
|
| | 'Foundational library for computer vision'
|
| | }, {
|
| | 'name':
|
| | 'MMPreTrain',
|
| | 'url':
|
| | 'https://github.com/open-mmlab/mmpretrain',
|
| | 'description':
|
| | 'Open source pre-training toolbox based on PyTorch'
|
| | }, {
|
| | 'name':
|
| | 'MMDetection',
|
| | 'url':
|
| | 'https://github.com/open-mmlab/mmdetection',
|
| | 'description':
|
| | 'Object detection toolbox and benchmark'
|
| | }, {
|
| | 'name':
|
| | 'MMPose',
|
| | 'url':
|
| | 'https://github.com/open-mmlab/mmpose',
|
| | 'description':
|
| | 'Open-source toolbox for pose estimation based on PyTorch.'
|
| | }]
|
| | },
|
| | ],
|
| |
|
| | 'menu_lang':
|
| | 'en'
|
| | }
|
| |
|
| | language = 'en'
|
| | master_doc = 'index'
|
| |
|
| | html_static_path = ['_static']
|
| | html_css_files = [
|
| | 'https://cdn.datatables.net/v/bs4/dt-1.12.1/datatables.min.css',
|
| | 'css/readthedocs.css'
|
| | ]
|
| | html_js_files = [
|
| | 'https://cdn.datatables.net/v/bs4/dt-1.12.1/datatables.min.js',
|
| | 'js/custom.js'
|
| | ]
|
| |
|
| | myst_enable_extensions = ['colon_fence']
|
| | myst_heading_anchors = 3
|
| |
|
| |
|
| | notfound_template = '404.html'
|
| |
|
| |
|
| | def builder_inited_handler(app):
|
| | if subprocess.run(['python', './stat.py']).returncode != 0:
|
| | raise RuntimeError('Failed to run the script `stat.py`.')
|
| | if subprocess.run(['python', './project_zoo.py']).returncode != 0:
|
| | raise RuntimeError('Failed to run the script `project_zoo.py`.')
|
| | if subprocess.run(['python', './dataset_zoo.py']).returncode != 0:
|
| | raise RuntimeError('Failed to run the script `dataset_zoo.py`.')
|
| |
|
| |
|
| | def setup(app):
|
| | app.connect('builder-inited', builder_inited_handler)
|
| |
|