refactor: snake_case attr-comb options & arguments, soft-deprecate dotted names - #2742
refactor: snake_case attr-comb options & arguments, soft-deprecate dotted names#2742schochastics wants to merge 3 commits into
Conversation
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 1453158 is merged into feat-attrib_comb:
|
1453158 to
2f878f3
Compare
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 2f878f3 is merged into main:
|
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if ba22989 is merged into main:
|
…tted names Rename the attribute-combination options and arguments to snake_case: `edge.attr.comb` -> `edge_attr_combine` and `vertex.attr.comb` -> `vertex_attr_combine`, both as igraph options and as arguments to `simplify()`, `as_undirected()`, and `contract()`. The dotted argument names keep working behind `...` under a single soft-deprecation, via generated ARG_HANDLE blocks driven by the new tools/migrations/attr-comb.R registry file. Dotted option names are soft-deprecated with a warning shim. Also point the stale schema references in sibling registry files and helper comments at tools/migrations/README.md, where the schema documentation lives since the registry was split into per-topic files. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
ba22989 to
c5de7bb
Compare
Resolve the R/par.R conflict by keeping main's migrated igraph_opt(x, ..., default = NULL) signature and generated ARG_HANDLE block, followed by this branch's dotted-name aliasing (igraph_normalize_par_name()). Declare the compose() dotted -> snake_case argument rename in tools/migrations/operators.R so the regenerated block recovers graph.attr.comb/vertex.attr.comb/edge.attr.comb into the new *_combine arguments; regenerated with tools/generate-migrations.R (idempotent on the second run) and formatted with air. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if c3cf816 is merged into main:
|
krlmlr
left a comment
There was a problem hiding this comment.
Thanks! Almost good to merge. The one snapshot flagged could be just a symptom of a pattern across the codebase.
| Calling `as_undirected()` with positional or abbreviated arguments was deprecated in igraph 3.0.0. | ||
| i Detected call: as_undirected(graph, mode, edge.attr.comb) | ||
| i Use instead: as_undirected(graph, mode, edge_attr_combine = ) |
There was a problem hiding this comment.
This doesn't look quite right, is this our code that triggers this deprecation message?
Split out from #2676 per review feedback ("I'd like to review the par code in a separate PR"). #2676 kept the original dotted option/argument names; this PR carries the naming refactor on its own so it can be reviewed in isolation.
What this does
vertex.attr.comb→vertex_attr_combine,edge.attr.comb→edge_attr_combine, and the newgraph.attr.comb→graph_attr_combine. Reading/setting the old dotted keys still works via back-compatible aliasing inigraph_opt()/igraph_options(), emitting a singlelifecycle::deprecate_soft()warning (R/par.R).simplify(),as_undirected()andcontract()gain snake_caseedge_attr_combine/vertex_attr_combinearguments via the argument-migration infrastructure (registry entries intools/migrations/attr-comb.R, spliced byRscript tools/generate-migrations.R; schema intools/migrations/README.md); the dotted names keep working and soft-deprecate.union()/intersection()/compose()/disjoint_union()use the snake_case*_combineargument names.types-RR.yaml), regenerated*_impldefaults, and the affected tests/snapshots.tools/migrations.Rschema references in sibling registry files and helper comments attools/migrations/README.md, where the schema documentation lives since the registry split (refactor(migrations): split the registry into per-topic files #2779).Base branch
#2676 has merged, so this PR is based on
mainand rebased into a single commit on top of it; the attr-comb migration entries live in their own registry filetools/migrations/attr-comb.Rso that the open per-topic migration PRs can append toconversion.R,community.R, etc. without conflicting here.