Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs build GH #5155

Merged
merged 18 commits into from
Jan 31, 2023
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ jobs:
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
docs-build:
if: ${{ startsWith(github.ref, 'refs/heads/branch-') }}
needs: [python-build]
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@cuda-118
with:
build_type: branch
node_type: "gpu-latest-1"
arch: "amd64"
container_image: "rapidsai/ci:latest"
run_script: "ci/build_docs.sh"
python-build:
needs: [cpp-build]
secrets: inherit
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- conda-python-tests-singlegpu
- conda-python-tests-dask
- conda-notebook-tests
- docs-build
- wheel-build-cuml
- wheel-tests-cuml
secrets: inherit
Expand Down Expand Up @@ -68,6 +69,16 @@ jobs:
arch: "amd64"
container_image: "rapidsai/ci:latest"
run_script: "ci/test_notebooks.sh"
docs-build:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@cuda-118
with:
build_type: pull-request
node_type: "gpu-latest-1"
arch: "amd64"
container_image: "rapidsai/ci:latest"
run_script: "ci/build_docs.sh"
wheel-build-cuml:
needs: checks
secrets: inherit
Expand Down
46 changes: 46 additions & 0 deletions ci/build_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash
set -euo pipefail

rapids-logger "Create test conda environment"
. /opt/conda/etc/profile.d/conda.sh

rapids-dependency-file-generator \
--output conda \
--file_key docs \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml

rapids-mamba-retry env create --force -f env.yaml -n docs
conda activate docs

rapids-print-env

rapids-logger "Downloading artifacts from previous jobs"

CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python)
VERSION_NUMBER=$(rapids-get-rapids-version-from-git)

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
--channel "${PYTHON_CHANNEL}" \
cuml libcuml

# # Build CPP docs
rapids-logger "Build cpp docs"
pushd cpp
doxygen Doxyfile.in
popd

# Build Python docs
rapids-logger "Build Python docs"
pushd docs
sphinx-build -b dirhtml ./source _html -W
sphinx-build -b text ./source _text -W
popd

if [[ "${RAPIDS_BUILD_TYPE}" == "branch" ]]; then
rapids-logger "Upload Docs to S3"
aws s3 sync --no-progress --delete cpp/html "s3://rapidsai-docs/libcuml/${VERSION_NUMBER}/html"
aws s3 sync --no-progress --delete docs/_html "s3://rapidsai-docs/cuml/${VERSION_NUMBER}/html"
aws s3 sync --no-progress --delete docs/_text "s3://rapidsai-docs/cuml/${VERSION_NUMBER}/txt"
fi
3 changes: 3 additions & 0 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ sed_runner 's/'"branch-.*\/RAPIDS.cmake"'/'"branch-${NEXT_SHORT_TAG}\/RAPIDS.cma
sed_runner 's/version = .*/version = '"'${NEXT_SHORT_TAG}'"'/g' docs/source/conf.py
sed_runner 's/release = .*/release = '"'${NEXT_FULL_TAG}'"'/g' docs/source/conf.py

# Update project_number (RAPIDS_VERSION) in the CPP doxygen file
sed_runner 's/PROJECT_NUMBER = .*/PROJECT_NUMBER = '"'${NEXT_SHORT_TAG}'"'/g' Doxyfile.in

