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

adding C/C++ API docs #3938

Merged
merged 46 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
ecc2952
adding C/C__ API docs
BradReesWork Oct 16, 2023
6edefa1
Merge branch 'branch-23.12' into docs_c_api
BradReesWork Oct 16, 2023
6114791
adding cugraph-ops and wholegraph
BradReesWork Oct 16, 2023
bff0418
fix table error and build error
BradReesWork Oct 17, 2023
ec83acd
fixed API title
BradReesWork Oct 17, 2023
e62bc89
cleanup WG index
BradReesWork Oct 17, 2023
17fa5c8
updated the content menu and dropped repeated things
BradReesWork Oct 17, 2023
977e4db
add missing package to ci build docs
BradReesWork Oct 18, 2023
e85564d
Merge branch 'branch-23.12' into docs_c_api
BradReesWork Oct 18, 2023
5fc59f0
Merge branch 'branch-23.12' into docs_c_api
BradReesWork Oct 23, 2023
9c04a19
Merge branch 'branch-23.12' into docs_c_api
BradReesWork Oct 25, 2023
c2eb39c
added "-v" option to shpinx build and removed external packages in "D…
BradReesWork Oct 25, 2023
f08fd8d
Merge branch 'branch-23.12' into docs_c_api
galipremsagar Oct 30, 2023
e8592e3
Update dependencies.yaml
galipremsagar Oct 30, 2023
0470ccc
Update pyproject.toml
galipremsagar Oct 30, 2023
29903e7
Update pyproject.toml
galipremsagar Oct 30, 2023
a516bfc
Update all_cuda-118_arch-x86_64.yaml
galipremsagar Oct 30, 2023
adf0b1c
Update all_cuda-120_arch-x86_64.yaml
galipremsagar Oct 30, 2023
04a3222
Merge branch 'branch-23.12' into docs_c_api
nv-rliu Oct 30, 2023
c587cb9
correcting some links in md files
acostadon Oct 30, 2023
4cfb702
cleaned up some wording in the intro
acostadon Nov 1, 2023
26ecf90
cleaned up some wording
acostadon Nov 1, 2023
3f329e3
cleaned up some wording in container.md
acostadon Nov 1, 2023
36ba903
fixed some typos
acostadon Nov 1, 2023
109684d
Merge branch 'branch-23.12' into docs_c_api
nv-rliu Nov 1, 2023
4ddaec0
Merge branch 'branch-23.12' into docs_c_api
BradReesWork Nov 6, 2023
c0c65f9
update doc build
BradReesWork Nov 6, 2023
f2d29b3
updated algorithm status
acostadon Nov 7, 2023
f9ca8ec
drooped autodoc_mock_imports
BradReesWork Nov 8, 2023
9508a22
Merge branch 'branch-23.12' into docs_c_api
BradReesWork Nov 8, 2023
afa72c2
Merge branch 'branch-23.12' into docs_c_api
BradReesWork Nov 13, 2023
6dd2993
Merge branch 'branch-23.12' into docs_c_api
BradReesWork Nov 14, 2023
6c418e1
adding pylibcugraphops to build
BradReesWork Nov 15, 2023
8b6dd3b
adding wholegraph to cu doc build
BradReesWork Nov 15, 2023
499cb70
Merge branch 'branch-23.12' into docs_c_api
BradReesWork Nov 15, 2023
fc3baaa
cleanup _xml directory
BradReesWork Nov 16, 2023
36fd1ff
Merge branch 'branch-23.12' into docs_c_api
BradReesWork Nov 17, 2023
86ebc2a
Merge branch 'branch-23.12' into docs_c_api
BradReesWork Nov 17, 2023
2b88734
Merge branch 'branch-23.12' into docs_c_api
BradReesWork Nov 18, 2023
d749aee
updated based on review comments
BradReesWork Nov 20, 2023
1063aba
Merge branch 'branch-23.12' into docs_c_api
BradReesWork Nov 20, 2023
8eef070
Update ci/build_docs.sh
BradReesWork Nov 20, 2023
650509f
Update ci/build_docs.sh
BradReesWork Nov 20, 2023
2da6157
Update ci/build_docs.sh
BradReesWork Nov 20, 2023
843acf0
updated "update_version" and other changes to simplify the process
BradReesWork Nov 20, 2023
eafb54b
Update docs/cugraph/source/conf.py
BradReesWork Nov 20, 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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ datasets/*
# Jupyter Notebooks
.ipynb_checkpoints

## Doxygen
## Doxygen and Docs
cpp/doxygen/html
docs/cugraph/lib*
docs/cugraph/api/*

# created by Dask tests
python/dask-worker-space
Expand Down
22 changes: 22 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ ARGS=$*
# script, and that this script resides in the repo dir!
REPODIR=$(cd $(dirname $0); pwd)

RAPIDS_VERSION=23.12
ajschmidt8 marked this conversation as resolved.
Show resolved Hide resolved

# Valid args to this script (all possible targets and options) - only one per line
VALIDARGS="
clean
Expand Down Expand Up @@ -412,8 +414,28 @@ if hasArg docs || hasArg all; then
${CMAKE_GENERATOR_OPTION} \
${CMAKE_VERBOSE_OPTION}
fi

for PROJECT in libcugraphops libwholegraph; do
XML_DIR="${REPODIR}/docs/cugraph/${PROJECT}"
rm -rf "${XML_DIR}"
mkdir -p "${XML_DIR}"
export XML_DIR_${PROJECT^^}="$XML_DIR"

echo "downloading xml for ${PROJECT} into ${XML_DIR}. Environment variable XML_DIR_${PROJECT^^} is set to ${XML_DIR}"
curl -O "https://d1664dvumjb44w.cloudfront.net/${PROJECT}/xml_tar/${RAPIDS_VERSION}/xml.tar.gz"
tar -xzf xml.tar.gz -C "${XML_DIR}"
rm "./xml.tar.gz"
done

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

echo "making libcugraph doc dir"
rm -rf ${REPODIR}/docs/cugraph/libcugraph
mkdir -p ${REPODIR}/docs/cugraph/libcugraph

export XML_DIR_LIBCUGRAPH="${REPODIR}/cpp/doxygen/xml"

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

# This command installs `cugraph-dgl` without its dependencies
# since this package can currently only run in `11.6` CTK environments
Expand All @@ -50,8 +52,7 @@ done
rapids-logger "Build CPP docs"
pushd cpp/doxygen
doxygen Doxyfile
mkdir -p "${RAPIDS_DOCS_DIR}/libcugraph/html"
mv html/* "${RAPIDS_DOCS_DIR}/libcugraph/html"
export XML_DIR_LIBCUGRAPH="$(pwd)/xml"
popd

rapids-logger "Build Python docs"
Expand Down
4 changes: 4 additions & 0 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ sed_runner "s/set(cugraph_version .*)/set(cugraph_version ${NEXT_FULL_TAG})/g" p
sed_runner 's/version = .*/version = '"'${NEXT_SHORT_TAG}'"'/g' docs/cugraph/source/conf.py
sed_runner 's/release = .*/release = '"'${NEXT_FULL_TAG}'"'/g' docs/cugraph/source/conf.py


