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

Updating docs and build script #3825

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c3ac506
Updating build script
BradReesWork Aug 25, 2023
fa2fb4f
Merge branch 'branch-23.10' into update_build
BradReesWork Aug 25, 2023
8df7b4b
Only worry about XML files
BradReesWork Aug 25, 2023
3f7b56f
add dependency for breathe
BradReesWork Aug 29, 2023
2b76c85
Fixed old conda file name
BradReesWork Aug 29, 2023
0284ea8
Updating C and C++ docs
BradReesWork Aug 30, 2023
f125f34
C Centrality docs
BradReesWork Aug 31, 2023
0e0f0ea
community doc in C
BradReesWork Aug 31, 2023
e3cb99b
Core Docs
BradReesWork Aug 31, 2023
9f1341b
update
BradReesWork Aug 31, 2023
975f96c
adding nx-cugraph
BradReesWork Sep 12, 2023
319e3f3
update copyright
BradReesWork Sep 12, 2023
648831c
Merge branch 'branch-23.10' into update_build
BradReesWork Sep 12, 2023
5f54928
more docs and style fixes
BradReesWork Sep 12, 2023
8109f7f
update for C++
BradReesWork Sep 13, 2023
bd54c00
C++ rst files
BradReesWork Sep 17, 2023
16f0d45
update
BradReesWork Sep 18, 2023
01e0764
update to service
BradReesWork Sep 18, 2023
570b77f
update env for service
BradReesWork Sep 18, 2023
942723a
dropped triftpy to make checker happy
BradReesWork Sep 19, 2023
0826c5d
adding - thriftpy2 >=0.4.15
BradReesWork Sep 19, 2023
3bab2d8
adding breathe to environment
BradReesWork Sep 20, 2023
2223933
style - files not in correct order
BradReesWork Sep 20, 2023
36985a3
Changes thriftpy2 anchor to be set in docs and includes version pin, …
rlratzel Sep 20, 2023
11c62dd
Adds -f to new clean commands for docs.
rlratzel Sep 20, 2023
86b4a23
Adds debug options to sphinx-build.
rlratzel Sep 21, 2023
3831c8a
Merge remote-tracking branch 'upstream/branch-23.10' into update_build
rlratzel Sep 21, 2023
03454d1
another update
BradReesWork Sep 25, 2023
90d0b0a
adding pylibcugraphops to doc build
BradReesWork Sep 25, 2023
0f6719e
Merge branch 'branch-23.10' into update_build
BradReesWork Sep 25, 2023
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,6 @@ python/cugraph/cugraph/tests/dask-worker-space

