Conversation
| } | ||
| if (is.null(get_es_graph(x))) { | ||
| stop("Graph is unknown.") | ||
| cli::cli_abort("Can't find graph.") |
There was a problem hiding this comment.
I wonder whether we could improve this.
|
Let's split this PR, the "Graph is unknown" thing is special and might become unnecessary with the new attribute handling, I hope. |
|
Sorry, but split into what? One PR with all error messages minus the one I commented on? |
|
Let's find or generate extensive tests for the intended behavior of this code. The RHS for these assignments is an object with |
Resolve the R/iterators.R conflicts by keeping main's newer error conventions (anyNA(), !all(), .internal = TRUE for the graph-unknown aborts) while preserving this branch's message improvements that its merged test snapshots assert -- notably the "Can't find \"name\" for attribute." check in `[[<-.igraph.es`, now consistent with the vs method. 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 2be846a is merged into main:
|
|
I wonder if we should just make |
|
I had added the hackathon label to #1891 😸 |
|
Can we solve #1891 as part of this PR? |
| #' @name igraph-vs-attributes | ||
| #' @export | ||
| `[[<-.igraph.vs` <- function(x, i, value) { | ||
| if (!rlang::has_name(attributes(value), "attr_name")) { |
There was a problem hiding this comment.
I asked Claude to rename name and value to attr_name and attr_value in this context because I think the double "value" added to my confusion when I first looked at this code.
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if f46e70f is merged into main:
|
Fix #1891
Part of #731