mmsegmentation/docs/en/conf.py

134 lines
3.9 KiB
Python
Raw Normal View History

# Copyright (c) OpenMMLab. All rights reserved.
2020-07-07 20:52:19 +08:00
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import subprocess
2020-07-07 20:52:19 +08:00
import sys
import pytorch_sphinx_theme
sys.path.insert(0, os.path.abspath('../../'))
2020-07-07 20:52:19 +08:00
# -- Project information -----------------------------------------------------
project = 'MMSegmentation'
[Doc] Add Chinese Documentation (#666) * Add chinese doc base (#593) * [Doc] Add Chinese doc for useful_tools_md (#642) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * pipeline * cus_model * cus_model * cus_model * runtime_md * dataset_prepare * useful_tools * refine * Update useful_tools.md * Update useful_tools.md Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * [Doc] Add Chinese doc for get_started (#615) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * get_started_md * refine_get_started_md * [Doc] Add Chinese doc for tutorial03_tutorial_datapipeline_md (#629) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * pipeline * refine * Update data_pipeline.md Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * [Doc] Add Chinese doc for tutorials04_customized_models_md (#630) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * pipeline * cus_model * cus_model * cus_model * refine * refine * Update customize_models.md Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * [Doc] Add Chinese doc for dataset_prepare_md (#640) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * pipeline * cus_model * cus_model * cus_model * runtime_md * dataset_prepare * Update dataset_prepare.md Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * [Doc] Add Chinese doc for tutorials05_training_tricks_md (#631) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * pipeline * cus_model * cus_model * cus_model * traning tricks md * traning tricks md * refine * refine * refine * Update training_tricks.md Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * [Doc] Add Chinese doc for tutorials06_customized_runtime_md (#637) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * pipeline * cus_model * cus_model * cus_model * runtime_md * Update customize_runtime.md Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * [Doc] Add Chinese doc for tutorials01_config_md (#628) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * new_config_md * new_config_md1 * new_config_md1 * refine * refine * Update config.md Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * [Doc] Add Chinese for modelzoo (#597) * [Doc] Add Chinese for modelzoo * add missing * [Doc] Add Chinese doc for tutorial02_customized_dataset_md (#620) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * tutorial_customized_dataset * refine * Update customize_datasets.md * fixconflict Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * [Doc] Add Chinese doc for train.md (#616) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * train_md * refine * refine_last * refine_last * refine_last * refine_last * refine_last * temp * refine_last * qwe Co-authored-by: yuanzhang <yuanzhang@yuanzhangdeMacBook-Pro.local> * [Doc] Add Chinese doc for inference.md (#617) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * inference_zh_md * Update docs_zh-CN/inference.md Directly delete this sentence? Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * qwe * temp * qw * Update docs_zh-CN/inference.md * Update docs_zh-CN/inference.md * Update docs_zh-CN/inference.md * Update docs_zh-CN/inference.md * Update docs_zh-CN/inference.md * Update inference.md Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * fixed some dir * fixed typo Co-authored-by: MengzhangLI <mcmong@pku.edu.cn> Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> Co-authored-by: yuanzhang <yuanzhang@yuanzhangdeMacBook-Pro.local>
2021-07-03 23:54:32 +08:00
copyright = '2020-2021, OpenMMLab'
2020-07-07 20:52:19 +08:00
author = 'MMSegmentation Authors'
version_file = '../../mmseg/version.py'
def get_version():
with open(version_file) as f:
exec(compile(f.read(), version_file, 'exec'))
return locals()['__version__']
2020-07-07 20:52:19 +08:00
# The full version, including alpha/beta/rc tags
release = get_version()
2020-07-07 20:52:19 +08:00
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx.ext.viewcode',
'sphinx_markdown_tables', 'sphinx_copybutton', 'myst_parser'
2020-07-07 20:52:19 +08:00
]
autodoc_mock_imports = [
'matplotlib', 'pycocotools', 'mmseg.version', 'mmcv.ops'
]
2020-07-07 20:52:19 +08:00
# Ignore >>> when copying code
copybutton_prompt_text = r'>>> |\.\.\. '
copybutton_prompt_is_regexp = True
2020-07-07 20:52:19 +08:00
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
}
# The master toctree document.
master_doc = 'index'
# 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']
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
# html_theme = 'sphinx_rtd_theme'
html_theme = 'pytorch_sphinx_theme'
html_theme_path = [pytorch_sphinx_theme.get_html_theme_path()]
html_theme_options = {
'logo_url':
'https://mmsegmentation.readthedocs.io/en/latest/',
'menu': [
{
'name':
'Tutorial',
'url':
'https://github.com/open-mmlab/mmsegmentation/blob/master/'
'demo/MMSegmentation_Tutorial.ipynb'
},
{
'name': 'GitHub',
'url': 'https://github.com/open-mmlab/mmsegmentation'
},
{
'name':
'Upstream',
'children': [
{
'name': 'MMCV',
'url': 'https://github.com/open-mmlab/mmcv',
'description': 'Foundational library for computer vision'
},
]
},
],
# Specify the language of shared menu
'menu_lang':
'en'
}
2020-07-07 20:52:19 +08:00
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_css_files = ['css/readthedocs.css']
# Enable ::: for my_st
myst_enable_extensions = ['colon_fence']
language = 'en'
[Doc] Add Chinese Documentation (#666) * Add chinese doc base (#593) * [Doc] Add Chinese doc for useful_tools_md (#642) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * pipeline * cus_model * cus_model * cus_model * runtime_md * dataset_prepare * useful_tools * refine * Update useful_tools.md * Update useful_tools.md Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * [Doc] Add Chinese doc for get_started (#615) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * get_started_md * refine_get_started_md * [Doc] Add Chinese doc for tutorial03_tutorial_datapipeline_md (#629) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * pipeline * refine * Update data_pipeline.md Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * [Doc] Add Chinese doc for tutorials04_customized_models_md (#630) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * pipeline * cus_model * cus_model * cus_model * refine * refine * Update customize_models.md Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * [Doc] Add Chinese doc for dataset_prepare_md (#640) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * pipeline * cus_model * cus_model * cus_model * runtime_md * dataset_prepare * Update dataset_prepare.md Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * [Doc] Add Chinese doc for tutorials05_training_tricks_md (#631) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * pipeline * cus_model * cus_model * cus_model * traning tricks md * traning tricks md * refine * refine * refine * Update training_tricks.md Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * [Doc] Add Chinese doc for tutorials06_customized_runtime_md (#637) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * pipeline * cus_model * cus_model * cus_model * runtime_md * Update customize_runtime.md Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * [Doc] Add Chinese doc for tutorials01_config_md (#628) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * new_config_md * new_config_md1 * new_config_md1 * refine * refine * Update config.md Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * [Doc] Add Chinese for modelzoo (#597) * [Doc] Add Chinese for modelzoo * add missing * [Doc] Add Chinese doc for tutorial02_customized_dataset_md (#620) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * tutorial_customized_dataset * refine * Update customize_datasets.md * fixconflict Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * [Doc] Add Chinese doc for train.md (#616) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * train_md * refine * refine_last * refine_last * refine_last * refine_last * refine_last * temp * refine_last * qwe Co-authored-by: yuanzhang <yuanzhang@yuanzhangdeMacBook-Pro.local> * [Doc] Add Chinese doc for inference.md (#617) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * inference_zh_md * Update docs_zh-CN/inference.md Directly delete this sentence? Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * qwe * temp * qw * Update docs_zh-CN/inference.md * Update docs_zh-CN/inference.md * Update docs_zh-CN/inference.md * Update docs_zh-CN/inference.md * Update docs_zh-CN/inference.md * Update inference.md Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * fixed some dir * fixed typo Co-authored-by: MengzhangLI <mcmong@pku.edu.cn> Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> Co-authored-by: yuanzhang <yuanzhang@yuanzhangdeMacBook-Pro.local>
2021-07-03 23:54:32 +08:00
def builder_inited_handler(app):
subprocess.run(['./stat.py'])
def setup(app):
app.connect('builder-inited', builder_inited_handler)