Skip to content

Commit bd50913

Browse files
committed
Use GraphV2 post rebase
1 parent c1ec516 commit bd50913

19 files changed

+74
-69
lines changed

graphdatascience/procedure_surface/arrow/graphsage_train_arrow_endpoints.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
from ...arrow_client.authenticated_flight_client import AuthenticatedArrowClient
88
from ...arrow_client.v2.remote_write_back_client import RemoteWriteBackClient
9-
from ...graph.graph_object import Graph
109
from ..api.graphsage_train_endpoints import (
1110
GraphSageTrainEndpoints,
1211
GraphSageTrainResult,

graphdatascience/tests/integrationV2/procedure_surface/arrow/test_articlerank_arrow_endpoints.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import pytest
44

5-
from graphdatascience import Graph, QueryRunner
5+
from graphdatascience import QueryRunner
66
from graphdatascience.arrow_client.authenticated_flight_client import AuthenticatedArrowClient
77
from graphdatascience.arrow_client.v2.remote_write_back_client import RemoteWriteBackClient
88
from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2
@@ -29,7 +29,7 @@ def sample_graph(arrow_client: AuthenticatedArrowClient) -> Generator[GraphV2, N
2929

3030

3131
@pytest.fixture
32-
def db_graph(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner) -> Generator[Graph, None, None]:
32+
def db_graph(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner) -> Generator[GraphV2, None, None]:
3333
with create_graph_from_db(
3434
arrow_client,
3535
query_runner,
@@ -90,7 +90,9 @@ def test_articlerank_mutate(articlerank_endpoints: ArticleRankArrowEndpoints, sa
9090
assert result.node_properties_written == 3
9191

9292

93-
def test_articlerank_write(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner, db_graph: Graph) -> None:
93+
def test_articlerank_write(
94+
arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner, db_graph: GraphV2
95+
) -> None:
9496
endpoints = ArticleRankArrowEndpoints(arrow_client, RemoteWriteBackClient(arrow_client, query_runner))
9597
result = endpoints.write(G=db_graph, write_property="write")
9698

graphdatascience/tests/integrationV2/procedure_surface/arrow/test_articulationpoints_arrow_endpoints.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import pytest
44

5-
from graphdatascience import Graph, QueryRunner
5+
from graphdatascience import QueryRunner
66
from graphdatascience.arrow_client.authenticated_flight_client import AuthenticatedArrowClient
77
from graphdatascience.arrow_client.v2.remote_write_back_client import RemoteWriteBackClient
88
from graphdatascience.procedure_surface.api.articulationpoints_endpoints import (
@@ -36,7 +36,7 @@ def sample_graph(arrow_client: AuthenticatedArrowClient) -> Generator[GraphV2, N
3636

3737

3838
@pytest.fixture
39-
def db_graph(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner) -> Generator[Graph, None, None]:
39+
def db_graph(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner) -> Generator[GraphV2, None, None]:
4040
with create_graph_from_db(
4141
arrow_client,
4242
query_runner,
@@ -93,7 +93,7 @@ def test_articulationpoints_stream_not_implemented(
9393

9494

9595
def test_articulationpoints_write(
96-
arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner, db_graph: Graph
96+
arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner, db_graph: GraphV2
9797
) -> None:
9898
endpoints = ArticulationPointsArrowEndpoints(arrow_client, RemoteWriteBackClient(arrow_client, query_runner))
9999
result = endpoints.write(G=db_graph, write_property="articulationPoint")

graphdatascience/tests/integrationV2/procedure_surface/arrow/test_betweenness_arrow_endpoints.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import pytest
44

5-
from graphdatascience import Graph, QueryRunner
5+
from graphdatascience import QueryRunner
66
from graphdatascience.arrow_client.authenticated_flight_client import AuthenticatedArrowClient
77
from graphdatascience.arrow_client.v2.remote_write_back_client import RemoteWriteBackClient
88
from graphdatascience.procedure_surface.api.betweenness_endpoints import (
@@ -34,7 +34,7 @@ def sample_graph(arrow_client: AuthenticatedArrowClient) -> Generator[GraphV2, N
3434

3535

3636
@pytest.fixture
37-
def db_graph(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner) -> Generator[Graph, None, None]:
37+
def db_graph(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner) -> Generator[GraphV2, None, None]:
3838
with create_graph_from_db(
3939
arrow_client,
4040
query_runner,
@@ -90,7 +90,9 @@ def test_betweenness_mutate(betweenness_endpoints: BetweennessArrowEndpoints, sa
9090
assert result.node_properties_written == 3
9191

9292

93-
def test_betweenness_write(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner, db_graph: Graph) -> None:
93+
def test_betweenness_write(
94+
arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner, db_graph: GraphV2
95+
) -> None:
9496
endpoints = BetweennessArrowEndpoints(arrow_client, RemoteWriteBackClient(arrow_client, query_runner))
9597
result = endpoints.write(G=db_graph, write_property="betweenness")
9698

graphdatascience/tests/integrationV2/procedure_surface/arrow/test_celf_arrow_endpoints.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
import pytest
44

5-
from graphdatascience import Graph, QueryRunner
5+
from graphdatascience import QueryRunner
66
from graphdatascience.arrow_client.authenticated_flight_client import AuthenticatedArrowClient
77
from graphdatascience.arrow_client.v2.remote_write_back_client import RemoteWriteBackClient
8-
from graphdatascience.procedure_surface.api.celf_endpoints import CelfWriteResult
98
from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2
9+
from graphdatascience.procedure_surface.api.celf_endpoints import CelfWriteResult
1010
from graphdatascience.procedure_surface.arrow.celf_arrow_endpoints import CelfArrowEndpoints
1111
from graphdatascience.tests.integrationV2.procedure_surface.arrow.graph_creation_helper import (
1212
create_graph,
@@ -35,7 +35,7 @@ def sample_graph(arrow_client: AuthenticatedArrowClient) -> Generator[GraphV2, N
3535

3636

3737
@pytest.fixture
38-
def db_graph(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner) -> Generator[Graph, None, None]:
38+
def db_graph(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner) -> Generator[GraphV2, None, None]:
3939
with create_graph_from_db(
4040
arrow_client,
4141
query_runner,
@@ -83,7 +83,7 @@ def test_celf_mutate(celf_endpoints: CelfArrowEndpoints, sample_graph: GraphV2)
8383
assert isinstance(result.configuration, dict)
8484

8585

86-
def test_celf_write(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner, db_graph: Graph) -> None:
86+
def test_celf_write(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner, db_graph: GraphV2) -> None:
8787
endpoints = CelfArrowEndpoints(arrow_client, RemoteWriteBackClient(arrow_client, query_runner))
8888
result = endpoints.write(G=db_graph, seed_set_size=2, write_property="celf_spread")
8989

graphdatascience/tests/integrationV2/procedure_surface/arrow/test_closeness_arrow_endpoints.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
import pytest
44

5-
from graphdatascience import Graph, QueryRunner
5+
from graphdatascience import QueryRunner
66
from graphdatascience.arrow_client.authenticated_flight_client import AuthenticatedArrowClient
77
from graphdatascience.arrow_client.v2.remote_write_back_client import RemoteWriteBackClient
8-
from graphdatascience.procedure_surface.api.closeness_endpoints import ClosenessWriteResult
98
from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2
9+
from graphdatascience.procedure_surface.api.closeness_endpoints import ClosenessWriteResult
1010
from graphdatascience.procedure_surface.arrow.closeness_arrow_endpoints import ClosenessArrowEndpoints
1111
from graphdatascience.tests.integrationV2.procedure_surface.arrow.graph_creation_helper import (
1212
create_graph,
@@ -32,7 +32,7 @@ def sample_graph(arrow_client: AuthenticatedArrowClient) -> Generator[GraphV2, N
3232

3333

3434
@pytest.fixture
35-
def db_graph(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner) -> Generator[Graph, None, None]:
35+
def db_graph(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner) -> Generator[GraphV2, None, None]:
3636
with create_graph_from_db(
3737
arrow_client,
3838
query_runner,
@@ -84,7 +84,7 @@ def test_closeness_mutate(closeness_endpoints: ClosenessArrowEndpoints, sample_g
8484
assert "p50" in result.centrality_distribution
8585

8686

87-
def test_closeness_write(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner, db_graph: Graph) -> None:
87+
def test_closeness_write(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner, db_graph: GraphV2) -> None:
8888
endpoints = ClosenessArrowEndpoints(arrow_client, RemoteWriteBackClient(arrow_client, query_runner))
8989
result = endpoints.write(G=db_graph, write_property="closeness")
9090

graphdatascience/tests/integrationV2/procedure_surface/arrow/test_closeness_harmonic_arrow_endpoints.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
import pytest
44

5-
from graphdatascience import Graph, QueryRunner
5+
from graphdatascience import QueryRunner
66
from graphdatascience.arrow_client.authenticated_flight_client import AuthenticatedArrowClient
77
from graphdatascience.arrow_client.v2.remote_write_back_client import RemoteWriteBackClient
8-
from graphdatascience.procedure_surface.api.closeness_harmonic_endpoints import ClosenessHarmonicWriteResult
98
from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2
9+
from graphdatascience.procedure_surface.api.closeness_harmonic_endpoints import ClosenessHarmonicWriteResult
1010
from graphdatascience.procedure_surface.arrow.closeness_harmonic_arrow_endpoints import ClosenessHarmonicArrowEndpoints
1111
from graphdatascience.tests.integrationV2.procedure_surface.arrow.graph_creation_helper import (
1212
create_graph,
@@ -32,7 +32,7 @@ def sample_graph(arrow_client: AuthenticatedArrowClient) -> Generator[GraphV2, N
3232

3333

3434
@pytest.fixture
35-
def db_graph(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner) -> Generator[Graph, None, None]:
35+
def db_graph(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner) -> Generator[GraphV2, None, None]:
3636
with create_graph_from_db(
3737
arrow_client,
3838
query_runner,
@@ -94,7 +94,7 @@ def test_closeness_harmonic_mutate(
9494

9595

9696
def test_closeness_harmonic_write(
97-
arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner, db_graph: Graph
97+
arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner, db_graph: GraphV2
9898
) -> None:
9999
endpoints = ClosenessHarmonicArrowEndpoints(arrow_client, RemoteWriteBackClient(arrow_client, query_runner))
100100
result = endpoints.write(G=db_graph, write_property="harmonic_closeness")

graphdatascience/tests/integrationV2/procedure_surface/arrow/test_degree_arrow_endpoints.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
import pytest
44

5-
from graphdatascience import Graph, QueryRunner
5+
from graphdatascience import QueryRunner
66
from graphdatascience.arrow_client.authenticated_flight_client import AuthenticatedArrowClient
77
from graphdatascience.arrow_client.v2.remote_write_back_client import RemoteWriteBackClient
8-
from graphdatascience.procedure_surface.api.degree_endpoints import DegreeWriteResult
98
from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2
9+
from graphdatascience.procedure_surface.api.degree_endpoints import DegreeWriteResult
1010
from graphdatascience.procedure_surface.arrow.degree_arrow_endpoints import DegreeArrowEndpoints
1111
from graphdatascience.tests.integrationV2.procedure_surface.arrow.graph_creation_helper import (
1212
create_graph,
@@ -30,7 +30,7 @@ def sample_graph(arrow_client: AuthenticatedArrowClient) -> Generator[GraphV2, N
3030

3131

3232
@pytest.fixture
33-
def db_graph(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner) -> Generator[Graph, None, None]:
33+
def db_graph(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner) -> Generator[GraphV2, None, None]:
3434
with create_graph_from_db(
3535
arrow_client,
3636
query_runner,
@@ -81,7 +81,7 @@ def test_degree_mutate(degree_endpoints: DegreeArrowEndpoints, sample_graph: Gra
8181
assert isinstance(result.configuration, dict)
8282

8383

84-
def test_degree_write(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner, db_graph: Graph) -> None:
84+
def test_degree_write(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner, db_graph: GraphV2) -> None:
8585
endpoints = DegreeArrowEndpoints(arrow_client, RemoteWriteBackClient(arrow_client, query_runner))
8686
result = endpoints.write(G=db_graph, write_property="degree")
8787

graphdatascience/tests/integrationV2/procedure_surface/arrow/test_eigenvector_arrow_endpoints.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
import pytest
44

5-
from graphdatascience import Graph, QueryRunner
5+
from graphdatascience import QueryRunner
66
from graphdatascience.arrow_client.authenticated_flight_client import AuthenticatedArrowClient
77
from graphdatascience.arrow_client.v2.remote_write_back_client import RemoteWriteBackClient
8-
from graphdatascience.procedure_surface.api.eigenvector_endpoints import EigenvectorWriteResult
98
from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2
9+
from graphdatascience.procedure_surface.api.eigenvector_endpoints import EigenvectorWriteResult
1010
from graphdatascience.procedure_surface.arrow.eigenvector_arrow_endpoints import EigenvectorArrowEndpoints
1111
from graphdatascience.tests.integrationV2.procedure_surface.arrow.graph_creation_helper import (
1212
create_graph,
@@ -33,7 +33,7 @@ def sample_graph(arrow_client: AuthenticatedArrowClient) -> Generator[GraphV2, N
3333

3434

3535
@pytest.fixture
36-
def db_graph(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner) -> Generator[Graph, None, None]:
36+
def db_graph(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner) -> Generator[GraphV2, None, None]:
3737
with create_graph_from_db(
3838
arrow_client,
3939
query_runner,
@@ -93,7 +93,9 @@ def test_eigenvector_mutate(eigenvector_endpoints: EigenvectorArrowEndpoints, sa
9393
assert "p50" in result.centrality_distribution
9494

9595

96-
def test_eigenvector_write(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner, db_graph: Graph) -> None:
96+
def test_eigenvector_write(
97+
arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner, db_graph: GraphV2
98+
) -> None:
9799
"""Test Eigenvector write operation."""
98100
endpoints = EigenvectorArrowEndpoints(arrow_client, RemoteWriteBackClient(arrow_client, query_runner))
99101
result = endpoints.write(G=db_graph, write_property="eigenvector")

graphdatascience/tests/integrationV2/procedure_surface/arrow/test_fastrp_arrow_endpoints.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
import pytest
44

5-
from graphdatascience import Graph, QueryRunner
5+
from graphdatascience import QueryRunner
66
from graphdatascience.arrow_client.authenticated_flight_client import AuthenticatedArrowClient
77
from graphdatascience.arrow_client.v2.remote_write_back_client import RemoteWriteBackClient
8-
from graphdatascience.procedure_surface.api.fastrp_endpoints import FastRPWriteResult
98
from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2
9+
from graphdatascience.procedure_surface.api.fastrp_endpoints import FastRPWriteResult
1010
from graphdatascience.procedure_surface.arrow.fastrp_arrow_endpoints import FastRPArrowEndpoints
1111
from graphdatascience.tests.integrationV2.procedure_surface.arrow.graph_creation_helper import (
1212
create_graph,
@@ -27,13 +27,13 @@
2727

2828

2929
@pytest.fixture
30-
def sample_graph(arrow_client: AuthenticatedArrowClient) -> Generator[Graph, None, None]:
30+
def sample_graph(arrow_client: AuthenticatedArrowClient) -> Generator[GraphV2, None, None]:
3131
with create_graph(arrow_client, "g", graph) as G:
3232
yield G
3333

3434

3535
@pytest.fixture
36-
def db_graph(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner) -> Generator[Graph, None, None]:
36+
def db_graph(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner) -> Generator[GraphV2, None, None]:
3737
with create_graph_from_db(
3838
arrow_client,
3939
query_runner,
@@ -93,7 +93,7 @@ def test_fastrp_mutate(fastrp_endpoints: FastRPArrowEndpoints, sample_graph: Gra
9393
assert result.configuration is not None
9494

9595

96-
def test_fastrp_write(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner, db_graph: Graph) -> None:
96+
def test_fastrp_write(arrow_client: AuthenticatedArrowClient, query_runner: QueryRunner, db_graph: GraphV2) -> None:
9797
endpoints = FastRPArrowEndpoints(arrow_client, RemoteWriteBackClient(arrow_client, query_runner))
9898
result = endpoints.write(G=db_graph, write_property="fastrp_embedding", embedding_dimension=32)
9999

0 commit comments

Comments
 (0)