-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update deprecated function calls from other packages #260
Comments
I have conducted an analysis of the warning messages I retrieved (R: 4.1.2 on my Ubuntu VM). In total I classified 66 warnings into 7 classes:
The reason I put fixable: unsure for some warning categories is that it would be technically possible to catch the reasons for these warnings and then throw our own warnings instead but I don't think it is worth it. I will of course address the fixable ones in the PR for this issue :) Edit: update fixability |
I have had a look at all the "cannot open file" warnings. Contrary to your intuition, none of them originate from JIRA stuff. Here is a list of sources:
In summary, none of these warnings come from JIRA. None of these warnings are easily fixable using conventional approaches, as they all read from files that are just not present in the demo data. All of these tests could be fitted with |
I also had a look at all warnings across the different R versions we support and found that the warnings are consistent and do not change over versions, i.e., all R versions display the same amount of warnings with the same content. Also I have noticed, that the CI runners produce one additional warning that does not come when running it on my machine, for which the reason is, that the CI runners do not support UI and therefore Tk is not available. I think we can disregard this warning savely. |
Ok, then we are talking about non-existing files that are actually expected to be non-existing in the test. In these cases, we should keep the warnings and not try to avoid them.
No, we should not suppress any warnings there. |
Oh okay, then I just missed the point there. I will update the default then 🤓 |
I have had a look at some of the tests that fail because of the sorting of the data$issues[rownames(data$issues) %in% c(18, 24:26, 44:47), ], Therefore, all splitting tests would require thoughtful fixing when we decide to follow that route. Honestly, I think it is not tooooo much work, a couple of hours though. 😅 |
Hm, that's bad. If it would just be reordering, it should not be that a big problem. But fixing the indices is a tedious and potentially error-prone task, I certainly understand that. What would be the alternatives? Do you have any other ideas how we can circumvent this problem? But even if there are alternatives, we should not tweak the tests just to make them align with outdated and wrong design choices. In the end, the tests should mimic how our actual data processing is assumed to work in practice. So, before we take a final decision, could you please provide us with some details which/how many tests are affected? |
While working on the |
Could you please document which warnings you are talking about? I suggest to add a dedicated commit to the PR at which you are currently working and reference this issue in the commit message - then the commit is also referenced in this issue - but please avoid the words 'fix(ed)' or 'close(d)' in the commit message, to not automatically close this issue. Even after the next release of coronet, I suggest not to close this issue to keep it open for documenting future deprecation calls, as this issue will still be of ongoing relevance. |
Concretely, im talking about Okay, that sounds reasonable, I'll add the commit soon. |
Works towards se-sic#260. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Works towards se-sic#260. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Works towards se-sic#260. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Yesterday, a new igraph version has been released on CRAN. In the new release, again a number of functions has been marked as deprecated. Therefore, we should check if there are new deprecation warnings in coronet and should update the corresponding function calls. |
Yes indeed, there are new deprecation warnings. Do you want me to integrate the bump commits to the currently open PR? |
It depends. If there are only few changes, we can certainly add them to the currently open PR. If there is quite a number of changes, I would appreciate to create a new PR. |
I updated 3 freshly deprecated functions as well as 3 that were deprecated in 2.0.0 that slipped through previous efforts somehow. In total the patch includes changes to 10 files including implementation and testing files. Therefore, I might open a new PR. |
Unfortunately, somewhat about their new version breaks in our usage of Concrete error descriptionError Message: ── Error (test-networks.R:404:5): Extraction of sub-networks ───────────────────
<vctrs_error_ptype2/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
Error in `vctrs::vec_c(attr[[exattr[a]]], ea[[exattr[a]]])`: Can't combine `..1` <list> and `..2` <character>.
Backtrace:
▆
1. ├─global get.sample.network() at test-networks.R:404:5
2. │ └─net.builder$get.multi.network() at util-networks.R:2179:5
3. │ └─igraph::disjoint_union(authors.net, artifacts.net) at util-networks.R:1280:13
4. │ └─vctrs::vec_c(attr[[exattr[a]]], ea[[exattr[a]]])
5. └─vctrs (local) `<fn>`()
6. └─vctrs::vec_default_ptype2(...)
7. ├─base::withRestarts(...)
8. │ └─base (local) withOneRestart(expr, restarts[[1L]])
9. │ └─base (local) doWithOneRestart(return(expr), restart)
10. └─vctrs::stop_incompatible_type(...)
11. └─vctrs:::stop_incompatible(...)
12. └─vctrs:::stop_vctrs(...)
13. └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call) When breaking the variables are instanciated as follows: Browse[1]> attr
$date
$date[[1]]
[1] "2004-10-09 18:38:13 UTC" "2005-02-09 18:49:49 UTC"
$date[[2]]
[1] "2010-07-12 10:05:36 UTC" "2010-07-12 11:05:35 UTC"
$date[[3]]
[1] "2010-07-12 12:05:34 UTC" "2010-07-12 12:05:40 UTC"
$date[[4]]
[1] "2010-07-12 12:05:41 UTC" "2010-07-12 12:05:42 UTC"
$artifact.type
$artifact.type[[1]]
[1] "Mail" "Mail"
$artifact.type[[2]]
[1] "Mail" "Mail"
$artifact.type[[3]]
[1] "Mail" "Mail"
$artifact.type[[4]]
[1] "Mail" "Mail"
$message.id
$message.id[[1]]
[1] "<d1-thread1@example.org>" "<d2-thread1@example.org>"
$message.id[[2]]
[1] "<d1-thread2@example.org>" "<d4-thread2@example.org>"
$message.id[[3]]
[1] "<d4-thread3@example.org>" "<d3-thread3@example.org>"
$message.id[[4]]
[1] "<d4-thread4@example.org>" "<d5-thread4@example.org>"
$thread
$thread[[1]]
[1] "<thread-1>" "<thread-1>"
$thread[[2]]
[1] "<thread-2>" "<thread-2>"
$thread[[3]]
[1] "<thread-3>" "<thread-3>"
$thread[[4]]
[1] "<thread-4>" "<thread-4>"
$weight
[1] 2 2 2 2 1 1 1 1 1
$type
[1] "Unipartite" "Unipartite" "Unipartite" "Unipartite"
$relation
[1] "mail" "mail" "mail" "mail"
Browse[1]> ea
$weight
[1] 1 1 1 1 1
$artifact.type
[1] "Feature" "Feature" "Feature" "Feature" "Feature"
$type
[1] "Unipartite" "Unipartite" "Unipartite" "Unipartite" "Unipartite"
$relation
[1] "callgraph" "callgraph" "callgraph" "callgraph" "callgraph"
Browse[1]> a
[1] 2 |
Works towards se-sic#260. Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
Description
Some of the functions that we call from other packages are marked as deprecated.
Especially since
igraph
release 2.0.0,igraph
has marked many functions as deprecated. In most cases, the functions have just been renamed. To provide one example,igraph::get.edgelist(...)
has been renamed toigraph::as.edgelist(...)
.As I assume that, at some point, these functions will become defunct, we should think about renaming them.
We can use this issue to collect deprecated function calls here, if necessary.
In some rare cases, also our contribution guide could be affected by that (e.g., that we recommend/enforce deprecated function calls in our contribution guide.) Thus, we should also check our contribution guide for that when we address this issue.
The text was updated successfully, but these errors were encountered: