[Docs] Fix API reference & version, support exporting pdf & epub (#406)

* add mmdet

* remove uncessary autodoc mock import

* update docs version

* bind docs version to version.py

* support pdf and epub

* fix readthedocs
pull/395/head^2
Tong Gao 2021-08-04 14:24:52 +08:00 committed by GitHub
parent b812b7a57c
commit 7b16754006
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 48 deletions

View File

@ -1,5 +1,7 @@
version: 2
formats: all
python:
version: 3.7
install:

View File

@ -23,7 +23,11 @@ copyright = '2020-2030, OpenMMLab'
author = 'OpenMMLab'
# The full version, including alpha/beta/rc tags
release = '0.1.0'
version_file = '../mmocr/version.py'
with open(version_file, 'r') as f:
exec(compile(f.read(), version_file, 'exec'))
__version__ = locals()['__version__']
release = __version__
# -- General configuration ---------------------------------------------------
@ -38,29 +42,7 @@ extensions = [
'sphinx_markdown_tables',
]
autodoc_mock_imports = [
'torch',
'torchvision',
'mmcv',
'mmocr.version',
'mmdet',
'imgaug',
'kwarray',
'lmdb',
'matplotlib',
'Polygon',
'cv2',
'numpy',
'pyclipper',
'pycocotools',
'pytest',
'rapidfuzz',
'scipy',
'shapely',
'skimage',
'titlecase',
'PIL',
]
autodoc_mock_imports = ['mmcv._ext']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

View File

@ -23,7 +23,11 @@ copyright = '2020-2030, OpenMMLab'
author = 'OpenMMLab'
# The full version, including alpha/beta/rc tags
release = '0.1.0'
version_file = '../mmocr/version.py'
with open(version_file, 'r') as f:
exec(compile(f.read(), version_file, 'exec'))
__version__ = locals()['__version__']
release = __version__
# -- General configuration ---------------------------------------------------
@ -38,29 +42,7 @@ extensions = [
'sphinx_markdown_tables',
]
autodoc_mock_imports = [
'torch',
'torchvision',
'mmcv',
'mmocr.version',
'mmdet',
'imgaug',
'kwarray',
'lmdb',
'matplotlib',
'Polygon',
'cv2',
'numpy',
'pyclipper',
'pycocotools',
'pytest',
'rapidfuzz',
'scipy',
'shapely',
'skimage',
'titlecase',
'PIL',
]
autodoc_mock_imports = ['mmcv._ext']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

View File

@ -4,6 +4,7 @@ lanms-proper
lmdb
matplotlib
mmcv
mmdet
Polygon3
pyclipper
rapidfuzz