# build.sh script
sed_runner 's/RAPIDS_VERSION=.*/RAPIDS_VERSION='${NEXT_SHORT_TAG}'/g' build.sh

# Centralized version file update
# NOTE: Any script that runs in CI will need to use gha-tool `rapids-generate-version`
# and echo it to `VERSION` file to get an alpha spec of the current version
Expand Down
765 changes: 504 additions & 261 deletions cpp/doxygen/Doxyfile

Large diffs are not rendered by default.

26 changes: 18 additions & 8 deletions cpp/include/cugraph_c/centrality_algorithms.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#include <cugraph_c/resource_handle.h>

/** @defgroup centrality Centrality algorithms
* @ingroup c_api
* @{
*/

#ifdef __cplusplus
Expand All @@ -39,7 +37,8 @@ typedef struct {
} cugraph_centrality_result_t;

/**
* @brief Get the vertex ids from the centrality result
* @ingroup centrality
* @brief Get the vertex ids from the centrality result
*
* @param [in] result The result from a centrality algorithm
* @return type erased array of vertex ids
Expand All @@ -48,7 +47,8 @@ cugraph_type_erased_device_array_view_t* cugraph_centrality_result_get_vertices(
cugraph_centrality_result_t* result);

/**
* @brief Get the centrality values from a centrality algorithm result
* @ingroup centrality
* @brief Get the centrality values from a centrality algorithm result
*
* @param [in] result The result from a centrality algorithm
* @return type erased array view of centrality values
Expand All @@ -57,6 +57,7 @@ cugraph_type_erased_device_array_view_t* cugraph_centrality_result_get_values(
cugraph_centrality_result_t* result);

/**
* @ingroup centrality
* @brief Get the number of iterations executed from the algorithm metadata
*
* @param [in] result The result from a centrality algorithm
Expand All @@ -65,6 +66,7 @@ cugraph_type_erased_device_array_view_t* cugraph_centrality_result_get_values(
size_t cugraph_centrality_result_get_num_iterations(cugraph_centrality_result_t* result);

/**
* @ingroup centrality
* @brief Returns true if the centrality algorithm converged
*
* @param [in] result The result from a centrality algorithm
Expand All @@ -73,6 +75,7 @@ size_t cugraph_centrality_result_get_num_iterations(cugraph_centrality_result_t*
bool_t cugraph_centrality_result_converged(cugraph_centrality_result_t* result);

/**
* @ingroup centrality
* @brief Free centrality result
*
* @param [in] result The result from a centrality algorithm
Expand Down Expand Up @@ -409,6 +412,7 @@ typedef struct {
} cugraph_edge_centrality_result_t;

/**
* @ingroup centrality
* @brief Get the src vertex ids from an edge centrality result
*
* @param [in] result The result from an edge centrality algorithm
Expand All @@ -418,6 +422,7 @@ cugraph_type_erased_device_array_view_t* cugraph_edge_centrality_result_get_src_
cugraph_edge_centrality_result_t* result);

/**
* @ingroup centrality
* @brief Get the dst vertex ids from an edge centrality result
*
* @param [in] result The result from an edge centrality algorithm
Expand All @@ -427,6 +432,7 @@ cugraph_type_erased_device_array_view_t* cugraph_edge_centrality_result_get_dst_
cugraph_edge_centrality_result_t* result);

/**
* @ingroup centrality
* @brief Get the edge ids from an edge centrality result
*
* @param [in] result The result from an edge centrality algorithm
Expand All @@ -436,6 +442,7 @@ cugraph_type_erased_device_array_view_t* cugraph_edge_centrality_result_get_edge
cugraph_edge_centrality_result_t* result);

/**
* @ingroup centrality
* @brief Get the centrality values from an edge centrality algorithm result
*
* @param [in] result The result from an edge centrality algorithm
Expand All @@ -445,6 +452,7 @@ cugraph_type_erased_device_array_view_t* cugraph_edge_centrality_result_get_valu
cugraph_edge_centrality_result_t* result);

/**
* @ingroup centrality
* @brief Free centrality result
*
* @param [in] result The result from a centrality algorithm
Expand Down Expand Up @@ -491,6 +499,7 @@ typedef struct {
} cugraph_hits_result_t;

/**
* @ingroup centrality
* @brief Get the vertex ids from the hits result
*
* @param [in] result The result from hits
Expand All @@ -500,6 +509,7 @@ cugraph_type_erased_device_array_view_t* cugraph_hits_result_get_vertices(
cugraph_hits_result_t* result);

/**
* @ingroup centrality
* @brief Get the hubs values from the hits result
*
* @param [in] result The result from hits
Expand All @@ -509,6 +519,7 @@ cugraph_type_erased_device_array_view_t* cugraph_hits_result_get_hubs(
cugraph_hits_result_t* result);

/**
* @ingroup centrality
* @brief Get the authorities values from the hits result
*
* @param [in] result The result from hits
Expand All @@ -518,6 +529,7 @@ cugraph_type_erased_device_array_view_t* cugraph_hits_result_get_authorities(
cugraph_hits_result_t* result);

/**
* @ingroup centrality
* @brief Get the score differences between the last two iterations
*
* @param [in] result The result from hits
Expand All @@ -526,6 +538,7 @@ cugraph_type_erased_device_array_view_t* cugraph_hits_result_get_authorities(
double cugraph_hits_result_get_hub_score_differences(cugraph_hits_result_t* result);

/**
* @ingroup centrality
* @brief Get the actual number of iterations
*
* @param [in] result The result from hits
Expand All @@ -534,6 +547,7 @@ double cugraph_hits_result_get_hub_score_differences(cugraph_hits_result_t* resu
size_t cugraph_hits_result_get_number_of_iterations(cugraph_hits_result_t* result);

/**
* @ingroup centrality
* @brief Free hits result
*
* @param [in] result The result from hits
Expand Down Expand Up @@ -585,7 +599,3 @@ cugraph_error_code_t cugraph_hits(
#ifdef __cplusplus
}
#endif

/**
* @}
*/
1 change: 0 additions & 1 deletion cpp/include/cugraph_c/community_algorithms.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <cugraph_c/resource_handle.h>