# Sphinx docs & build artifacts
docs/cugraph/source/api_docs/api/*
docs/cugraph/libcugraph
_html
_text
77 changes: 52 additions & 25 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ REPODIR=$(cd $(dirname $0); pwd)
VALIDARGS="
clean
uninstall
all
libcugraph
libcugraph_etl
cugraph
cugraph-service
pylibcugraph
cugraph
cpp-mgtests
cugraph-service
cugraph-nx
cugraph-pyg
cugraph-dgl
nx-cugraph
Expand All @@ -49,14 +51,15 @@ HELP="$0 [<target> ...] [<flag> ...]
where <target> is:
clean - remove all existing build artifacts and configuration (start over)
uninstall - uninstall libcugraph and cugraph from a prior build/install (see also -n)
all - build every target
libcugraph - build libcugraph.so and SG test binaries
libcugraph_etl - build libcugraph_etl.so and SG test binaries
pylibcugraph - build the pylibcugraph Python package
cugraph-pyg - build the cugraph-pyg Python package
cugraph - build the cugraph Python package
nx-cugraph - build the nx-cugraph Python package
cugraph-service - build the cugraph-service_client and cugraph-service_server Python package
cpp-mgtests - build libcugraph and libcugraph_etl MG tests. Builds MPI communicator, adding MPI as a dependency.
cugraph-service - build the cugraph-service_client and cugraph-service_server Python package
nx-cugraph - build the nx-cugraph Python package
cugraph-pyg - build the cugraph-pyg Python package
cugraph-dgl - build the cugraph-dgl extensions for DGL
docs - build the docs
and <flag> is:
Expand All @@ -71,7 +74,7 @@ HELP="$0 [<target> ...] [<flag> ...]
--clean - clean an individual target (note: to do a complete rebuild, use the clean target described above)
-h - print this text

default action (no args) is to build and install 'libcugraph' then 'libcugraph_etl' then 'pylibcugraph' then 'cugraph' targets
default action (no args) is to build and install 'libcugraph' then 'pylibcugraph' then 'cugraph' targets

libcugraph build dir is: ${LIBCUGRAPH_BUILD_DIR}

Expand Down Expand Up @@ -119,8 +122,8 @@ function hasArg {
(( ${NUMARGS} != 0 )) && (echo " ${ARGS} " | grep -q " $1 ")
}

function buildAll {
(( ${NUMARGS} == 0 )) || !(echo " ${ARGS} " | grep -q " [^-][a-zA-Z0-9\_\-]\+ ")
function noTargets {
(( ${NUMARGS} == 0 )) || !(echo " ${ARGS} " | grep -q " [^-][a-zA-Z0-9\_\-]* ")
}

function cleanPythonDir {
Expand Down Expand Up @@ -170,7 +173,7 @@ fi
if hasArg --without_cugraphops; then
BUILD_WITH_CUGRAPHOPS=OFF
fi
if hasArg cpp-mgtests; then
if hasArg cpp-mgtests || hasArg all; then
BUILD_CPP_MG_TESTS=ON
fi
if hasArg --cmake_default_generator; then
Expand Down Expand Up @@ -234,13 +237,23 @@ if hasArg clean; then
rmdir ${bd} || true
fi
done

# Doc cleanup
rm -rf ${REPODIR}/docs/cugraph/libcugraph
rm -rf ${REPODIR}/docs/cugraph/build

# Go back to failing on first error for all other operations
set -e
fi

################################################################################
# Process in the order that things should be built
################################################################################


################################################################################
# Configure, build, and install libcugraph
if buildAll || hasArg libcugraph; then
if hasArg libcugraph || hasArg all || noTargets; then
if hasArg --clean; then
if [ -d ${LIBCUGRAPH_BUILD_DIR} ]; then
find ${LIBCUGRAPH_BUILD_DIR} -mindepth 1 -delete
Expand Down Expand Up @@ -270,7 +283,7 @@ if buildAll || hasArg libcugraph; then
fi

# Configure, build, and install libcugraph_etl
if buildAll || hasArg libcugraph_etl; then
if hasArg libcugraph_etl || hasArg all; then
if hasArg --clean; then
if [ -d ${LIBCUGRAPH_ETL_BUILD_DIR} ]; then
find ${LIBCUGRAPH_ETL_BUILD_DIR} -mindepth 1 -delete
Expand Down Expand Up @@ -301,7 +314,7 @@ if buildAll || hasArg libcugraph_etl; then
fi

# Build, and install pylibcugraph
if buildAll || hasArg pylibcugraph; then
if hasArg pylibcugraph || hasArg all || noTargets; then
if hasArg --clean; then
cleanPythonDir ${REPODIR}/python/pylibcugraph
else
Expand All @@ -328,7 +341,7 @@ if buildAll || hasArg pylibcugraph; then
fi

# Build and install the cugraph Python package
if buildAll || hasArg cugraph; then
if hasArg cugraph || hasArg all || noTargets; then
if hasArg --clean; then
cleanPythonDir ${REPODIR}/python/cugraph
else
Expand All @@ -355,7 +368,7 @@ if buildAll || hasArg cugraph; then
fi

# Install the cugraph-service-client and cugraph-service-server Python packages
if hasArg cugraph-service; then
if hasArg all || hasArg cugraph-service; then
if hasArg --clean; then
cleanPythonDir ${REPODIR}/python/cugraph-service
else
Expand All @@ -364,8 +377,17 @@ if hasArg cugraph-service; then
fi
fi

# Build and install the cugraph-nx Python package
if hasArg all || hasArg nx-cugraph; then
if hasArg --clean; then
cleanPythonDir ${REPODIR}/python/nx-cugraph
else
python ${PYTHON_ARGS_FOR_INSTALL} ${REPODIR}/python/nx-cugraph
fi
fi

# Build and install the cugraph-pyg Python package
if hasArg cugraph-pyg; then
if hasArg all || hasArg cugraph-pyg; then
if hasArg --clean; then
cleanPythonDir ${REPODIR}/python/cugraph-pyg
else
Expand All @@ -374,25 +396,18 @@ if hasArg cugraph-pyg; then
fi

# Install the cugraph-dgl extensions for DGL
if hasArg cugraph-dgl; then
if hasArg all || hasArg cugraph-dgl; then
if hasArg --clean; then
cleanPythonDir ${REPODIR}/python/cugraph-dgl
else
python ${PYTHON_ARGS_FOR_INSTALL} ${REPODIR}/python/cugraph-dgl
fi
fi

# Build and install the nx-cugraph Python package
if hasArg nx-cugraph; then
if hasArg --clean; then
cleanPythonDir ${REPODIR}/python/nx-cugraph
else
python ${PYTHON_ARGS_FOR_INSTALL} ${REPODIR}/python/nx-cugraph
fi
fi

# Build the docs
if hasArg docs; then
# - build the CPP docs first using doxygen, then create the Python docs
if hasArg all || hasArg docs; then
if [ ! -d ${LIBCUGRAPH_BUILD_DIR} ]; then
mkdir -p ${LIBCUGRAPH_BUILD_DIR}
cd ${LIBCUGRAPH_BUILD_DIR}
Expand All @@ -402,8 +417,20 @@ if hasArg docs; then
${CMAKE_GENERATOR_OPTION} \
${CMAKE_VERBOSE_OPTION}
fi

cd ${LIBCUGRAPH_BUILD_DIR}
cmake --build "${LIBCUGRAPH_BUILD_DIR}" -j${PARALLEL_LEVEL} --target docs_cugraph ${VERBOSE_FLAG}

if [ -d ${REPODIR}/docs/cugraph/libcugraph ]; then
echo "removing libcugraph docs dir"
rm -r ${REPODIR}/docs/cugraph/libcugraph
fi
echo "making libcugraph doc dir"
mkdir -p ${REPODIR}/docs/cugraph/libcugraph

mv ${REPODIR}/cpp/doxygen/xml ${REPODIR}/docs/cugraph/libcugraph/_xml
mv ${REPODIR}/cpp/doxygen/html ${REPODIR}/docs/cugraph/libcugraph/html

cd ${REPODIR}/docs/cugraph
make html
fi
13 changes: 10 additions & 3 deletions ci/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ rapids-mamba-retry install \
cugraph-pyg \
cugraph-service-server \
cugraph-service-client \
libcugraph_etl
libcugraph_etl \
pylibcugraphops

# This command installs `cugraph-dgl` without its dependencies
# since this package can currently only run in `11.6` CTK environments
Expand All @@ -45,15 +46,21 @@ pushd cpp/doxygen
doxygen Doxyfile
mkdir -p "${RAPIDS_DOCS_DIR}/libcugraph/html"
mv html/* "${RAPIDS_DOCS_DIR}/libcugraph/html"
mkdir -p "${RAPIDS_DOCS_DIR}/libcugraph/_xml"
mv xml/* "${RAPIDS_DOCS_DIR}/libcugraph/_xml"
popd

rapids-logger "Build Python docs"
pushd docs/cugraph
# Ensure cugraph is importable, since sphinx does not report details about this
# type of failure well.
python -c "import cugraph; print(f'Using cugraph: {cugraph}')"
sphinx-build -b dirhtml source _html
sphinx-build -b text source _text
echo "Running sphinx-build -v -b dirhtml source _html"
sphinx-build -v -b dirhtml source _html
echo "done."
echo "Running sphinx-build -v -b text source _text"
sphinx-build -v -b text source _text
echo "done."
mkdir -p "${RAPIDS_DOCS_DIR}/cugraph/"{html,txt}
mv _html/* "${RAPIDS_DOCS_DIR}/cugraph/html"
mv _text/* "${RAPIDS_DOCS_DIR}/cugraph/txt"
Expand Down
2 changes: 2 additions & 0 deletions conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ channels:
- nvidia
dependencies:
- aiohttp
- breathe
- c-compiler
- cmake>=3.26.4
- cuda-version=11.8
Expand Down Expand Up @@ -70,6 +71,7 @@ dependencies:
- sphinx-markdown-tables
- sphinx<6
- sphinxcontrib-websupport
- thriftpy2>=0.4.15
- ucx-proc=*=gpu
- ucx-py==0.34.*
name: all_cuda-118_arch-x86_64
2 changes: 2 additions & 0 deletions conda/environments/all_cuda-120_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ channels:
- nvidia
dependencies:
- aiohttp
- breathe
- c-compiler
- cmake>=3.26.4
- cuda-nvcc
Expand Down Expand Up @@ -69,6 +70,7 @@ dependencies:
- sphinx-markdown-tables
- sphinx<6
- sphinxcontrib-websupport
- thriftpy2>=0.4.15
- ucx-proc=*=gpu
- ucx-py==0.34.*
name: all_cuda-120_arch-x86_64
2 changes: 1 addition & 1 deletion cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ add_library(cugraph_c
src/c_api/core_result.cpp
src/c_api/extract_ego.cpp
src/c_api/k_core.cpp
src/c_api/hierarchical_clustering_result.cpp
src/c_api/hierarchical_clustering_result.cpp
src/c_api/induced_subgraph.cpp
src/c_api/capi_helper.cu
src/c_api/legacy_spectral.cpp
Expand Down
2 changes: 1 addition & 1 deletion cpp/doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -1991,7 +1991,7 @@ MAN_LINKS = NO
# captures the structure of the code including all documentation.
# The default value is: NO.

GENERATE_XML = NO
GENERATE_XML = YES

# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
Expand Down
Loading
Loading