Skip to content

Commit c5e00b4

Browse files
committed
Minor cleanups
1 parent e197129 commit c5e00b4

File tree

3 files changed

+41
-41
lines changed

3 files changed

+41
-41
lines changed

graphdatascience/procedure_surface/api/graph_sampling_endpoints.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
from abc import ABC, abstractmethod
4-
from typing import Any, List, Optional
4+
from typing import List, Optional
55

66
from graphdatascience import Graph
77
from graphdatascience.procedure_surface.api.base_result import BaseResult
@@ -27,8 +27,8 @@ def rwr(
2727
sudo: Optional[bool] = None,
2828
log_progress: Optional[bool] = None,
2929
username: Optional[str] = None,
30-
concurrency: Optional[Any] = None,
31-
job_id: Optional[Any] = None,
30+
concurrency: Optional[int] = None,
31+
job_id: Optional[str] = None,
3232
) -> GraphSamplingResult:
3333
"""
3434
Computes a set of Random Walks with Restart (RWR) for the given graph and stores the result as a new graph in the catalog.
@@ -59,9 +59,9 @@ def rwr(
5959
The name of the property on relationships to use as weights during
6060
the random walk. If not specified, the relationships are treated as
6161
unweighted.
62-
relationship_types : Optional[List[str]], default=None
62+
relationship_types : list of str, optional
6363
The relationship types used to select relationships for this algorithm run.
64-
node_labels : Optional[List[str]], default=None
64+
node_labels : list of str, optional
6565
The node labels used to select nodes for this algorithm run.
6666
sudo : bool, optional
6767
Override memory estimation limits. Use with caution as this can lead to
@@ -70,9 +70,9 @@ def rwr(
7070
If True, logs the progress of the computation.
7171
username : str, optional
7272
The username to attribute the procedure run to
73-
concurrency : Any, optional
73+
concurrency : int, optional
7474
The number of concurrent threads used for the algorithm execution.
75-
job_id : Any, optional
75+
job_id : str, optional
7676
An identifier for the job that can be used for monitoring and cancellation
7777
7878
Returns
@@ -98,8 +98,8 @@ def cnarw(
9898
sudo: Optional[bool] = None,
9999
log_progress: Optional[bool] = None,
100100
username: Optional[str] = None,
101-
concurrency: Optional[Any] = None,
102-
job_id: Optional[Any] = None,
101+
concurrency: Optional[int] = None,
102+
job_id: Optional[str] = None,
103103
) -> GraphSamplingResult:
104104
"""
105105
Computes a set of Random Walks with Restart (RWR) for the given graph and stores the result as a new graph in the catalog.
@@ -130,9 +130,9 @@ def cnarw(
130130
The name of the property on relationships to use as weights during
131131
the random walk. If not specified, the relationships are treated as
132132
unweighted.
133-
relationship_types : Optional[List[str]], default=None
133+
relationship_types : list of str, optional
134134
The relationship types used to select relationships for this algorithm run.
135-
node_labels : Optional[List[str]], default=None
135+
node_labels : list of str, optional
136136
The node labels used to select nodes for this algorithm run.
137137
sudo : bool, optional
138138
Override memory estimation limits. Use with caution as this can lead to
@@ -141,9 +141,9 @@ def cnarw(
141141
If True, logs the progress of the computation.
142142
username : str, optional
143143
The username to attribute the procedure run to
144-
concurrency : Any, optional
144+
concurrency : int, optional
145145
The number of concurrent threads used for the algorithm execution.
146-
job_id : Any, optional
146+
job_id : str, optional
147147
An identifier for the job that can be used for monitoring and cancellation
148148
149149
Returns

graphdatascience/procedure_surface/arrow/graph_sampling_arrow_endpoints.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ def rwr(
3636
config = ConfigConverter.convert_to_gds_config(
3737
from_graph_name=G.name(),
3838
graph_name=graph_name,
39-
startNodes=start_nodes,
40-
restartProbability=restart_probability,
41-
samplingRatio=sampling_ratio,
42-
nodeLabelStratification=node_label_stratification,
43-
relationshipWeightProperty=relationship_weight_property,
39+
start_nodes=start_nodes,
40+
restart_probability=restart_probability,
41+
sampling_ratio=sampling_ratio,
42+
node_label_stratification=node_label_stratification,
43+
relationship_weight_property=relationship_weight_property,
4444
relationship_types=relationship_types,
4545
node_labels=node_labels,
4646
sudo=sudo,
@@ -74,11 +74,11 @@ def cnarw(
7474
config = ConfigConverter.convert_to_gds_config(
7575
from_graph_name=G.name(),
7676
graph_name=graph_name,
77-
startNodes=start_nodes,
78-
restartProbability=restart_probability,
79-
samplingRatio=sampling_ratio,
80-
nodeLabelStratification=node_label_stratification,
81-
relationshipWeightProperty=relationship_weight_property,
77+
start_nodes=start_nodes,
78+
restart_probability=restart_probability,
79+
sampling_ratio=sampling_ratio,
80+
node_label_stratification=node_label_stratification,
81+
relationship_weight_property=relationship_weight_property,
8282
relationship_types=relationship_types,
8383
node_labels=node_labels,
8484
sudo=sudo,

graphdatascience/procedure_surface/cypher/graph_sampling_cypher_endpoints.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ def rwr(
3131
job_id: Optional[Any] = None,
3232
) -> GraphSamplingResult:
3333
config = ConfigConverter.convert_to_gds_config(
34-
startNodes=start_nodes,
35-
restartProbability=restart_probability,
36-
samplingRatio=sampling_ratio,
37-
nodeLabelStratification=node_label_stratification,
38-
relationshipWeightProperty=relationship_weight_property,
39-
relationshipTypes=relationship_types,
40-
nodeLabels=node_labels,
34+
start_nodes=start_nodes,
35+
restart_probability=restart_probability,
36+
sampling_ratio=sampling_ratio,
37+
node_label_stratification=node_label_stratification,
38+
relationship_weight_property=relationship_weight_property,
39+
relationship_types=relationship_types,
40+
node_labels=node_labels,
4141
sudo=sudo,
42-
logProgress=log_progress,
42+
log_progress=log_progress,
4343
username=username,
4444
concurrency=concurrency,
45-
jobId=job_id,
45+
job_id=job_id,
4646
)
4747

4848
params = CallParameters(
@@ -73,18 +73,18 @@ def cnarw(
7373
job_id: Optional[Any] = None,
7474
) -> GraphSamplingResult:
7575
config = ConfigConverter.convert_to_gds_config(
76-
startNodes=start_nodes,
77-
restartProbability=restart_probability,
78-
samplingRatio=sampling_ratio,
79-
nodeLabelStratification=node_label_stratification,
80-
relationshipWeightProperty=relationship_weight_property,
81-
relationshipTypes=relationship_types,
82-
nodeLabels=node_labels,
76+
start_nodes=start_nodes,
77+
restart_probability=restart_probability,
78+
sampling_ratio=sampling_ratio,
79+
node_label_stratification=node_label_stratification,
80+
relationship_weight_property=relationship_weight_property,
81+
relationship_types=relationship_types,
82+
node_labels=node_labels,
8383
sudo=sudo,
84-
logProgress=log_progress,
84+
log_progress=log_progress,
8585
username=username,
8686
concurrency=concurrency,
87-
jobId=job_id,
87+
job_id=job_id,
8888
)
8989

9090
params = CallParameters(

0 commit comments

Comments
 (0)