Skip to content

refactor: snake_case the dotted arguments of the layout functions - #2947

Merged
schochastics merged 28 commits into
claude/issue-2788-subagents-faw1t1-10from
claude/issue-2788-subagents-faw1t1-11
Dec 3, 2026
Merged

schochastics merged 28 commits into
claude/issue-2788-subagents-faw1t1-10from
claude/issue-2788-subagents-faw1t1-11

Conversation

@schochastics

@schochastics schochastics commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Part of #2788 (PR 11 of the stack, on top of #2946). It continues the snake_case sweep for the layout functions in R/layout.R.

What this does

15 renames, all tail arguments with a registry entry, so pure registry renames that recover the legacy names under the standard single soft-deprecation:

  • layout_as_tree(): flip.y → flip_y
  • layout_with_dh(): cool.fact, weight.node.dist, weight.border, weight.edge.lengths, weight.edge.crossings, weight.node.edge.dist → snake_case
  • layout_with_fr(): start.temp → start_temp
  • layout_with_gem(): temp.max, temp.min, temp.init → snake_case
  • layout_with_graphopt(): spring.length, spring.constant, max.sa.movement → snake_case
  • layout_with_drl(): use.seed → use_seed

The internal tkplot layout dialog builds its calls by argument name, so its parameter keys now use the new names. tkplot's own API (tkp.id, …) is excluded from the sweep, along with plot.igraph() and print.igraph().

The deprecated layout.*() wrappers are untouched. The drl_defaults option names (init.iterations, …) are list elements, not arguments, and stay as they are.

Tests

A table-driven test checks each rename with expect_legacy_arg() (from #2946). The layout_with_fr() defunct-argument snapshot now spells start_temp, so it keeps recording only the defunct-argument error.

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
  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 ← this PR
  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

Legacy names are recovered with a soft-deprecation;
the tkplot layout dialog uses the new names.

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 61915be is merged into claude/issue-2788-subagents-faw1t1-10:

  • ✔️E_named: 176ms -> 178ms [-1.32%, +3.6%]
  • ✔️V_named: 362ms -> 363ms [-0.24%, +0.92%]
  • ✔️all_simple_paths_named: 128ms -> 128ms [-0.74%, +0.5%]
  • ✔️as_adjacency_matrix: 179ms -> 178ms [-0.97%, +0.08%]
  • ✔️as_biadjacency_matrix: 198ms -> 199ms [-0.06%, +1.11%]
  • ✔️as_data_frame_both: 204ms -> 205ms [-0.53%, +0.62%]
  • ✔️as_long_data_frame: 161ms -> 161ms [-0.34%, +0.76%]
  • ✔️ego_order2_named: 140ms -> 139ms [-1.06%, +0.77%]
  • ✔️es_attr_assign: 186ms -> 186ms [-0.37%, +0.49%]
  • ✔️es_attr_filter: 190ms -> 191ms [-0.44%, +1.06%]
  • ✔️graph_from_adjacency_matrix: 219ms -> 218ms [-0.95%, +0.12%]
  • 🚀graph_from_data_frame: 224ms -> 223ms [-1.28%, -0.11%]
  • ✔️head_of_named: 146ms -> 146ms [-0.81%, +0.9%]
  • ✔️incident_edges: 164ms -> 164ms [-0.41%, +1.52%]
  • ✔️max_cliques_named: 21.8ms -> 21.8ms [-1.03%, +0.57%]
  • ✔️neighbors_by_name: 223ms -> 223ms [-0.46%, +0.65%]
  • ✔️union_named: 189ms -> 187ms [-2.36%, +0.37%]
  • ✔️vs_attr_filter: 236ms -> 236ms [-0.34%, +0.74%]
  • ✔️vs_by_name: 210ms -> 210ms [-0.48%, +0.44%]
    Further explanation regarding interpretation and methodology can be found in the documentation.

krlmlr and others added 7 commits October 18, 2026 09:45
…e-2788-subagents-faw1t1-11

# Conflicts:
#	man/layout.davidson.harel.Rd
#	man/layout.gem.Rd
#	man/layout_with_dh.Rd
#	man/layout_with_fr.Rd
#	man/layout_with_gem.Rd
…e-2788-subagents-faw1t1-11

# Conflicts:
#	R/layout.R
#	tests/testthat/test-layout.R
@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 ef95e98 is merged into claude/issue-2788-subagents-faw1t1-10:

Status Name Current Incoming Interval
🚀 V_named 375.7ms 372.2ms [-1.64%, -0.24%]
✔️ graph_from_adjacency_matrix 225.7ms 225.9ms [-0.33%, +0.57%]
✔️ graph_from_data_frame 216.2ms 217.1ms [-0.42%, +1.27%]
✔️ vs_subset_positional 194.9ms 195.2ms [-0.4%, +0.68%]
✔️ as_biadjacency_matrix 190.7ms 190.5ms [-1.21%, +0.99%]
✔️ es_attr_filter 182.8ms 183.1ms [-0.29%, +0.51%]
✔️ es_attr_assign 182.9ms 183ms [-0.35%, +0.47%]
✔️ vs_by_name 177.7ms 177.4ms [-0.67%, +0.3%]
✔️ as_adjacency_matrix 172.3ms 172.1ms [-0.76%, +0.52%]
✔️ E_named 170.1ms 171ms [-0.24%, +1.28%]
✔️ max_cliques_sizes_named 165.8ms 165.2ms [-0.83%, +0.1%]
✔️ as_data_frame_both 157.3ms 157.5ms [-0.7%, +0.9%]
✔️ as_long_data_frame 144.7ms 144ms [-1.02%, +0.16%]
✔️ union_named 143.7ms 143.9ms [-0.54%, +0.83%]
✔️ incident_edges 142.1ms 142.6ms [-0.12%, +0.9%]
✔️ vs_attr_filter 141.9ms 142.3ms [-0.29%, +0.77%]
✔️ head_of_named 123.6ms 123.4ms [-0.87%, +0.47%]
✔️ ego_order2_named 122.3ms 122.2ms [-0.66%, +0.6%]
✔️ neighbors_by_name 109.4ms 109ms [-1.05%, +0.28%]
✔️ all_simple_paths_named 99.3ms 99.2ms [-0.72%, +0.43%]
✔️ vs_by_literal_name 77.3ms 77.4ms [-0.7%, +0.94%]
✔️ degree_few_vertices 69.6ms 69.5ms [-0.82%, +0.54%]
✔️ strength_weighted_named 23.6ms 23.5ms [-1.36%, +1%]
✔️ max_cliques_named 20.1ms 20.2ms [-0.28%, +0.97%]

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

Last updated for commit ef95e98.

@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 d49aa27 into main Dec 3, 2026
12 checks passed
@schochastics
schochastics deleted the claude/issue-2788-subagents-faw1t1-11 branch December 3, 2026 20:01
schochastics added a commit to schochastics/rigraph that referenced this pull request Dec 4, 2026
…raph#2947)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
Co-authored-by: schochastics <schochastics@users.noreply.github.com>
(cherry picked from commit d49aa27)
schochastics added a commit to schochastics/rigraph that referenced this pull request Dec 4, 2026
…raph#2947)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
Co-authored-by: schochastics <schochastics@users.noreply.github.com>
(cherry picked from commit d49aa27)
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

2 participants