diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2dbc55e..ab46485 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,6 +30,13 @@ repos: - id: codespell additional_dependencies: [tomli] args: ["--toml", "pyproject.toml"] + - repo: https://github.com/rstcheck/rstcheck + rev: v6.2.5 + hooks: + - id: rstcheck + args: ["--config", "pyproject.toml"] + additional_dependencies: + - 'rstcheck[sphinx,toml]' - repo: https://github.com/shellcheck-py/shellcheck-py rev: v0.11.0.1 hooks: diff --git a/docs/cugraph-docs/Makefile b/docs/cugraph-docs/Makefile index ac16367..1fde670 100644 --- a/docs/cugraph-docs/Makefile +++ b/docs/cugraph-docs/Makefile @@ -1,8 +1,10 @@ +# Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + # Minimal makefile for Sphinx documentation # # You can set these variables from the command line. -SPHINXOPTS = "-v" +SPHINXOPTS = "-v -W" SPHINXBUILD = sphinx-build SPHINXPROJ = cugraph SOURCEDIR = source diff --git a/docs/cugraph-docs/make.bat b/docs/cugraph-docs/make.bat index 807e0de..fe4297f 100644 --- a/docs/cugraph-docs/make.bat +++ b/docs/cugraph-docs/make.bat @@ -1,3 +1,5 @@ +REM Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + @ECHO OFF pushd %~dp0 @@ -9,6 +11,7 @@ if "%SPHINXBUILD%" == "" ( ) set SOURCEDIR=source set BUILDDIR=build +set SPHINXOPTS=-v -W set SPHINXPROJ=cuGraph if "%1" == "" goto help diff --git a/docs/cugraph-docs/source/api_docs/cugraph/centrality.rst b/docs/cugraph-docs/source/api_docs/cugraph/centrality.rst index 0f4b88e..bd89c43 100644 --- a/docs/cugraph-docs/source/api_docs/cugraph/centrality.rst +++ b/docs/cugraph-docs/source/api_docs/cugraph/centrality.rst @@ -9,8 +9,7 @@ Centrality Betweenness Centrality ---------------------- -single-GPU -^^^^^^^^^^ +.. rubric:: single-GPU .. autosummary:: :toctree: ../api/cugraph/ @@ -18,8 +17,7 @@ single-GPU cugraph.centrality.betweenness_centrality cugraph.centrality.edge_betweenness_centrality -multi-GPU -^^^^^^^^^^ +.. rubric:: multi-GPU .. autosummary:: :toctree: ../api/cugraph/ @@ -31,16 +29,14 @@ multi-GPU Katz Centrality --------------- -single-GPU -^^^^^^^^^^ +.. rubric:: single-GPU .. autosummary:: :toctree: ../api/cugraph/ cugraph.centrality.katz_centrality -multi-GPU -^^^^^^^^^^ +.. rubric:: multi-GPU .. autosummary:: :toctree: ../api/cugraph/ @@ -51,8 +47,7 @@ multi-GPU Degree Centrality ----------------- -single-GPU -^^^^^^^^^^ +.. rubric:: single-GPU .. autosummary:: :toctree: ../api/cugraph/ @@ -63,16 +58,14 @@ single-GPU Eigenvector Centrality ---------------------- -single-GPU -^^^^^^^^^^ +.. rubric:: single-GPU .. autosummary:: :toctree: ../api/cugraph/ cugraph.centrality.eigenvector_centrality -multi-GPU -^^^^^^^^^^ +.. rubric:: multi-GPU .. autosummary:: :toctree: ../api/cugraph/ diff --git a/docs/cugraph-docs/source/api_docs/cugraph/community.rst b/docs/cugraph-docs/source/api_docs/cugraph/community.rst index 6d50ee0..4390c81 100644 --- a/docs/cugraph-docs/source/api_docs/cugraph/community.rst +++ b/docs/cugraph-docs/source/api_docs/cugraph/community.rst @@ -8,16 +8,14 @@ Community EgoNet ------ -single-GPU -^^^^^^^^^^ +.. rubric:: single-GPU .. autosummary:: :toctree: ../api/cugraph/ cugraph.ego_graph -multi-GPU -^^^^^^^^^ +.. rubric:: multi-GPU .. autosummary:: :toctree: ../api/cugraph/ @@ -28,16 +26,14 @@ multi-GPU Ensemble clustering for graphs (ECG) ------------------------------------ -single-GPU -^^^^^^^^^^ +.. rubric:: single-GPU .. autosummary:: :toctree: ../api/cugraph/ cugraph.ecg -multi-GPU -^^^^^^^^^ +.. rubric:: multi-GPU .. autosummary:: :toctree: ../api/cugraph/ @@ -47,8 +43,7 @@ multi-GPU K-Truss ------- -single-GPU -^^^^^^^^^^ +.. rubric:: single-GPU .. autosummary:: :toctree: ../api/cugraph/ @@ -56,8 +51,7 @@ single-GPU cugraph.k_truss cugraph.ktruss_subgraph -multi-GPU -^^^^^^^^^ +.. rubric:: multi-GPU .. autosummary:: :toctree: ../api/cugraph/ @@ -68,16 +62,14 @@ multi-GPU Leiden ------ -single-GPU -^^^^^^^^^^ +.. rubric:: single-GPU .. autosummary:: :toctree: ../api/cugraph/ cugraph.leiden -multi-GPU -^^^^^^^^^ +.. rubric:: multi-GPU .. autosummary:: :toctree: ../api/cugraph/ @@ -87,8 +79,7 @@ multi-GPU Louvain ------- -single-GPU -^^^^^^^^^^ +.. rubric:: single-GPU .. autosummary:: :toctree: ../api/cugraph/ @@ -96,8 +87,7 @@ single-GPU cugraph.louvain -multi-GPU -^^^^^^^^^ +.. rubric:: multi-GPU .. autosummary:: :toctree: ../api/cugraph/ @@ -120,16 +110,14 @@ Spectral Clustering Induced Subgraph ---------------- -single-GPU -^^^^^^^^^^ +.. rubric:: single-GPU .. autosummary:: :toctree: ../api/cugraph/ cugraph.induced_subgraph -multi-GPU -^^^^^^^^^ +.. rubric:: multi-GPU .. autosummary:: :toctree: ../api/cugraph/ @@ -139,16 +127,14 @@ multi-GPU Triangle Counting ----------------- -single-GPU -^^^^^^^^^^ +.. rubric:: single-GPU .. autosummary:: :toctree: ../api/cugraph/ cugraph.triangle_count -multi-GPU -^^^^^^^^^ +.. rubric:: multi-GPU .. autosummary:: :toctree: ../api/cugraph/ diff --git a/docs/cugraph-docs/source/api_docs/cugraph/cores.rst b/docs/cugraph-docs/source/api_docs/cugraph/cores.rst index bec3269..1952264 100644 --- a/docs/cugraph-docs/source/api_docs/cugraph/cores.rst +++ b/docs/cugraph-docs/source/api_docs/cugraph/cores.rst @@ -9,16 +9,14 @@ Cores Core Number ----------- -single-GPU -^^^^^^^^^^ +.. rubric:: single-GPU .. autosummary:: :toctree: ../api/cugraph/ cugraph.core_number -multi-GPU -^^^^^^^^^ +.. rubric:: multi-GPU .. autosummary:: :toctree: ../api/cugraph/ @@ -29,16 +27,14 @@ multi-GPU K-Core ------ -single-GPU -^^^^^^^^^^ +.. rubric:: single-GPU .. autosummary:: :toctree: ../api/cugraph/ cugraph.k_core -multi-GPU -^^^^^^^^^ +.. rubric:: multi-GPU .. autosummary:: :toctree: ../api/cugraph/ diff --git a/docs/cugraph-docs/source/api_docs/cugraph/graph_implementation.rst b/docs/cugraph-docs/source/api_docs/cugraph/graph_implementation.rst index d6ac432..bdb9906 100644 --- a/docs/cugraph-docs/source/api_docs/cugraph/graph_implementation.rst +++ b/docs/cugraph-docs/source/api_docs/cugraph/graph_implementation.rst @@ -5,9 +5,6 @@ Graph Implementation .. currentmodule:: cugraph.structure.graph_implementation.simpleGraphImpl -Graph Implementation --------------------- - .. autosummary:: :toctree: ../api/cugraph/ diff --git a/docs/cugraph-docs/source/api_docs/cugraph/link_analysis.rst b/docs/cugraph-docs/source/api_docs/cugraph/link_analysis.rst index 8aa6181..1577d12 100644 --- a/docs/cugraph-docs/source/api_docs/cugraph/link_analysis.rst +++ b/docs/cugraph-docs/source/api_docs/cugraph/link_analysis.rst @@ -8,16 +8,14 @@ Link Analysis HITS ---- -single-GPU -^^^^^^^^^^ +.. rubric:: single-GPU .. autosummary:: :toctree: ../api/cugraph/ cugraph.hits -multi-GPU -^^^^^^^^^ +.. rubric:: multi-GPU .. autosummary:: :toctree: ../api/cugraph/ @@ -28,16 +26,14 @@ multi-GPU Pagerank -------- -single-GPU -^^^^^^^^^^ +.. rubric:: single-GPU .. autosummary:: :toctree: ../api/cugraph/ cugraph.pagerank -multi-GPU -^^^^^^^^^ +.. rubric:: multi-GPU .. autosummary:: :toctree: ../api/cugraph/ diff --git a/docs/cugraph-docs/source/api_docs/cugraph/link_prediction.rst b/docs/cugraph-docs/source/api_docs/cugraph/link_prediction.rst index 8772461..26ca672 100644 --- a/docs/cugraph-docs/source/api_docs/cugraph/link_prediction.rst +++ b/docs/cugraph-docs/source/api_docs/cugraph/link_prediction.rst @@ -6,8 +6,7 @@ Link Prediction Cosine ------ -single-GPU -^^^^^^^^^^ +.. rubric:: single-GPU .. autosummary:: :toctree: ../api/cugraph/ @@ -16,8 +15,7 @@ single-GPU cugraph.cosine_coefficient cugraph.all_pairs_cosine -multi-GPU -^^^^^^^^^ +.. rubric:: multi-GPU .. autosummary:: :toctree: ../api/cugraph/ @@ -29,8 +27,7 @@ multi-GPU Jaccard Coefficient ------------------- -single-GPU -^^^^^^^^^^ +.. rubric:: single-GPU .. autosummary:: :toctree: ../api/cugraph/ @@ -39,8 +36,7 @@ single-GPU cugraph.jaccard_coefficient cugraph.all_pairs_jaccard -multi-GPU -^^^^^^^^^ +.. rubric:: multi-GPU .. autosummary:: :toctree: ../api/cugraph/ @@ -51,8 +47,7 @@ multi-GPU Overlap Coefficient ------------------- -single-GPU -^^^^^^^^^^ +.. rubric:: single-GPU .. autosummary:: :toctree: ../api/cugraph/ @@ -61,8 +56,7 @@ single-GPU cugraph.overlap_coefficient cugraph.all_pairs_overlap -multi-GPU -^^^^^^^^^ +.. rubric:: multi-GPU .. autosummary:: :toctree: ../api/cugraph/ @@ -73,8 +67,7 @@ multi-GPU Sorensen Coefficient -------------------- -single-GPU -^^^^^^^^^^ +.. rubric:: single-GPU .. autosummary:: :toctree: ../api/cugraph/ @@ -83,8 +76,7 @@ single-GPU cugraph.sorensen_coefficient cugraph.all_pairs_sorensen -multi-GPU -^^^^^^^^^ +.. rubric:: multi-GPU .. autosummary:: :toctree: ../api/cugraph/ diff --git a/docs/cugraph-docs/source/api_docs/cugraph_etl/index.rst b/docs/cugraph-docs/source/api_docs/cugraph_etl/index.rst index 5cb297a..e4eebf0 100644 --- a/docs/cugraph-docs/source/api_docs/cugraph_etl/index.rst +++ b/docs/cugraph-docs/source/api_docs/cugraph_etl/index.rst @@ -15,6 +15,9 @@ Renumber cuDF tables .. code-block:: cpp + #include + #include + std::tuple, std::unique_ptr, std::unique_ptr> diff --git a/docs/cugraph-docs/source/api_docs/cugraph_prims/reference/transform_reduce_if_v_frontier_outgoing_e_by_dst.rst b/docs/cugraph-docs/source/api_docs/cugraph_prims/reference/transform_reduce_if_v_frontier_outgoing_e_by_dst.rst index c79cea5..8cad864 100644 --- a/docs/cugraph-docs/source/api_docs/cugraph_prims/reference/transform_reduce_if_v_frontier_outgoing_e_by_dst.rst +++ b/docs/cugraph-docs/source/api_docs/cugraph_prims/reference/transform_reduce_if_v_frontier_outgoing_e_by_dst.rst @@ -1,5 +1,5 @@ transform_reduce_if_v_frontier_outgoing_e_by_dst.cuh -=================================================== +==================================================== .. doxygenfile:: transform_reduce_if_v_frontier_outgoing_e_by_dst.cuh :project: libcugraph diff --git a/docs/cugraph-docs/source/api_docs/cugraph_prims/reference/transform_reduce_src_dst_nbr_intersection_of_e_endpoints_by_v.rst b/docs/cugraph-docs/source/api_docs/cugraph_prims/reference/transform_reduce_src_dst_nbr_intersection_of_e_endpoints_by_v.rst index 03df6a4..28ff33b 100644 --- a/docs/cugraph-docs/source/api_docs/cugraph_prims/reference/transform_reduce_src_dst_nbr_intersection_of_e_endpoints_by_v.rst +++ b/docs/cugraph-docs/source/api_docs/cugraph_prims/reference/transform_reduce_src_dst_nbr_intersection_of_e_endpoints_by_v.rst @@ -1,5 +1,5 @@ transform_reduce_src_dst_nbr_intersection_of_e_endpoints_by_v.cuh -================================================================ +================================================================= .. doxygenfile:: transform_reduce_src_dst_nbr_intersection_of_e_endpoints_by_v.cuh :project: libcugraph diff --git a/docs/cugraph-docs/source/api_docs/cugraph_prims/reference/transform_reduce_v_frontier_outgoing_e_by_dst.rst b/docs/cugraph-docs/source/api_docs/cugraph_prims/reference/transform_reduce_v_frontier_outgoing_e_by_dst.rst index 2c7d295..f02576a 100644 --- a/docs/cugraph-docs/source/api_docs/cugraph_prims/reference/transform_reduce_v_frontier_outgoing_e_by_dst.rst +++ b/docs/cugraph-docs/source/api_docs/cugraph_prims/reference/transform_reduce_v_frontier_outgoing_e_by_dst.rst @@ -1,5 +1,5 @@ transform_reduce_v_frontier_outgoing_e_by_dst.cuh -================================================ +================================================= .. doxygenfile:: transform_reduce_v_frontier_outgoing_e_by_dst.cuh :project: libcugraph diff --git a/docs/cugraph-docs/source/index.rst b/docs/cugraph-docs/source/index.rst index c488ec2..3e7338d 100644 --- a/docs/cugraph-docs/source/index.rst +++ b/docs/cugraph-docs/source/index.rst @@ -69,7 +69,7 @@ cuGraph Using NetworkX Code --------------------------- cuGraph is available as a NetworkX backend through -`nx-cugraph `_. NetworkX users can accelerate +`nx-cugraph `__. NetworkX users can accelerate supported algorithms on an NVIDIA GPU without changing their existing code. See :doc:`zero-code-change NetworkX acceleration `, or @@ -101,9 +101,9 @@ The RAPIDS installation guide covers several ways to set up cuGraph: * On Windows - * `Conda `_ - * `Docker `_ - * `pip `_ + * `Conda `__ + * `Docker `__ + * `pip `__ cuGraph API example ~~~~~~~~~~~~~~~~~~~ diff --git a/docs/cugraph-docs/source/nx_cugraph/index.rst b/docs/cugraph-docs/source/nx_cugraph/index.rst index 0eb8907..ca1add0 100644 --- a/docs/cugraph-docs/source/nx_cugraph/index.rst +++ b/docs/cugraph-docs/source/nx_cugraph/index.rst @@ -9,7 +9,7 @@ Users can have GPU-based, large-scale performance **without** changing their fam .. centered:: Timed result from running the following code snippet (called ``demo.ipy``, showing NetworkX with vs. without ``nx-cugraph``) -.. code-block:: python +.. code-block:: ipython import pandas as pd import networkx as nx diff --git a/docs/cugraph-docs/source/nx_cugraph/supported-algorithms.rst b/docs/cugraph-docs/source/nx_cugraph/supported-algorithms.rst index 81ddfa7..ddeb6ec 100644 --- a/docs/cugraph-docs/source/nx_cugraph/supported-algorithms.rst +++ b/docs/cugraph-docs/source/nx_cugraph/supported-algorithms.rst @@ -235,7 +235,7 @@ Algorithms Utilities -------- +--------- +-------------------------+ | **Functions** | diff --git a/pyproject.toml b/pyproject.toml index 5442ba9..f13c87e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,3 +7,36 @@ skip = "./.git,./.github" ignore-words-list = "thirdparty,unich" builtin = "clear" quiet-level = 3 + +[tool.rstcheck] +report_level = "INFO" + +ignore_languages = [ + # C++ code blocks in these docs are often incomplete snippets, + # not complete self-contained programs, which leads to a bunch of errors + # like 'error: template argument 2 is invalid' and similar. + # + # Listing 'cpp' here opts out of 'rstcheck' checking C++ syntax. + "cpp", +] + +# rstcheck only knows about directives coming from 'docutils', not +# those supplied by extensions. This list of ignores suppresses errors +# like "no directive entry". +ignore_directives = [ + # rstcheck does not understand 'sphinx.ext.auto*' directives + "autoclass", + "autofunction", + "automodule", + "autosummary", + # rstcheck does not understand 'sphinx-design' directives + "dropdown", + # rstcheck does not understand 'doxygen' directives + "doxygenenum", + "doxygenfile", + "doxygenfunction", + "doxygengroup", + "doxygennamespace", + "doxygenstruct", + "doxygentypedef" +]