e81a11d Merge pull request #25 from daiyl0320/master 35c3b37 add retry mechanism to ConnectTracker and modify Listen backlog to 128 in rabit_traker.py c71ed6f try deply doxygen 62e5647 try deply doxygen 732f1c6 try 2fa6e02 ok 0537665 minor 7b59dcb minor 5934950 new doc f538187 ok 44b6049 new doc 387339b add more 9d4397a chg 2879a48 chg 30e3110 ok 9ff0301 add link translation 6b629c2 k 32e1955 ok 8f4839d fix 93137b2 ok 7eeeb79 reload recommonmark a8f00cc minor 19b0f01 ok dd01184 minor c1cdc19 minor fcf0f43 try rst cbc21ae try 62ddfa7 tiny aefc05c final change 2aee9b4 minor fe4e7c2 ok 8001983 change to subtitle 5ca33e4 ok 88f7d24 update guide 29d43ab add code fe8bb3b minor hack for readthedocs 229c71d Merge branch 'master' of ssh://github.com/dmlc/rabit 7424218 ok d1d45bb Update README.md 1e8813f Update README.md 1ccc990 Update README.md 0323e06 remove readme 679a835 remove theme 7ea5b7c remove numpydoc to napoleon b73e2be Merge branch 'master' of ssh://github.com/dmlc/rabit 1742283 ok 1838e25 Update python-requirements.txt bc4e957 ok fba6fc2 ok 0251101 ok d50b905 ok d4f2509 ok cdf401a ok fef0ef2 new doc cef360d ok c125d2a ok 270a49e add requirments 744f901 get the basic doc 1cb5cad Merge branch 'master' of ssh://github.com/dmlc/rabit 8cc07ba minor d74f126 Update .travis.yml 52b3dcd Update .travis.yml 099581b Update .travis.yml 1258046 Update .travis.yml 7addac9 Update Makefile 0ea7adf Update .travis.yml f858856 Update travis_script.sh d8eac4a Update README.md 3cc49ad lint and travis ceedf4e fix fd8920c fix win32 8bbed35 modify 9520b90 Merge pull request #14 from dmlc/hjk41 df14bb1 fix type f441dc7 replace tab with blankspace 2467942 remove unnecessary include 181ef47 defined long long and ulonglong 1582180 use int32_t to define int and int64_t to define long. in VC long is 32bit e0b7da0 fix git-subtree-dir: subtree/rabit git-subtree-split: e81a11dd7ee3cff87a38a42901315821df018bae
185 lines
6.2 KiB
Python
185 lines
6.2 KiB
Python
# -*- coding: utf-8 -*-
|
|
#
|
|
# documentation build configuration file, created by
|
|
# sphinx-quickstart on Thu Jul 23 19:40:08 2015.
|
|
#
|
|
# This file is execfile()d with the current directory set to its
|
|
# containing dir.
|
|
#
|
|
# Note that not all possible configuration values are present in this
|
|
# autogenerated file.
|
|
#
|
|
# All configuration values have a default; values that are commented out
|
|
# serve to show the default.
|
|
import sys
|
|
import os, subprocess
|
|
import shlex
|
|
# 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.
|
|
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, AutoStructify
|
|
|
|
# -- General configuration ------------------------------------------------
|
|
|
|
# General information about the project.
|
|
project = u'rabit'
|
|
copyright = u'2015, rabit developers'
|
|
author = u'rabit developers'
|
|
github_doc_root = 'https://github.com/dmlc/rabit/tree/master/doc/'
|
|
|
|
# add markdown parser
|
|
MarkdownParser.github_doc_root = github_doc_root
|
|
source_parsers = {
|
|
'.md': MarkdownParser,
|
|
}
|
|
# Version information.
|
|
import rabit
|
|
|
|
version = rabit.__version__
|
|
release = rabit.__version__
|
|
|
|
# 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.mathjax',
|
|
'breathe',
|
|
]
|
|
|
|
# Use breathe to include doxygen documents
|
|
breathe_projects = {'rabit' : 'doxygen/xml/'}
|
|
breathe_default_project = 'rabit'
|
|
|
|
# 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', '.md']
|
|
source_suffix = ['.rst', '.md']
|
|
|
|
# The encoding of source files.
|
|
#source_encoding = 'utf-8-sig'
|
|
|
|
# The master toctree document.
|
|
master_doc = 'index'
|
|
|
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
# for a list of supported languages.
|
|
#
|
|
# This is also used if you do content translation via gettext catalogs.
|
|
# Usually you set "language" from the command line for these cases.
|
|
language = None
|
|
|
|
# There are two options for replacing |today|: either, you set today to some
|
|
# non-false value, then it is used:
|
|
#today = ''
|
|
# Else, today_fmt is used as the format for a strftime call.
|
|
#today_fmt = '%B %d, %Y'
|
|
|
|
# List of patterns, relative to source directory, that match files and
|
|
# directories to ignore when looking for source files.
|
|
exclude_patterns = ['_build']
|
|
|
|
# The reST default role (used for this markup: `text`) to use for all
|
|
# documents.
|
|
#default_role = None
|
|
|
|
# If true, '()' will be appended to :func: etc. cross-reference text.
|
|
#add_function_parentheses = True
|
|
|
|
# If true, the current module name will be prepended to all description
|
|
# unit titles (such as .. function::).
|
|
#add_module_names = True
|
|
|
|
# If true, sectionauthor and moduleauthor directives will be shown in the
|
|
# output. They are ignored by default.
|
|
#show_authors = False
|
|
|
|
# The name of the Pygments (syntax highlighting) style to use.
|
|
pygments_style = 'sphinx'
|
|
|
|
# A list of ignored prefixes for module index sorting.
|
|
#modindex_common_prefix = []
|
|
|
|
# If true, keep warnings as "system message" paragraphs in the built documents.
|
|
#keep_warnings = False
|
|
|
|
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
|
todo_include_todos = False
|
|
|
|
# -- 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 = 'alabaster'
|
|
|
|
# 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']
|
|
|
|
# Output file base name for HTML help builder.
|
|
htmlhelp_basename = project + 'doc'
|
|
|
|
# -- Options for LaTeX output ---------------------------------------------
|
|
latex_elements = {
|
|
}
|
|
|
|
# Grouping the document tree into LaTeX files. List of tuples
|
|
# (source start file, target name, title,
|
|
# author, documentclass [howto, manual, or own class]).
|
|
latex_documents = [
|
|
(master_doc, 'rabit.tex', project,
|
|
author, 'manual'),
|
|
]
|
|
|
|
# hook for doxygen
|
|
def run_doxygen(folder):
|
|
"""Run the doxygen make command in the designated folder."""
|
|
try:
|
|
retcode = subprocess.call("cd %s; make doxygen" % folder, shell=True)
|
|
if retcode < 0:
|
|
sys.stderr.write("doxygen terminated by signal %s" % (-retcode))
|
|
except OSError as e:
|
|
sys.stderr.write("doxygen execution failed: %s" % e)
|
|
|
|
|
|
def run_build_lib(folder):
|
|
"""Run the doxygen make command in the designated folder."""
|
|
try:
|
|
retcode = subprocess.call("cd %s; make" % folder, shell=True)
|
|
retcode = subprocess.call("rm -rf _build/html/doxygen", shell=True)
|
|
retcode = subprocess.call("mkdir _build", shell=True)
|
|
retcode = subprocess.call("mkdir _build/html", shell=True)
|
|
retcode = subprocess.call("cp -rf doxygen/html _build/html/doxygen", shell=True)
|
|
if retcode < 0:
|
|
sys.stderr.write("build terminated by signal %s" % (-retcode))
|
|
except OSError as e:
|
|
sys.stderr.write("build execution failed: %s" % e)
|
|
|
|
|
|
def generate_doxygen_xml(app):
|
|
"""Run the doxygen make commands if we're on the ReadTheDocs server"""
|
|
read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
|
|
if read_the_docs_build:
|
|
run_doxygen('..')
|
|
sys.stderr.write('Check if shared lib exists\n')
|
|
run_build_lib('..')
|
|
sys.stderr.write('The wrapper path: %s\n' % str(os.listdir('../wrapper')))
|
|
rabit._loadlib()
|
|
|
|
|
|
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)
|