refactor!: New arpack_defaults() replaces igraph.arpack.default and arpack_defaults lists#800
Conversation
|
@krlmlr how can I add this change (changing the default argument but also doing the "hack" inside the function to not break reverse dependencies) to functions of aaa-auto.R? |
|
Can you please rephrase? The checks are failing here. |
|
I have made changes in some scripts manually. For the checks to pass, I'd need to update aaa-auto.R. However I do not know how to do that not manually. I know where aaa-auto.R content comes from but
|
|
|
|
For functions that have eval_try <- rlang::eval_tidy(options)
options_value <- rlang::call_args(rlang::current_call())[["options"]]
if (is(eval_try, "function") && as.character(options_value) == "arpack_defaults") {
lifecycle::deprecate_soft(
"1.5.0",
I("arpack_defaults"),
"arpack_defaults()",
details = c("So the function arpack_defaults(), not an object called arpack_defaults.")
)
options <- arpack_defaults()
}I'll explore a bit more. |
krlmlr
left a comment
There was a problem hiding this comment.
Thanks. Some functions still seem to use igraph.arpack.default, according to check results?
| arpack <- function(func, extra = NULL, sym = FALSE, options = arpack_defaults(), | ||
| env = parent.frame(), complex = !sym) { | ||
|
|
||
| eval_try <- rlang::eval_tidy(options) |
There was a problem hiding this comment.
Why eval_tidy()? We should be able to do this with standard evaluation, forcing should be enough?
There was a problem hiding this comment.
do you have any example I could look at?
| options_value <- rlang::call_args(rlang::current_call())[["options"]] | ||
| if (is(eval_try, "function") && as.character(options_value) == "arpack_defaults") { | ||
| lifecycle::deprecate_soft( | ||
| "1.5.0", |
|
yes because I'm stuck, not knowing how to add the lines to the body of functions that are created automatically #800 (comment) (I won't get back to this this week) |
|
Oh, got you. Instead of changing the body of an autogenerated function, can we wrap it instead, as done in #859? |
|
In this PR I have updated types-RR.yaml, however running the makefile doesn't update aaa-auto.R, I am confused. @krlmlr good idea, will do. |
Are you running |
|
I ran |
|
But maybe I should use other arguments actually? Could that be documented in that README? I'd happily test the instructions. 😸 |
Current Aviator status
This PR was merged using Aviator. See the real-time status of this PR on the Aviator webapp. Use the Aviator Chrome Extension to see the status of your PR within GitHub.
|
cb782d9 to
4931c9c
Compare
|
@maelle: Can you please take a look at the failing tests? Do you need more support? |
784ba24 to
73b2501
Compare
73b2501 to
745b977
Compare
|
My problems here are
|
arpack_defaults() replaces igraph.arpack.default and arpack_defaults lists
|
thanks @krlmlr |
…arpack_defaults() as a function
Like #762
Fix #714