for FILE in dependencies.yaml conda/environments/*.yaml; do
sed_runner "s/cudf=${CURRENT_SHORT_TAG}/cudf=${NEXT_SHORT_TAG}/g" ${FILE};
sed_runner "s/rmm=${CURRENT_SHORT_TAG}/rmm=${NEXT_SHORT_TAG}/g" ${FILE};
Expand Down
8 changes: 8 additions & 0 deletions conda/environments/all_cuda-115_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ dependencies:
- doxygen=1.8.20
- faiss-proc=*=cuda
- gcc_linux-64=9.*
- graphviz
- hdbscan
- hypothesis>=6.0,<7
- ipykernel
- ipython
- joblib>=0.11
- libcublas-dev>=11.7.3.1,<=11.7.4.6
- libcublas>=11.7.3.1,<=11.7.4.6
Expand All @@ -41,23 +44,28 @@ dependencies:
- libraft-distance=23.02.*
- libraft-headers=23.02.*
- libraft-nn=23.02.*
- nbsphinx
- ninja
- nltk
- numpydoc
- pip
- pydata-sphinx-theme
- pylibraft=23.02.*
- pytest
- pytest-cases
- pytest-cov
- pytest-xdist
- python>=3.8,<3.10
- raft-dask=23.02.*
- recommonmark
- rmm=23.02.*
- scikit-build>=0.13.1
- scikit-learn=0.24
- seaborn
- sparse
- sphinx-copybutton
- sphinx-markdown-tables
- sphinx<6
- statsmodels
- sysroot_linux-64==2.17
- treelite=3.1.0
Expand Down
24 changes: 10 additions & 14 deletions cpp/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "cuML C++ API"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = @CUML_VERSION@
PROJECT_NUMBER = '23.02'

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand All @@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.

OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@
OUTPUT_DIRECTORY =

# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
Expand Down Expand Up @@ -737,7 +737,7 @@ WARN_NO_PARAMDOC = YES
# a warning is encountered.
# The default value is: NO.

WARN_AS_ERROR = YES
WARN_AS_ERROR = NO
AjayThorve marked this conversation as resolved.
Show resolved Hide resolved

# The WARN_FORMAT tag determines the format of the warning messages that doxygen
# can produce. The string should contain the $file, $line, and $text tags, which
Expand Down Expand Up @@ -765,9 +765,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = @CMAKE_CURRENT_SOURCE_DIR@/include \
@CMAKE_CURRENT_SOURCE_DIR@/src \
@CMAKE_CURRENT_SOURCE_DIR@/src_prims
INPUT = include \
src \
src_prims

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down Expand Up @@ -866,11 +866,7 @@ EXAMPLE_RECURSIVE = NO
# that contain images that are to be included in the documentation (see the
# \image command).

# IMAGE_PATH = @CMAKE_CURRENT_SOURCE_DIR@/doxygen/images

# temporarily using cmake_current_source_dir for image path since we don't have images,
# comment the above whenever images are needed in the doxygen/images folder
IMAGE_PATH = @CMAKE_CURRENT_SOURCE_DIR@/
IMAGE_PATH =

# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
Expand Down Expand Up @@ -1082,7 +1078,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_HEADER = @CMAKE_CURRENT_SOURCE_DIR@/header.html
HTML_HEADER = header.html

# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
# generated HTML page. If the tag is left blank doxygen will generate a standard
Expand Down Expand Up @@ -2126,7 +2122,7 @@ HIDE_UNDOC_RELATIONS = YES
# set to NO
# The default value is: YES.

HAVE_DOT = @DOXYGEN_DOT_FOUND@
HAVE_DOT = YES

# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
# to run in parallel. When set to 0 doxygen will base this on the number of
Expand Down Expand Up @@ -2306,7 +2302,7 @@ INTERACTIVE_SVG = NO
# found. If left blank, it is assumed the dot tool can be found in the path.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_PATH = @DOXYGEN_DOT_EXECUTABLE@
DOT_PATH =

# The DOTFILE_DIRS tag can be used to specify one or more directories that
# contain dot files that are included in the documentation (see the \dotfile
Expand Down
20 changes: 18 additions & 2 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ files:
- common_build
- cpp_run
- cudatoolkit
- doc
- docs
- py_build
- py_run
- py_version
Expand All @@ -28,6 +28,12 @@ files:
includes:
- checks
- py_version
docs:
output: none
includes:
- cudatoolkit
- docs
- py_version
test_cpp:
output: none
includes:
Expand Down Expand Up @@ -176,10 +182,20 @@ dependencies:
- *libcusolver114
- *libcusparse_dev114
- *libcusparse114
doc:
docs:
common:
- output_types: [conda, requirements]
packages:
- graphviz
- ipython
- ipykernel
- nbsphinx
- numpydoc
- pydata-sphinx-theme
- recommonmark
- scikit-learn=0.24
ajschmidt8 marked this conversation as resolved.
Show resolved Hide resolved
- sphinx<6
- sphinx-copybutton
- sphinx-markdown-tables
- output_types: conda
packages:
Expand Down
5 changes: 2 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
# is relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
sys.path.insert(0, os.path.abspath('sphinxext'))
sys.path.insert(0, os.path.abspath('../../python'))

from github_link import make_linkcode_resolve # noqa

Expand Down Expand Up @@ -179,8 +178,8 @@

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"python": ('https://docs.python.org/', None),
"scipy": ('https://docs.scipy.org/doc/scipy/reference', None)
"python": ("https://docs.python.org/3", None),
"scipy": ("https://docs.scipy.org/doc/scipy", None),
}

# Config numpydoc
Expand Down