Adding JVM doc build to Jenkins CI
This commit is contained in:
11
doc/conf.py
11
doc/conf.py
@@ -12,11 +12,21 @@
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
from subprocess import call
|
||||
from sh.contrib import git
|
||||
import urllib.request
|
||||
from recommonmark.parser import CommonMarkParser
|
||||
import sys
|
||||
import re
|
||||
import os, subprocess
|
||||
import shlex
|
||||
import guzzle_sphinx_theme
|
||||
|
||||
git_branch = [re.sub(r'origin/', '', x.lstrip(' ')) for x in str(git.branch('-r', '--contains', 'HEAD')).rstrip('\n').split('\n')]
|
||||
git_branch = [x for x in git_branch if 'HEAD' not in x]
|
||||
print('git_branch = {}'.format(git_branch[0]))
|
||||
filename, _ = urllib.request.urlretrieve('https://s3-us-west-2.amazonaws.com/xgboost-docs/{}.tar.bz2'.format(git_branch[0]))
|
||||
call('if [ -d tmp ]; then rm -rf tmp; fi; mkdir -p tmp/jvm; cd tmp/jvm; tar xvf {}'.format(filename), shell=True)
|
||||
|
||||
# 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.
|
||||
@@ -94,6 +104,7 @@ autoclass_content = 'both'
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
exclude_patterns = ['_build']
|
||||
html_extra_path = ['./tmp']
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all
|
||||
# documents.
|
||||
|
||||
@@ -149,7 +149,7 @@ Contents
|
||||
|
||||
java_intro
|
||||
Code Examples <https://github.com/dmlc/xgboost/tree/master/jvm-packages/xgboost4j-example>
|
||||
XGBoost4J Java API <http://dmlc.ml/docs/javadocs/index.html>
|
||||
XGBoost4J Scala API <http://dmlc.ml/docs/scaladocs/xgboost4j/index.html>
|
||||
XGBoost4J-Spark Scala API <http://dmlc.ml/docs/scaladocs/xgboost4j-spark/index.html>
|
||||
XGBoost4J-Flink Scala API <http://dmlc.ml/docs/scaladocs/xgboost4j-flink/index.html>
|
||||
XGBoost4J Java API <javadocs/index>
|
||||
XGBoost4J Scala API <scaladocs/xgboost4j/index>
|
||||
XGBoost4J-Spark Scala API <scaladocs/xgboost4j-spark/index>
|
||||
XGBoost4J-Flink Scala API <scaladocs/xgboost4j-flink/index>
|
||||
|
||||
3
doc/jvm/javadocs/index.rst
Normal file
3
doc/jvm/javadocs/index.rst
Normal file
@@ -0,0 +1,3 @@
|
||||
==================
|
||||
XGBoost4J Java API
|
||||
==================
|
||||
3
doc/jvm/scaladocs/xgboost4j-flink/index.rst
Normal file
3
doc/jvm/scaladocs/xgboost4j-flink/index.rst
Normal file
@@ -0,0 +1,3 @@
|
||||
=========================
|
||||
XGBoost4J-Flink Scala API
|
||||
=========================
|
||||
3
doc/jvm/scaladocs/xgboost4j-spark/index.rst
Normal file
3
doc/jvm/scaladocs/xgboost4j-spark/index.rst
Normal file
@@ -0,0 +1,3 @@
|
||||
=========================
|
||||
XGBoost4J-Spark Scala API
|
||||
=========================
|
||||
3
doc/jvm/scaladocs/xgboost4j/index.rst
Normal file
3
doc/jvm/scaladocs/xgboost4j/index.rst
Normal file
@@ -0,0 +1,3 @@
|
||||
===================
|
||||
XGBoost4J Scala API
|
||||
===================
|
||||
@@ -2,3 +2,4 @@ sphinx
|
||||
mock
|
||||
guzzle_sphinx_theme
|
||||
breathe
|
||||
sh>=1.12.14
|
||||
|
||||
Reference in New Issue
Block a user