Skip to content

Commit 15cbedf

Browse files
authored
These changes should be the same as the previous signatures provided - though the modularity function had inconsistency between the signature and the pyfunction macro specification in previous versions. This inconsistency is now fixed, but I'm unsure if this is a breaking change or not. Functionally it should not behave any differently, but the documented specification will now appear -- correctly -- to be different than the lies it told before. (#48)
1 parent 0ea1c92 commit 15cbedf

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

packages/pyo3/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "graspologic_native"
3-
version = "1.2.2"
3+
version = "1.2.3"
44
authors = ["[email protected]"]
55
edition = "2018"
66
license = "MIT"

packages/pyo3/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ impl HierarchicalCluster {
9292
/// :raises ParameterRangeError: One of the parameters provided did not meet the requirements in the documentation.
9393
/// :raises UnsafeInducementError: An internal algorithm error. Please report with reproduction steps.
9494
#[pyfunction]
95-
#[pyo3(signature=(edges, /, starting_communities=None, resolution=1.0, randomness=0.001, iterations=1, use_modularity=true, seed=None, trials=1))]
95+
#[pyo3(signature=(/, edges, starting_communities=None, resolution=1.0, randomness=0.001, iterations=1, use_modularity=true, seed=None, trials=1))]
9696
fn leiden(
9797
py: Python,
9898
edges: Vec<Edge>,
@@ -170,7 +170,7 @@ fn leiden(
170170
/// :raises ParameterRangeError: One of the parameters provided did not meet the requirements in the documentation.
171171
/// :raises UnsafeInducementError: An internal algorithm error. Please report with reproduction steps.
172172
#[pyfunction]
173-
#[pyo3(signature=(edges, /, starting_communities=None, resolution=1.0, randomness=0.001, iterations=1, use_modularity=true, max_cluster_size=1000, seed=None))]
173+
#[pyo3(signature=(/, edges, starting_communities=None, resolution=1.0, randomness=0.001, iterations=1, use_modularity=true, max_cluster_size=1000, seed=None))]
174174
fn hierarchical_leiden(
175175
py: Python,
176176
edges: Vec<Edge>,
@@ -211,7 +211,7 @@ fn hierarchical_leiden(
211211
/// :return: The modularity of the community partitioning provided for the network.
212212
/// :rtype: float
213213
#[pyfunction]
214-
#[pyo3(signature=(edges, communities, /, resolution=1.0))]
214+
#[pyo3(signature=(/, edges, communities, resolution=1.0))]
215215
fn modularity(
216216
py: Python,
217217
edges: Vec<Edge>,

packages/pyo3/tests/test_leiden.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def _get_edges(path):
1919
class TestLeiden(unittest.TestCase):
2020
def test_leiden(self):
2121
edges = _get_edges(sbm_graph)
22-
modularity, partitions = gcn.leiden(edges, seed=seed)
22+
modularity, partitions = gcn.leiden(edges=edges, seed=seed)
2323

2424
def test_reiterative_leiden(self):
2525
"""

packages/pyo3/uv.lock

Lines changed: 14 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)