Skip to content

Commit 3615af8

Browse files
authored
Fix CRAN results (#61)
1 parent 4cd4e64 commit 3615af8

File tree

7 files changed

+22
-8
lines changed

7 files changed

+22
-8
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: checked
22
Title: Systematically Run R CMD Checks
3-
Version: 0.2.8.9000
3+
Version: 0.2.9
44
Authors@R:
55
c(
66
person(

NEWS.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
# checked (devel)
1+
# checked (0.2.9)
22

33
* Add `igraph_subgraph_from_edges` wrapper to used work around deprecation
44
messages and alternate between `igraph::subgraph.edges` and
55
`igraph::subgraph_from_edges` depending on the `igraph` version.
6+
7+
* Address CRAN results issues
8+
9+
* In `install_packages_process` use `withCallingHandlers` instead
10+
of the `tryCatch` to prevent accidental interruptions if `install.packages()`
11+
triggers a benign warning.
612

713
# checked 0.2.8
814

R/install.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ install_packages_process <- R6::R6Class(
1919
private$callr_r_bg(
2020
function(..., escalate_warning, available_packages_filters) {
2121
options(available_packages_filters = available_packages_filters)
22-
tryCatch(
22+
withCallingHandlers(
2323
utils::install.packages(...),
2424
warning = function(w) {
2525
if (escalate_warning(w)) {

R/task_graph.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ is_package_satisfied <- function(v, lib.loc) { # nolint object_name_linter
419419
}
420420

421421
igraph_subgraph_from_edges <- function(...) {
422-
if (packageVersion("igraph") < "2.1.0") {
422+
if (utils::packageVersion("igraph") < "2.1.0") {
423423
igraph::subgraph.edges(...)
424424
} else {
425425
igraph::subgraph_from_edges(...)

man/custom_install_task_spec.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/install_task_spec.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-checks_df.R

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ path <- c(
66
file.path(examples_path, "exampleOkay"),
77
file.path(examples_path, "exampleBad")
88
)
9+
expected_revdeps <- tools::package_dependencies(
10+
"DALEXtra",
11+
db = utils::available.packages(repos = "https://cran.r-project.org/"),
12+
reverse = TRUE,
13+
which = "all"
14+
)[[1]]
915

1016
test_that("rev_dep_check_tasks_df works with deafult params", {
1117
expect_silent(
@@ -15,7 +21,7 @@ test_that("rev_dep_check_tasks_df works with deafult params", {
1521
)
1622
)
1723
expect_s3_class(df, "data.frame")
18-
expect_true(NROW(df) >= 8)
24+
expect_true(NROW(df) >= 2*length(expected_revdeps))
1925
expect_named(df, c("alias", "version", "package", "custom"))
2026

2127
expect_s3_class(df$package, "list_of_task_spec")
@@ -118,7 +124,7 @@ test_that("rev_dep_check_tasks_df development_only = TRUE", {
118124
)
119125
)
120126
expect_s3_class(df, "data.frame")
121-
expect_true(NROW(df) >= 4)
127+
expect_true(NROW(df) >= length(expected_revdeps))
122128
expect_named(df, c("alias", "version", "package", "custom"))
123129

124130
expect_s3_class(df$package, "list_of_task_spec")

0 commit comments

Comments
 (0)