/** @defgroup community Community algorithms
* @ingroup c_api
* @{
*/

Expand Down
14 changes: 13 additions & 1 deletion cpp/include/cugraph_c/core_algorithms.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, NVIDIA CORPORATION.
* Copyright (c) 2022-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -21,6 +21,9 @@
#include <cugraph_c/graph.h>
#include <cugraph_c/resource_handle.h>

/** @defgroup core Core algorithms
*/

#ifdef __cplusplus
extern "C" {
#endif
Expand All @@ -40,6 +43,7 @@ typedef struct {
} cugraph_k_core_result_t;

/**
* @ingroup core
* @brief Create a core_number result (in case it was previously extracted)
*
* @param [in] handle Handle for accessing resources
Expand All @@ -58,6 +62,7 @@ cugraph_error_code_t cugraph_core_result_create(
cugraph_error_t** error);

/**
* @ingroup core
* @brief Get the vertex ids from the core result
*
* @param [in] result The result from core number
Expand All @@ -67,6 +72,7 @@ cugraph_type_erased_device_array_view_t* cugraph_core_result_get_vertices(
cugraph_core_result_t* result);

/**
* @ingroup core
* @brief Get the core numbers from the core result
*
* @param [in] result The result from core number
Expand All @@ -76,13 +82,15 @@ cugraph_type_erased_device_array_view_t* cugraph_core_result_get_core_numbers(
cugraph_core_result_t* result);

/**
* @ingroup core
* @brief Free core result
*
* @param [in] result The result from core number
*/
void cugraph_core_result_free(cugraph_core_result_t* result);

/**
* @ingroup core
* @brief Get the src vertex ids from the k-core result
*
* @param [in] result The result from k-core
Expand All @@ -92,6 +100,7 @@ cugraph_type_erased_device_array_view_t* cugraph_k_core_result_get_src_vertices(
cugraph_k_core_result_t* result);

/**
* @ingroup core
* @brief Get the dst vertex ids from the k-core result
*
* @param [in] result The result from k-core
Expand All @@ -101,6 +110,7 @@ cugraph_type_erased_device_array_view_t* cugraph_k_core_result_get_dst_vertices(
cugraph_k_core_result_t* result);

/**
* @ingroup core
* @brief Get the weights from the k-core result
*
* Returns NULL if the graph is unweighted
Expand All @@ -112,13 +122,15 @@ cugraph_type_erased_device_array_view_t* cugraph_k_core_result_get_weights(
cugraph_k_core_result_t* result);

/**
* @ingroup core
* @brief Free k-core result
*
* @param [in] result The result from k-core
*/
void cugraph_k_core_result_free(cugraph_k_core_result_t* result);

/**
* @ingroup core
* @brief Enumeration for computing core number
*/
typedef enum {
Expand Down
11 changes: 4 additions & 7 deletions cpp/include/cugraph_c/labeling_algorithms.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, NVIDIA CORPORATION.
* Copyright (c) 2022-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -25,8 +25,6 @@ extern "C" {
#endif

/** @defgroup labeling Labeling algorithms
* @ingroup c_api
* @{
*/

/**
Expand All @@ -37,6 +35,7 @@ typedef struct {
} cugraph_labeling_result_t;

/**
* @ingroup labeling
* @brief Get the vertex ids from the labeling result
*
* @param [in] result The result from a labeling algorithm
Expand All @@ -46,6 +45,7 @@ cugraph_type_erased_device_array_view_t* cugraph_labeling_result_get_vertices(
cugraph_labeling_result_t* result);

/**
* @ingroup labeling
* @brief Get the label values from the labeling result
*
* @param [in] result The result from a labeling algorithm
Expand All @@ -55,6 +55,7 @@ cugraph_type_erased_device_array_view_t* cugraph_labeling_result_get_labels(
cugraph_labeling_result_t* result);

/**
* @ingroup labeling
* @brief Free labeling result
*
* @param [in] result The result from a labeling algorithm
Expand Down Expand Up @@ -104,7 +105,3 @@ cugraph_error_code_t cugraph_strongly_connected_components(const cugraph_resourc
#ifdef __cplusplus
}
#endif

/**
* @}
*/
3 changes: 1 addition & 2 deletions cpp/include/cugraph_c/sampling_algorithms.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
#include <cugraph_c/random.h>
#include <cugraph_c/resource_handle.h>

/** @defgroup sampling Sampling algorithms
* @ingroup c_api
/** @defgroup samplingC Sampling algorithms
* @{
*/

Expand Down
Loading