Skip to content

refactor: snake_case weights arguments in clique functions and cluster_infomap() - #2861

Merged
schochastics merged 20 commits into
claude/issue-2788-subagents-faw1t1-2from
claude/issue-2788-subagents-faw1t1-3
Dec 3, 2026
Merged

schochastics merged 20 commits into
claude/issue-2788-subagents-faw1t1-2from
claude/issue-2788-subagents-faw1t1-3

Conversation

@krlmlr

@krlmlr krlmlr commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Part of #2788 (PR 3 of the stack, on top of #2860); executes the weights-spelling row of the survey plus the vertex.weights/min.weight/max.weight names called out in the issue comments.

What this does

Pure registry renames (all arguments already sit after ... with 3.0.0 entries); legacy spellings are recovered under the standard single soft-deprecation:

  • weighted_cliques(): vertex.weights → vertex_weights, min.weight → min_weight, max.weight → max_weight
  • largest_weighted_cliques(), weighted_clique_num(): vertex.weights → vertex_weights
  • cluster_infomap(): e.weights → weights and v.weights → vertex_weights — this pair was missing from the Comprehensive plan: argument renames for 3.0.0 #2788 survey table; e.weights has exactly the standard weights semantics (NULL picks up the weight edge attribute), and v.weights matches cluster_leiden()'s existing vertex_weights. The infomap.community() wrapper keeps its frozen dotted formals (now documented locally with deprecated badges) and forwards to the new names.

This aligns the whole package on exactly two vertex-weight spellings (vertex_weights) and one edge-weight spelling (weights) among non-deprecated functions.

Deliberately out of scope (survey corrections)

The issue's weights row lists two functions this PR does not touch, because renaming them to weights would be semantically wrong:

  • make_chordal_ring(w) — w is the shift matrix defining the extended chordal ring, not edge weights. A rename should go to something like shifts (follow-up decision).
  • graph_from_graphnel(weight) — a logical toggle ("import graphNEL edge weights?"), not a weights vector. A rename should go to something like use_weights (follow-up decision).

Other weight-adjacent spellings left alone on semantic grounds: out.weights/in.weights in sample_chung_lu() (fitness vectors), weight.* in layout_with_dh() (objective-function coefficients). These belong to the dotted-name case sweep.

The #2788 stack

Each PR is based on the previous one and merges in this order:

  1. refactor: Rename algo to algorithm in page_rank(), feedback_arc_set() and feedback_vertex_set() #2859: algo → algorithm
  2. refactor: Rename nodes to n in generators and centr_*_tmax() #2860: nodes → n (vertex counts)
  3. refactor: snake_case weights arguments in clique functions and cluster_infomap() #2861: weights arguments ← this PR
  4. refactor: Rename normalization flags to normalized #2862: normalization flags → normalized
  5. refactor: Purge legacy alias formals via the migration registry #2863: hand-rolled alias formals into the registry
  6. refactor: Rename vertex-selector arguments to vertices and vertex #2864: selectors → vertices/vertex
  7. refactor: Rename edge-selector arguments to edges #2943: edge selectors → edges
  8. refactor: Rename index to vertices/edges in the attribute accessors #2944: attribute accessors: index → vertices/edges
  9. refactor: Rename iteration arguments to n_iter/max_iter #2945: iterations → n_iter/max_iter
  10. refactor: snake_case the dotted arguments of the graph generators and degree-sequence functions #2946: snake_case: generators and degree sequences
  11. refactor: snake_case the dotted arguments of the layout functions #2947: snake_case: layouts
  12. refactor: snake_case the dotted arguments of the community, HRG, motif and graphlet functions #2948: snake_case: community, HRG, motifs, graphlets (Mu → mu)
  13. refactor: snake_case the dotted arguments of the structural and conversion functions #2950: snake_case: structural and conversion functions
  14. refactor: Rename algorithm-selection arguments to algorithm and measure selection to measure #2951: algorithm family → algorithm/measure (closes Algorithm-selection argument names: census of method/algorithm/algo/impl/implementation #2932)

🤖 Generated with Claude Code

https://claude.ai/code/session_01RTPj4qNv2FWui6etixZeuR


Generated by Claude Code

@krlmlr
krlmlr force-pushed the claude/issue-2788-subagents-faw1t1-3 branch from 7787af7 to 1a574c1 Compare September 3, 2026 09:57
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

