refactor: Rename vertex-selector arguments to vertices - #2864
Open
krlmlr wants to merge 1 commit into
Open
Conversation
The subset selectors `v`, `vids` and `nodes` unify on `vertices` across 24 functions, implementing the #692 scheme: `vertices` selects a subset, `n` counts (previous PR), and single-vertex arguments keep `v` (`neighbors()`, `incident()`, `subcomponent()`). Head selectors keep positional calls working and recover named legacy spellings via surviving sentinel formals; tail selectors ride the registry recovery. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RTPj4qNv2FWui6etixZeuR
Contributor
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 7954b20 is merged into claude/issue-2788-subagents-faw1t1-5:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #2788 (PR 6 of the stack, on top of #2863); executes the selector decision along the #692 scheme — the survey's most recent point of near-consensus (szhorvat/ntamas/maelle/krlmlr in #692 and #853, maelle again in the #2788 thread):
verticesfor a subset,nfor a count (PR 2 of this stack),vfor a single vertex.What this does
Renames the vertex-subset selector to
verticesin 24 functions (+3 aliases that follow automatically):deprecated()sentinel):betweenness,closeness,strength,harmonic_centrality,power_centrality,alpha_centrality(wasv/vids/nodes);degree,distances(tountouched),constraint,ego,ego_size,make_ego_graph,induced_subgraph,knn;adjacent_vertices,incident_edges;local_efficiency,similarity.diversity,page_rank,transitivity....inserted):cocitation,bibcoupling,delete_vertices,isomorphism_class,count_triangles,max_degree.Single-vertex arguments deliberately keep their names per #692:
neighbors(v),incident(v),subcomponent(v),cluster_spinglass(vertex).Abbreviation guards regenerate accordingly:
v/vi/vidon thevidsfunctions andv–verteon head cases become explicit ambiguity/spell-out errors where they could mean either spelling; a barev =on former-vidsfunctions now silently partial-matchesvertices(same meaning it always had).Full test suite: 9357 passing; the only failures are the two environment-bound ones (network for
graph_from_graphdb, callr needing an installed igraph).Deliberately left for follow-up
eccentricity(vids = V(graph))— hand-rolled dots handling and a non-constant default the generator rejects; needs its real migration first.subgraph()— docs promisesubgraph_from_edges()takes over this name in the next major; renaming itsvidsnow would churn twice. (Shared Rd note: its still-livevidsformal shows the deprecated-badge text frominduced_subgraph's page.)graph.isoclass.subgraph()(undocumented legacy alias),shape_noplot()(itsvis part of the documented vertex-shape API contract).eids/es/e) — explicitly an open question in Comprehensive plan: argument renames for 3.0.0 #2788 (edgesis taken by 14 constructors, though no function carries both, soedgesis mechanically feasible).indexin the 11 attribute accessors — spans vertex and edge subsets, so it cannot follow this rename without a per-type split.distances(vertices = , to = )vs thefrom/tofamily — the naming tension flagged in Comprehensive plan: argument renames for 3.0.0 #2788 remains a separate decision.🤖 Generated with Claude Code
https://claude.ai/code/session_01RTPj4qNv2FWui6etixZeuR
Generated by Claude Code