[Docs] Fix sphinx error (#22)

* [Docs] Fix sphinx error

* [Docs] Fix sphinx error

* [Docs] Fix sphinx error

* [Docs] Fix sphinx error

* add comment
This commit is contained in:
Zaida Zhou 2021-05-25 13:06:19 +08:00 committed by GitHub
parent f81e1cc498
commit 44ce6f2db7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 22 additions and 6 deletions

7
.readthedocs.yml Normal file
View File

@ -0,0 +1,7 @@
version: 2
python:
version: 3.7
install:
- requirements: requirements/docs.txt
- requirements: requirements/install.txt

View File

@ -24,7 +24,7 @@ sys.path.insert(0, os.path.abspath('..'))
project = 'mim'
copyright = '2021, openmmlab'
author = 'openmmlab'
author = 'MIM Authors'
# The full version, including alpha/beta/rc tags
release = '0.1.0'
@ -59,4 +59,3 @@ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# 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']

View File

@ -8,7 +8,7 @@ Welcome to mim's documentation!
.. toctree::
:maxdepth: 2
:caption: Contents:
:caption: Contents
api.rst

View File

@ -1,5 +1,5 @@
import os
import site
import pkg_resources
USER = 'open-mmlab'
DEFAULT_URL = f'https://github.com/{USER}'
@ -32,4 +32,8 @@ DEFAULT_CACHE_DIR = f'{os.environ["HOME"]}/.cache/mim'
if not os.path.exists(DEFAULT_CACHE_DIR):
os.makedirs(DEFAULT_CACHE_DIR)
MMPACKAGE_PATH = os.path.join(site.getsitepackages()[0], 'mmpackage.txt')
# Although site.getsitepackage() can also get the directory of site-packages,
# it will faild in virtualenv. It is an issue with virtualenv, which copies
# the bundled version of site.py to the venv when it is created.
MMPACKAGE_PATH = os.path.join(
pkg_resources.get_distribution('click').location, 'mmpackage.txt')

6
requirements/install.txt Normal file
View File

@ -0,0 +1,6 @@
Click==7.1.2
colorama
model-index
pandas
requests
tabulate

View File

@ -4,7 +4,7 @@ setup(
name='openmim',
version='0.1.0',
description='MIM Install OpenMMLab packages',
author='OpenMMLab',
author='MIM Authors',
author_email='openmmlab@gmail.com',
packages=find_packages(),
include_package_data=True,