This is how benchmark results would change (along with a 95% confidence interval in relative change) if 1a574c1 is merged into claude/issue-2788-subagents-faw1t1-2:

  • ✔️as_adjacency_matrix: 673ms -> 675ms [-0.18%, +0.76%]
  • ✔️as_biadjacency_matrix: 681ms -> 682ms [-0.81%, +0.94%]
  • ✔️as_data_frame_both: 1.38ms -> 1.37ms [-1.5%, +1.23%]
  • ✔️as_long_data_frame: 3.3ms -> 3.32ms [-0.7%, +2.2%]
  • ✔️es_attr_filter: 2.32ms -> 2.27ms [-5.88%, +1.58%]
  • ✔️graph_from_adjacency_matrix: 134ms -> 138ms [-0.81%, +5.4%]
  • 🚀graph_from_data_frame: 3.12ms -> 3.08ms [-2.35%, -0.07%]
  • ✔️vs_attr_filter: 1.34ms -> 1.34ms [-2.79%, +2.32%]
  • ✔️vs_by_name: 871µs -> 869µs [-1.53%, +1.08%]
    Further explanation regarding interpretation and methodology can be found in the documentation.

…er_infomap()` (#2788)

`vertex.weights` -> `vertex_weights`, `min.weight` -> `min_weight`,
`max.weight` -> `max_weight` in the weighted-clique functions,
and `e.weights` -> `weights`, `v.weights` -> `vertex_weights`
in `cluster_infomap()`,
via registry renames with soft-deprecated recovery.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RTPj4qNv2FWui6etixZeuR
@krlmlr
krlmlr force-pushed the claude/issue-2788-subagents-faw1t1-3 branch from 1a574c1 to 081a1f1 Compare September 10, 2026 09:03
@github-actions

Copy link
Copy Markdown
Contributor

This is how benchmark results would change (along with a 95% confidence interval in relative change) if 081a1f1 is merged into claude/issue-2788-subagents-faw1t1-2:

  • ✔️as_adjacency_matrix: 249ms -> 249ms [-0.79%, +0.97%]
  • ✔️as_biadjacency_matrix: 263ms -> 264ms [-0.5%, +1.08%]
  • ✔️as_data_frame_both: 268ms -> 267ms [-0.93%, +0.4%]
  • ✔️as_long_data_frame: 212ms -> 213ms [-0.54%, +0.95%]
  • ✔️es_attr_filter: 249ms -> 249ms [-1.21%, +0.62%]
  • ✔️graph_from_adjacency_matrix: 281ms -> 279ms [-1.54%, +0.2%]
  • ✔️graph_from_data_frame: 284ms -> 282ms [-1.38%, +0.01%]
  • ✔️vs_attr_filter: 335ms -> 337ms [-0.03%, +1.29%]
  • 🚀vs_by_name: 318ms -> 316ms [-1.41%, -0.02%]
    Further explanation regarding interpretation and methodology can be found in the documentation.

schochastics and others added 2 commits October 15, 2026 21:08
… after merging the base branch

Part of #2788.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

This is how benchmark results would change (along with a 95% confidence interval in relative change) if 9feba26 is merged into claude/issue-2788-subagents-faw1t1-2:

  • ✔️E_named: 222ms -> 219ms [-4.93%, +2.39%]
  • ✔️V_named: 432ms -> 431ms [-0.64%, +0.49%]
  • ✔️all_simple_paths_named: 153ms -> 152ms [-0.68%, +0.02%]
  • 🚀as_adjacency_matrix: 244ms -> 243ms [-0.98%, -0.01%]
  • ✔️as_biadjacency_matrix: 259ms -> 258ms [-1.19%, +0.4%]
  • ✔️as_data_frame_both: 260ms -> 261ms [-0.38%, +0.53%]
  • ✔️as_long_data_frame: 212ms -> 212ms [-0.58%, +1.06%]
  • ✔️ego_order2_named: 159ms -> 158ms [-2.28%, +1.46%]
  • ✔️es_attr_assign: 235ms -> 235ms [-0.91%, +0.84%]
  • ✔️es_attr_filter: 246ms -> 244ms [-1.33%, +0.15%]
  • ✔️graph_from_adjacency_matrix: 278ms -> 276ms [-1.56%, +0.25%]
  • ✔️graph_from_data_frame: 285ms -> 284ms [-1.28%, +0.45%]
  • ✔️head_of_named: 178ms -> 177ms [-1.74%, +0.26%]
  • ✔️incident_edges: 207ms -> 208ms [-0.93%, +1.98%]
  • ✔️max_cliques_named: 26ms -> 26ms [-0.55%, +0.45%]
  • ✔️neighbors_by_name: 308ms -> 309ms [-0.49%, +0.8%]
  • ✔️union_named: 232ms -> 234ms [-0.44%, +2.13%]
  • ✔️vs_attr_filter: 333ms -> 332ms [-0.84%, +0.33%]
  • ✔️vs_by_name: 299ms -> 299ms [-0.7%, +0.68%]
    Further explanation regarding interpretation and methodology can be found in the documentation.

@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

This is how benchmark results would change (along with a 95% confidence interval in relative change) if d0a0cff is merged into claude/issue-2788-subagents-faw1t1-2:

Status Name Current Incoming Interval
✔️ V_named 447.3ms 450.3ms [-0.05%, +1.4%]
✔️ vs_by_name 313.8ms 313.6ms [-0.84%, +0.68%]
✔️ graph_from_data_frame 308.1ms 308.3ms [-1.58%, +1.71%]
✔️ graph_from_adjacency_matrix 285.1ms 285.4ms [-0.71%, +0.91%]
✔️ vs_subset_positional 263.3ms 264.8ms [-0.55%, +1.68%]
✔️ as_biadjacency_matrix 251.7ms 251.3ms [-1.12%, +0.78%]
✔️ vs_attr_filter 250.1ms 250.7ms [-0.55%, +1.03%]
✔️ es_attr_filter 241.8ms 242.1ms [-0.79%, +1.01%]
✔️ es_attr_assign 242ms 240.9ms [-2.49%, +1.52%]
✔️ as_data_frame_both 235.5ms 235ms [-1.25%, +0.79%]
✔️ E_named 232.1ms 233.1ms [-1.16%, +2.04%]
✔️ as_adjacency_matrix 231.5ms 230.8ms [-1.07%, +0.53%]
✔️ incident_edges 220ms 219.9ms [-1.03%, +0.98%]
✔️ max_cliques_sizes_named 218.9ms 219.7ms [-0.64%, +1.35%]
✔️ as_long_data_frame 215ms 214ms [-1.78%, +0.81%]
✔️ union_named 193.6ms 192.8ms [-1.39%, +0.61%]
✔️ head_of_named 192.2ms 192.7ms [-0.53%, +1%]
✔️ neighbors_by_name 190.8ms 191.1ms [-0.55%, +0.9%]
✔️ ego_order2_named 167.9ms 167.3ms [-1.27%, +0.51%]
✔️ all_simple_paths_named 152.4ms 153.3ms [-0.47%, +1.57%]
✔️ vs_by_literal_name 142.2ms 142.3ms [-0.65%, +0.76%]
✔️ degree_few_vertices 132.8ms 132.3ms [-1.13%, +0.4%]
🚀 strength_weighted_named 42.7ms 42.1ms [-2.79%, -0.39%]
✔️ max_cliques_named 27.7ms 27.8ms [-0.95%, +1.53%]

Further explanation regarding interpretation and methodology can be found in the documentation.

Last updated for commit d0a0cff.

schochastics and others added 2 commits December 2, 2026 21:07
The legacy-name test exercised `vertex.weights` and `min.weight` but not
`max.weight`, which the same change renamed to `max_weight`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schochastics schochastics reopened this Dec 3, 2026
@schochastics schochastics reopened this Dec 3, 2026
@schochastics schochastics reopened this Dec 3, 2026
@schochastics schochastics reopened this Dec 3, 2026
@schochastics
schochastics merged commit 26e9d9e into main Dec 3, 2026
12 checks passed
@schochastics
schochastics deleted the claude/issue-2788-subagents-faw1t1-3 branch December 3, 2026 20:01
schochastics added a commit to schochastics/rigraph that referenced this pull request Dec 4, 2026
…er_infomap()` (igraph#2861)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: David Schoch <david@schochastics.net>
Co-authored-by: schochastics <schochastics@users.noreply.github.com>
(cherry picked from commit 26e9d9e)
schochastics added a commit to schochastics/rigraph that referenced this pull request Dec 4, 2026
…er_infomap()` (igraph#2861)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: David Schoch <david@schochastics.net>
Co-authored-by: schochastics <schochastics@users.noreply.github.com>
(cherry picked from commit 26e9d9e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Algorithm-selection argument names: census of method/algorithm/algo/impl/implementation

3 participants