Skip to content

Commit

Permalink
Skip/adjust doctests for deprecations (#4380)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mroeschke authored May 11, 2024
1 parent 7d1c3b2 commit dbd558f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
4 changes: 1 addition & 3 deletions python/cugraph/cugraph/community/egonet.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,7 @@ def batched_ego_graphs(G, seeds, radius=1, center=True, undirected=None, distanc
--------
>>> from cugraph.datasets import karate
>>> G = karate.get_graph(download=True)
>>> b_ego_graph, offsets = cugraph.batched_ego_graphs(G, seeds=[1,5],
... radius=2)
>>> cugraph.batched_ego_graphs(G, seeds=[1,5], radius=2) # doctest: +SKIP
"""
warning_msg = "This function is deprecated. Batched support for multiple vertices \
will be added to `ego_graph`"
Expand Down
5 changes: 2 additions & 3 deletions python/cugraph/cugraph/community/subgraph_extraction.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -64,8 +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
"""

warning_msg = (
Expand Down
6 changes: 2 additions & 4 deletions python/cugraph/cugraph/structure/symmetrize.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +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):
src_name = [src_name]
Expand Down Expand Up @@ -256,8 +255,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)
"""

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

0 comments on commit dbd558f

Please sign in to comment.