Skip to content

Commit

Permalink
Add tests for reading edge and vertex data from single input in PG, i…
Browse files Browse the repository at this point in the history
…mplementation to follow. (#2154)

#2109 describes additional use cases that PropertyGraph needs to support.  This PR adds tests to ensure those are supported.

Authors:
  - Rick Ratzel (https://github.com/rlratzel)

Approvers:
  - Brad Rees (https://github.com/BradReesWork)
  - Alex Barghi (https://github.com/alexbarghi-nv)
  - Vibhu Jawa (https://github.com/VibhuJawa)

URL: #2154
  • Loading branch information
rlratzel authored Sep 30, 2022
1 parent e852b3c commit a5b542e
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions python/cugraph/cugraph/tests/test_property_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,40 @@
],
}


# CSV file contents used for testing various CSV-based use cases.
# These are to be used for test_single_csv_multi_vertex_edge_attrs()
edges_edgeprops_vertexprops_csv = """
src dst edge_attr1 edge_attr2 src_attr1 src_attr2 dst_attr1 dst_attr2
0 1 87 "a" 3.1 "v0" 1.3 "v1"
0 2 88 "b" 3.2 "v0" 1.1 "v2"
2 1 89 "c" 2.3 "v2" 1.9 "v1"
"""

vertexprops_csv = """
vertex attr1 attr2
0 32 dog
1 54 fish
2 87 cat
3 12 snake
4 901 gecko
"""

edgeprops_csv = """
v_src v_dst edge_id
0 1 123
0 2 432
2 1 789
"""

edgeid_edgeprops_csv = """
edge_id attr1 attr2
123 'PUT' 21.32
432 'POST' 21.44
789 'GET' 22.03
"""


# Placeholder for a directed Graph instance. This is not constructed here in
# order to prevent cuGraph code from running on import, which would prevent
# proper pytest collection if an exception is raised. See setup_function().
Expand Down Expand Up @@ -1498,6 +1532,14 @@ def test_renumber_edges_by_type(dataset1_PropertyGraph):
assert empty_pG.renumber_edges_by_type() is None


@pytest.mark.skip(reason="feature not implemented")
def test_single_csv_multi_vertex_edge_attrs():
"""
Read an edgelist CSV that contains both edge and vertex attrs
"""
pass


# =============================================================================
# Benchmarks
# =============================================================================
Expand Down

0 comments on commit a5b542e

Please sign in to comment.