new doc
This commit is contained in:
parent
f5381871a3
commit
5934950ce2
@ -21,7 +21,7 @@ curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
|
||||
libpath = os.path.join(curr_path, '../wrapper/')
|
||||
sys.path.insert(0, os.path.join(curr_path, '../wrapper/'))
|
||||
sys.path.insert(0, curr_path)
|
||||
from sphinx_util import MarkdownParser
|
||||
from sphinx_util import MarkdownParser, AutoStructify
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
@ -157,6 +157,7 @@ def generate_doxygen_xml(app):
|
||||
def setup(app):
|
||||
# Add hook for building doxygen xml when needed
|
||||
app.connect("builder-inited", generate_doxygen_xml)
|
||||
|
||||
|
||||
|
||||
app.add_config_value('recommonmark_config', {
|
||||
'url_resolver': lambda url: github_doc_root + url,
|
||||
}, True)
|
||||
app.add_transform(AutoStructify)
|
||||
|
||||
@ -3,7 +3,7 @@ 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
|
||||
=============
|
||||
-------------
|
||||
```eval_rst
|
||||
|
||||
.. toctree::
|
||||
@ -15,7 +15,7 @@ API Documents
|
||||
guide.md
|
||||
```
|
||||
Indices and tables
|
||||
==================
|
||||
------------------
|
||||
|
||||
```eval_rst
|
||||
* :ref:`genindex`
|
||||
|
||||
@ -8,4 +8,4 @@ This page contains document of python API of rabit.
|
||||
.. automodule:: rabit
|
||||
:members:
|
||||
:show-inheritance:
|
||||
```
|
||||
```
|
||||
|
||||
@ -13,24 +13,5 @@ if os.environ.get('READTHEDOCS', None) == 'True':
|
||||
sys.path.insert(0, os.path.abspath('..'))
|
||||
from recom import parser, transform
|
||||
|
||||
class MarkdownParser(docutils.parsers.Parser):
|
||||
github_doc_root = None
|
||||
|
||||
|
||||
def __init__(self):
|
||||
self.parser = parser.CommonMarkParser()
|
||||
|
||||
def parse(self, inputstring, document):
|
||||
self.parser.parse(inputstring, document)
|
||||
transform.AutoStructify.setup_url_resolver(resolve_url)
|
||||
for trans in self.get_transforms():
|
||||
transform.AutoStructify(document).apply()
|
||||
|
||||
def get_transforms(self):
|
||||
return [transform.AutoStructify]
|
||||
|
||||
def resolve_url(url):
|
||||
if MarkdownParser.github_doc_root is None or url is None:
|
||||
return url
|
||||
else:
|
||||
return MarkdownParser.github_doc_root + url
|
||||
MarkdownParser = parser.CommonMarkParser
|
||||
AutoStructify = transform.AutoStructify
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user