diff --git a/.gitignore b/.gitignore index a2d925089..f60cab6be 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ *.rabit *.mock dmlc-core +recommonmark \ No newline at end of file diff --git a/doc/README b/doc/README deleted file mode 100644 index 6f75b3ff5..000000000 --- a/doc/README +++ /dev/null @@ -1 +0,0 @@ -The documentation of rabit now hosted at http://rabit.readthedocs.org/en/latest/ diff --git a/doc/conf.py b/doc/conf.py index 279e4b387..71a438e2e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -44,6 +44,7 @@ extensions = [ 'breathe', ] + # add markdown parser source_parsers = { '.md': 'recommonmark.parser.CommonMarkParser', @@ -65,7 +66,7 @@ source_suffix = ['.rst', '.md'] #source_encoding = 'utf-8-sig' # The master toctree document. -master_doc = 'index' +master_doc = 'README' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -153,6 +154,14 @@ def generate_doxygen_xml(app): if read_the_docs_build: run_doxygen('..') +def setup_path(app): + read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True' + if read_the_docs_build: + subprocess.call("cd ..; git clone https://github.com/tqchen/recommonmark", shell=True) + sys.path.insert(0, os.path.abspath('../recommonmark')) + def setup(app): # Add hook for building doxygen xml when needed app.connect("builder-inited", generate_doxygen_xml) + setup_path(app) + diff --git a/doc/cpp_api.rst b/doc/cpp_api.rst deleted file mode 100644 index 6b4ba8936..000000000 --- a/doc/cpp_api.rst +++ /dev/null @@ -1,9 +0,0 @@ -C++ Library API of Rabit -======================== -This page contains document of Library API of rabit. - -.. toctree:: - -.. doxygennamespace:: rabit - - diff --git a/doc/index.rst b/doc/index.rst deleted file mode 100644 index 33be2f86c..000000000 --- a/doc/index.rst +++ /dev/null @@ -1,22 +0,0 @@ -.. rabit documentation master file, created by - -Rabit Documentation -===================== -rabit is a light weight library that provides a fault tolerant interface of Allreduce and Broadcast. It is designed to support easy implementations of distributed machine learning programs, many of which fall naturally under the Allreduce abstraction. The goal of rabit is to support **portable** , **scalable** and **reliable** distributed machine learning programs. - -API Documents -============= -.. toctree:: - :maxdepth: 2 - - python_api.rst - cpp_api.rst - parameters.md - guide.md - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` diff --git a/doc/python-requirements.txt b/doc/python-requirements.txt index ca5f25cf9..5970c4367 100644 --- a/doc/python-requirements.txt +++ b/doc/python-requirements.txt @@ -1,4 +1,4 @@ numpy breathe commonmark -recommonmark + diff --git a/doc/python_api.rst b/doc/python_api.rst deleted file mode 100644 index 5df76d983..000000000 --- a/doc/python_api.rst +++ /dev/null @@ -1,9 +0,0 @@ -Python API of Rabit -=================== -This page contains document of python API of rabit. - -.. toctree:: - -.. automodule:: rabit - :members: - :show-inheritance: