Skip to content

Commit dbd558f

Browse files
authored
Skip/adjust doctests for deprecations (#4380)
xref #4271 For methods/parameters that are deprecated, ensures the doctests will pass if `FutureWarning` or `DeprecationWarning` are made as errors Authors: - Matthew Roeschke (https://github.com/mroeschke) Approvers: - Rick Ratzel (https://github.com/rlratzel) URL: #4380
1 parent 7d1c3b2 commit dbd558f

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

python/cugraph/cugraph/community/egonet.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,7 @@ def batched_ego_graphs(G, seeds, radius=1, center=True, undirected=None, distanc
199199
--------
200200
>>> from cugraph.datasets import karate
201201
>>> G = karate.get_graph(download=True)
202-
>>> b_ego_graph, offsets = cugraph.batched_ego_graphs(G, seeds=[1,5],
203-
... radius=2)
204-
202+
>>> cugraph.batched_ego_graphs(G, seeds=[1,5], radius=2) # doctest: +SKIP
205203
"""
206204
warning_msg = "This function is deprecated. Batched support for multiple vertices \
207205
will be added to `ego_graph`"

python/cugraph/cugraph/community/subgraph_extraction.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2019-2023, NVIDIA CORPORATION.
1+
# Copyright (c) 2019-2024, NVIDIA CORPORATION.
22
# Licensed under the Apache License, Version 2.0 (the "License");
33
# you may not use this file except in compliance with the License.
44
# You may obtain a copy of the License at
@@ -64,8 +64,7 @@ def subgraph(
6464
>>> verts[1] = 1
6565
>>> verts[2] = 2
6666
>>> sverts = cudf.Series(verts)
67-
>>> Sg = cugraph.subgraph(G, sverts)
68-
67+
>>> Sg = cugraph.subgraph(G, sverts) # doctest: +SKIP
6968
"""
7069

7170
warning_msg = (

python/cugraph/cugraph/structure/symmetrize.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ def symmetrize_df(
7373
>>> # Download dataset from https://github.com/rapidsai/cugraph/datasets/..
7474
>>> M = cudf.read_csv(datasets_path / 'karate.csv', delimiter=' ',
7575
... dtype=['int32', 'int32', 'float32'], header=None)
76-
>>> sym_df = symmetrize_df(M, '0', '1')
77-
76+
>>> sym_df = symmetrize_df(M, '0', '1', multi=True)
7877
"""
7978
if not isinstance(src_name, list):
8079
src_name = [src_name]
@@ -256,8 +255,7 @@ def symmetrize(
256255
>>> df['sources'] = cudf.Series(M['0'])
257256
>>> df['destinations'] = cudf.Series(M['1'])
258257
>>> df['values'] = cudf.Series(M['2'])
259-
>>> src, dst, val = symmetrize(df, 'sources', 'destinations', 'values')
260-
258+
>>> src, dst, val = symmetrize(df, 'sources', 'destinations', 'values', multi=True)
261259
"""
262260

263261
# FIXME: Redundant check that should be done at the graph creation

0 commit comments

Comments
 (0)