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 Doxygen build and fix all warnings #164

Merged
merged 24 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
1fbfce8
Add `Doxyfile` for C++ docs
pentschev Jan 12, 2024
42ed497
Fix wrong arguments in C++ doxygen comments
pentschev Jan 12, 2024
e079f8a
Document C++ exceptions
pentschev Jan 12, 2024
8eb28a5
Add doxygen to `.gitignore`
pentschev Jan 12, 2024
e6e7c28
Add doxygen pre-commit hooks, dependencies and CI build files
pentschev Jan 12, 2024
416909c
Document `ucxx::Component`
pentschev Jan 12, 2024
afb70f7
Document class and type descriptions.
pentschev Jan 12, 2024
558cdbb
Add docs builds to GH workflows
pentschev Jan 15, 2024
a3cfa40
Fix dependencies installed in build_docs
pentschev Jan 15, 2024
b3de6d1
Update docs version in release script
pentschev Jan 15, 2024
b8759ee
Enable PR dependency on build-docs
pentschev Jan 15, 2024
ae157d8
Add missing docs include to dependencies
pentschev Jan 15, 2024
24aa536
Fix conda channels to build docs in CI
pentschev Jan 15, 2024
712f9ff
Disable Doxygen generation of LaTeX output
pentschev Jan 15, 2024
556f230
Set RAPIDS version for docs
pentschev Jan 15, 2024
85cab2b
Upgrade to doxygen=1.10.0
pentschev Jan 15, 2024
800f05e
Fix typo in `ucxx::WorkerProgressThread` docs
pentschev Jan 15, 2024
3d25c77
Add codespell to pre-commit
pentschev Jan 17, 2024
698cbbe
Fix typos found by codespell
pentschev Jan 17, 2024
36db557
Update CI checks to doxygen 1.10.0
pentschev Jan 17, 2024
e4513e6
Fix typo
pentschev Jan 17, 2024
de708d3
Merge remote-tracking branch 'upstream/branch-0.36' into doxygen
pentschev Jan 18, 2024
f70b5c4
Generate XML output with Doxygen
pentschev Jan 18, 2024
fd98e74
Remove cudatoolkit from docs-build
pentschev Jan 18, 2024
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
14 changes: 14 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@ jobs:
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
docs-build:
if: github.ref_type == 'branch'
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.02
with:
arch: "amd64"
branch: ${{ inputs.branch }}
build_type: ${{ inputs.build_type || 'branch' }}
container_image: "rapidsai/ci-conda:latest"
date: ${{ inputs.date }}
node_type: "gpu-v100-latest-1"
run_script: "ci/build_docs.sh"
sha: ${{ inputs.sha }}
upload-conda:
needs: [conda-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 @@ -14,6 +14,7 @@ jobs:
needs:
- checks
- conda-cpp-build
- docs-build
- conda-cpp-tests
- conda-python-tests
secrets: inherit
Expand All @@ -29,6 +30,16 @@ jobs:
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.02
with:
build_type: pull-request
docs-build:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.02
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
arch: "amd64"
container_image: "rapidsai/ci-conda:latest"
run_script: "ci/build_docs.sh"
conda-cpp-tests:
needs: conda-cpp-build
secrets: inherit
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ wheels/
*.egg-info/
_skbuild/

## Doxygen
cpp/doxygen/html
cpp/doxygen/xml
21 changes: 21 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,27 @@ repos:
hooks:
- id: rapids-dependency-file-generator
args: ["--clean"]
- repo: local
hooks:
- id: doxygen-check
name: doxygen-check
entry: ./ci/checks/doxygen.sh
files: ^cpp/include/
types_or: [file]
language: system
pass_filenames: false
verbose: true
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
hooks:
- id: codespell
additional_dependencies: [tomli]
args: ["--toml", "python/pyproject.toml"]
exclude: |
(?x)^(
.*test.*|
^CHANGELOG.md$
)

default_language_version:
python: python3
38 changes: 38 additions & 0 deletions ci/build_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash
# Copyright (c) 2023, NVIDIA CORPORATION.

set -euo pipefail

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

ENV_YAML_DIR="$(mktemp -d)"

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

rapids-mamba-retry env create --force -f "${ENV_YAML_DIR}/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)

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
libucxx

export RAPIDS_VERSION_NUMBER="24.02"
pentschev marked this conversation as resolved.
Show resolved Hide resolved
export RAPIDS_DOCS_DIR="$(mktemp -d)"

rapids-logger "Build CPP docs"
pushd cpp/doxygen
doxygen Doxyfile
mkdir -p "${RAPIDS_DOCS_DIR}/libucxx/html"
mv html/* "${RAPIDS_DOCS_DIR}/libucxx/html"
popd

rapids-upload-docs
35 changes: 35 additions & 0 deletions ci/checks/doxygen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash
# Copyright (c) 2022-2024, NVIDIA CORPORATION.
###############################
# UCXX doxygen warnings check #
###############################

# skip if doxygen is not installed
if ! [ -x "$(command -v doxygen)" ]; then
echo -e "warning: doxygen is not installed"
exit 0
fi

# Utility to return version as number for comparison
function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }

# doxygen supported version 1.10.0
DOXYGEN_VERSION=`doxygen --version`
if [ ! $(version "$DOXYGEN_VERSION") -eq $(version "1.10.0") ] ; then
echo -e "warning: Unsupported doxygen version $DOXYGEN_VERSION"
echo -e "Expecting doxygen version 1.10.0"
exit 0
fi

# Run doxygen, ignore missing tag files error
TAG_ERROR1="error: Tag file '.*.tag' does not exist or is not a file. Skipping it..."
TAG_ERROR2="error: cannot open tag file .*.tag for writing"
DOXYGEN_STDERR=`cd cpp/doxygen && { cat Doxyfile ; echo QUIET = YES; echo GENERATE_HTML = NO; } | doxygen - 2>&1 | sed "/\($TAG_ERROR1\|$TAG_ERROR2\)/d"`
RETVAL=$?

if [ "$RETVAL" != "0" ] || [ ! -z "$DOXYGEN_STDERR" ]; then
echo -e "$DOXYGEN_STDERR"
RETVAL=1 #because return value is not generated by doxygen 1.8.20
fi

exit $RETVAL
4 changes: 4 additions & 0 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ sed_runner "s/^version = .*/version = \"${NEXT_FULL_TAG}\"/g" python/distributed
sed_runner "/- librmm =/ s/=.*/=${NEXT_RAPIDS_VERSION}/g" conda/recipes/ucxx/meta.yaml
sed_runner "/- rmm =/ s/=.*/=${NEXT_RAPIDS_VERSION}/g" conda/recipes/ucxx/meta.yaml

# doxyfile update
sed_runner 's/PROJECT_NUMBER = .*/PROJECT_NUMBER = '${NEXT_FULL_TAG}'/g' cpp/doxygen/Doxyfile

DEPENDENCIES=(
cudf
dask-cuda
Expand All @@ -65,3 +68,4 @@ sed_runner 's/'"branch-.*\/RAPIDS.cmake"'/'"branch-${NEXT_RAPIDS_VERSION}\/RAPID
for FILE in .github/workflows/*.yaml; do
sed_runner "/shared-workflows/ s/@.*/@branch-${NEXT_RAPIDS_VERSION}/g" "${FILE}"
done
sed_runner "s/RAPIDS_VERSION_NUMBER=\".*/RAPIDS_VERSION_NUMBER=\"${NEXT_SHORT_TAG}\"/g" ci/build_docs.sh
1 change: 1 addition & 0 deletions conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ dependencies:
- dask-cuda==24.2.*
- dask-cudf==24.2.*
- distributed
- doxygen=1.10.0
- fmt>=10.1.1,<11
- gmock>=1.13.0
- gtest>=1.13.0
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-120_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ dependencies:
- dask-cuda==24.2.*
- dask-cudf==24.2.*
- distributed
- doxygen=1.10.0
- fmt>=10.1.1,<11
- gmock>=1.13.0
- gtest>=1.13.0
Expand Down
Loading