From 5a282d45a081e97321a8fee83ff2261bae72e8bb Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Tue, 2 Apr 2024 16:44:24 -0700 Subject: [PATCH] fix more docstrings --- python/cugraph/cugraph/community/subgraph_extraction.py | 4 ++-- .../cugraph/dask/centrality/betweenness_centrality.py | 6 +++--- .../cugraph/dask/centrality/eigenvector_centrality.py | 4 ++-- python/cugraph/cugraph/dask/centrality/katz_centrality.py | 4 ++-- python/cugraph/cugraph/dask/community/leiden.py | 2 +- python/cugraph/cugraph/dask/community/louvain.py | 2 +- python/cugraph/cugraph/dask/components/connectivity.py | 4 ++-- python/cugraph/cugraph/dask/cores/k_core.py | 4 ++-- python/cugraph/cugraph/dask/link_analysis/hits.py | 4 ++-- python/cugraph/cugraph/dask/link_analysis/pagerank.py | 2 +- python/cugraph/cugraph/dask/traversal/bfs.py | 4 ++-- python/cugraph/cugraph/dask/traversal/sssp.py | 4 ++-- python/cugraph/cugraph/structure/symmetrize.py | 6 +++--- 13 files changed, 25 insertions(+), 25 deletions(-) diff --git a/python/cugraph/cugraph/community/subgraph_extraction.py b/python/cugraph/cugraph/community/subgraph_extraction.py index 77b28d4daff..ad038b499df 100644 --- a/python/cugraph/cugraph/community/subgraph_extraction.py +++ b/python/cugraph/cugraph/community/subgraph_extraction.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2023, NVIDIA CORPORATION. +# Copyright (c) 2019-2024, NVIDIA CORPORATION. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -64,7 +64,7 @@ def subgraph( >>> verts[1] = 1 >>> verts[2] = 2 >>> sverts = cudf.Series(verts) - >>> Sg = cugraph.subgraph(G, sverts) + >>> Sg = cugraph.subgraph(G, sverts) # doctest: +SKIP """ diff --git a/python/cugraph/cugraph/dask/centrality/betweenness_centrality.py b/python/cugraph/cugraph/dask/centrality/betweenness_centrality.py index 6aa708ea585..43891f487c1 100644 --- a/python/cugraph/cugraph/dask/centrality/betweenness_centrality.py +++ b/python/cugraph/cugraph/dask/centrality/betweenness_centrality.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -204,7 +204,7 @@ def betweenness_centrality( >>> # Download dataset from https://github.com/rapidsai/cugraph/datasets/.. >>> chunksize = dcg.get_chunksize(datasets_path / "karate.csv") >>> ddf = dask_cudf.read_csv(datasets_path / "karate.csv", - ... chunksize=chunksize, delimiter=" ", + ... blocksize=chunksize, delimiter=" ", ... names=["src", "dst", "value"], ... dtype=["int32", "int32", "float32"]) >>> dg = cugraph.Graph(directed=True) @@ -362,7 +362,7 @@ def edge_betweenness_centrality( >>> # Download dataset from https://github.com/rapidsai/cugraph/datasets/.. >>> chunksize = dcg.get_chunksize(datasets_path / "karate.csv") >>> ddf = dask_cudf.read_csv(datasets_path / "karate.csv", - ... chunksize=chunksize, delimiter=" ", + ... blocksize=chunksize, delimiter=" ", ... names=["src", "dst", "value"], ... dtype=["int32", "int32", "float32"]) >>> dg = cugraph.Graph(directed=True) diff --git a/python/cugraph/cugraph/dask/centrality/eigenvector_centrality.py b/python/cugraph/cugraph/dask/centrality/eigenvector_centrality.py index 0dcd2b38546..7dfe3df7030 100644 --- a/python/cugraph/cugraph/dask/centrality/eigenvector_centrality.py +++ b/python/cugraph/cugraph/dask/centrality/eigenvector_centrality.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -104,7 +104,7 @@ def eigenvector_centrality(input_graph, max_iter=100, tol=1.0e-6): >>> # Download dataset from https://github.com/rapidsai/cugraph/datasets/.. >>> chunksize = dcg.get_chunksize(datasets_path / "karate.csv") >>> ddf = dask_cudf.read_csv(datasets_path / "karate.csv", - ... chunksize=chunksize, delimiter=" ", + ... blocksize=chunksize, delimiter=" ", ... names=["src", "dst", "value"], ... dtype=["int32", "int32", "float32"]) >>> dg = cugraph.Graph() diff --git a/python/cugraph/cugraph/dask/centrality/katz_centrality.py b/python/cugraph/cugraph/dask/centrality/katz_centrality.py index 3891c04f5aa..a11be3b6870 100644 --- a/python/cugraph/cugraph/dask/centrality/katz_centrality.py +++ b/python/cugraph/cugraph/dask/centrality/katz_centrality.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -133,7 +133,7 @@ def katz_centrality( >>> # Download dataset from https://github.com/rapidsai/cugraph/datasets/.. >>> chunksize = dcg.get_chunksize(datasets_path / "karate.csv") >>> ddf = dask_cudf.read_csv(datasets_path / "karate.csv", - ... chunksize=chunksize, delimiter=" ", + ... blocksize=chunksize, delimiter=" ", ... names=["src", "dst", "value"], ... dtype=["int32", "int32", "float32"]) >>> dg = cugraph.Graph(directed=True) diff --git a/python/cugraph/cugraph/dask/community/leiden.py b/python/cugraph/cugraph/dask/community/leiden.py index 24a077d1845..bdcf9edc7bb 100644 --- a/python/cugraph/cugraph/dask/community/leiden.py +++ b/python/cugraph/cugraph/dask/community/leiden.py @@ -132,7 +132,7 @@ def leiden( >>> # Download dataset from https://github.com/rapidsai/cugraph/datasets/.. >>> chunksize = dcg.get_chunksize(datasets_path / "karate.csv") >>> ddf = dask_cudf.read_csv(datasets_path / "karate.csv", - ... chunksize=chunksize, delimiter=" ", + ... blocksize=chunksize, delimiter=" ", ... names=["src", "dst", "value"], ... dtype=["int32", "int32", "float32"]) >>> dg = cugraph.Graph() diff --git a/python/cugraph/cugraph/dask/community/louvain.py b/python/cugraph/cugraph/dask/community/louvain.py index 2d894d9665f..8ad3e6c2cf3 100644 --- a/python/cugraph/cugraph/dask/community/louvain.py +++ b/python/cugraph/cugraph/dask/community/louvain.py @@ -136,7 +136,7 @@ def louvain( >>> # Download dataset from https://github.com/rapidsai/cugraph/datasets/.. >>> chunksize = dcg.get_chunksize(datasets_path / "karate.csv") >>> ddf = dask_cudf.read_csv(datasets_path / "karate.csv", - ... chunksize=chunksize, delimiter=" ", + ... blocksize=chunksize, delimiter=" ", ... names=["src", "dst", "value"], ... dtype=["int32", "int32", "float32"]) >>> dg = cugraph.Graph() diff --git a/python/cugraph/cugraph/dask/components/connectivity.py b/python/cugraph/cugraph/dask/components/connectivity.py index 7adaa2cd509..5a92fe004ee 100644 --- a/python/cugraph/cugraph/dask/components/connectivity.py +++ b/python/cugraph/cugraph/dask/components/connectivity.py @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2023, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -78,7 +78,7 @@ def weakly_connected_components(input_graph): >>> # Download dataset from https://github.com/rapidsai/cugraph/datasets/.. >>> chunksize = dcg.get_chunksize(datasets_path / "karate.csv") >>> ddf = dask_cudf.read_csv(datasets_path / "karate.csv", - ... chunksize=chunksize, delimiter=" ", + ... blocksize=chunksize, delimiter=" ", ... names=["src", "dst", "value"], ... dtype=["int32", "int32", "float32"]) >>> dg = cugraph.Graph(directed=False) diff --git a/python/cugraph/cugraph/dask/cores/k_core.py b/python/cugraph/cugraph/dask/cores/k_core.py index 4cc1ffc9f9b..0d799e3ee06 100644 --- a/python/cugraph/cugraph/dask/cores/k_core.py +++ b/python/cugraph/cugraph/dask/cores/k_core.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -109,7 +109,7 @@ def k_core(input_graph, k=None, core_number=None, degree_type="bidirectional"): >>> # Download dataset from https://github.com/rapidsai/cugraph/datasets/.. >>> chunksize = dcg.get_chunksize(datasets_path / "karate.csv") >>> ddf = dask_cudf.read_csv(datasets_path / "karate.csv", - ... chunksize=chunksize, delimiter=" ", + ... blocksize=chunksize, delimiter=" ", ... names=["src", "dst", "value"], ... dtype=["int32", "int32", "float32"]) >>> dg = cugraph.Graph(directed=False) diff --git a/python/cugraph/cugraph/dask/link_analysis/hits.py b/python/cugraph/cugraph/dask/link_analysis/hits.py index 3de69e1518b..13357ebb996 100644 --- a/python/cugraph/cugraph/dask/link_analysis/hits.py +++ b/python/cugraph/cugraph/dask/link_analysis/hits.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -118,7 +118,7 @@ def hits(input_graph, tol=1.0e-5, max_iter=100, nstart=None, normalized=True): >>> # Download dataset from https://github.com/rapidsai/cugraph/datasets/.. >>> chunksize = dcg.get_chunksize(datasets_path / "karate.csv") >>> ddf = dask_cudf.read_csv(datasets_path / "karate.csv", - ... chunksize=chunksize, delimiter=" ", + ... blocksize=chunksize, delimiter=" ", ... names=["src", "dst", "value"], ... dtype=["int32", "int32", "float32"]) >>> dg = cugraph.Graph(directed=True) diff --git a/python/cugraph/cugraph/dask/link_analysis/pagerank.py b/python/cugraph/cugraph/dask/link_analysis/pagerank.py index 62ae9109624..4b592a2583c 100644 --- a/python/cugraph/cugraph/dask/link_analysis/pagerank.py +++ b/python/cugraph/cugraph/dask/link_analysis/pagerank.py @@ -295,7 +295,7 @@ def pagerank( >>> # Download dataset from https://github.com/rapidsai/cugraph/datasets/.. >>> chunksize = dcg.get_chunksize(datasets_path / "karate.csv") >>> ddf = dask_cudf.read_csv(datasets_path / "karate.csv", - ... chunksize=chunksize, delimiter=" ", + ... blocksize=chunksize, delimiter=" ", ... names=["src", "dst", "value"], ... dtype=["int32", "int32", "float32"]) >>> dg = cugraph.Graph(directed=True) diff --git a/python/cugraph/cugraph/dask/traversal/bfs.py b/python/cugraph/cugraph/dask/traversal/bfs.py index 412fd851ad6..f1b26472ee0 100644 --- a/python/cugraph/cugraph/dask/traversal/bfs.py +++ b/python/cugraph/cugraph/dask/traversal/bfs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2023, NVIDIA CORPORATION. +# Copyright (c) 2019-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -106,7 +106,7 @@ def bfs(input_graph, start, depth_limit=None, return_distances=True, check_start >>> # Download dataset from https://github.com/rapidsai/cugraph/datasets/.. >>> chunksize = dcg.get_chunksize(datasets_path / "karate.csv") >>> ddf = dask_cudf.read_csv(datasets_path / "karate.csv", - ... chunksize=chunksize, delimiter=" ", + ... blocksize=chunksize, delimiter=" ", ... names=["src", "dst", "value"], ... dtype=["int32", "int32", "float32"]) >>> dg = cugraph.Graph(directed=True) diff --git a/python/cugraph/cugraph/dask/traversal/sssp.py b/python/cugraph/cugraph/dask/traversal/sssp.py index 053a93fb42a..04c4376a500 100644 --- a/python/cugraph/cugraph/dask/traversal/sssp.py +++ b/python/cugraph/cugraph/dask/traversal/sssp.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2023, NVIDIA CORPORATION. +# Copyright (c) 2019-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -89,7 +89,7 @@ def sssp(input_graph, source, cutoff=None, check_source=True): >>> # Download dataset from https://github.com/rapidsai/cugraph/datasets/.. >>> chunksize = dcg.get_chunksize(datasets_path / "karate.csv") >>> ddf = dask_cudf.read_csv(datasets_path / "karate.csv", - ... chunksize=chunksize, delimiter=" ", + ... blocksize=chunksize, delimiter=" ", ... names=["src", "dst", "value"], ... dtype=["int32", "int32", "float32"]) >>> dg = cugraph.Graph(directed=True) diff --git a/python/cugraph/cugraph/structure/symmetrize.py b/python/cugraph/cugraph/structure/symmetrize.py index 30c6394ade9..27e8fb3e616 100644 --- a/python/cugraph/cugraph/structure/symmetrize.py +++ b/python/cugraph/cugraph/structure/symmetrize.py @@ -73,7 +73,7 @@ def symmetrize_df( >>> # Download dataset from https://github.com/rapidsai/cugraph/datasets/.. >>> M = cudf.read_csv(datasets_path / 'karate.csv', delimiter=' ', ... dtype=['int32', 'int32', 'float32'], header=None) - >>> sym_df = symmetrize_df(M, '0', '1') + >>> sym_df = symmetrize_df(M, '0', '1', multi=True) """ if not isinstance(src_name, list): @@ -159,7 +159,7 @@ def symmetrize_ddf( >>> # Init a DASK Cluster >>> # Download dataset from https://github.com/rapidsai/cugraph/datasets/.. >>> # chunksize = dcg.get_chunksize(datasets / 'karate.csv') - >>> # ddf = dask_cudf.read_csv(datasets/'karate.csv', chunksize=chunksize, + >>> # ddf = dask_cudf.read_csv(datasets/'karate.csv', blocksize=chunksize, >>> # delimiter=' ', >>> # names=['src', 'dst', 'weight'], >>> # dtype=['int32', 'int32', 'float32']) @@ -256,7 +256,7 @@ def symmetrize( >>> df['sources'] = cudf.Series(M['0']) >>> df['destinations'] = cudf.Series(M['1']) >>> df['values'] = cudf.Series(M['2']) - >>> src, dst, val = symmetrize(df, 'sources', 'destinations', 'values') + >>> src, dst, val = symmetrize(df, 'sources', 'destinations', 'values', multi=True) """