Skip to content

Commit

Permalink
CRAN RC see 0.7.4 (#252)
Browse files Browse the repository at this point in the history
* CRAN RC see 0.7.4

* fewer conditionals in tests

easystats/easystats#310

* Update DESCRIPTION
  • Loading branch information
IndrajeetPatil authored Nov 26, 2022
1 parent fa0cd8a commit bf78158
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 41 deletions.
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: see
Title: Model Visualisation Toolbox for 'easystats' and 'ggplot2'
Version: 0.7.3.6
Version: 0.7.4
Authors@R:
c(person(given = "Daniel",
family = "Lüdecke",
Expand Down Expand Up @@ -103,7 +103,7 @@ Suggests:
rstanarm,
scales (>= 1.2.0),
splines,
testthat (>= 3.1.0),
testthat (>= 3.1.5),
tidygraph,
vdiffr
Encoding: UTF-8
Expand All @@ -115,4 +115,3 @@ Config/Needs/website:
rstudio/bslib,
r-lib/pkgdown,
easystats/easystatstemplate
Remotes: easystats/parameters, easystats/performance
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# see (development version)
# see 0.7.4

## Changes

Expand Down
17 changes: 8 additions & 9 deletions tests/testthat/test-plot.check_distribution.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# test_that("`plot.see_check_distribution()` works", {
# if (requiet("randomForest")) {
# library(performance)
# m <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars)
# result <- check_distribution(m)
#
# expect_s3_class(plot(result), "gg")
# }
# })
test_that("`plot.see_check_distribution()` works", {
requiet("randomForest")
library(performance)
m <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars)
result <- check_distribution(m)

expect_s3_class(plot(result), "gg")
})
9 changes: 4 additions & 5 deletions tests/testthat/test-plot.equivalence_test.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
test_that("`plot.see_equivalence_test()` works", {
if (requiet("ggridges")) {
m <- aov(mpg ~ factor(am) * factor(cyl), data = mtcars)
result <- eta_squared(m)
expect_s3_class(plot(result), "gg")
}
requiet("ggridges")
m <- aov(mpg ~ factor(am) * factor(cyl), data = mtcars)
result <- eta_squared(m)
expect_s3_class(plot(result), "gg")
})
17 changes: 8 additions & 9 deletions tests/testthat/test-plot.performance_pp_check.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# test_that("`print.see_performance_pp_check()` works", {
# if (requiet("performance")) {
# model <- lm(Sepal.Length ~ Species * Petal.Width + Petal.Length,
# data = iris
# )
#
# expect_s3_class(plot(check_posterior_predictions(model)), "gg")
# }
# })
test_that("`print.see_performance_pp_check()` works", {
requiet("performance")
model <- lm(Sepal.Length ~ Species * Petal.Width + Petal.Length,
data = iris
)

expect_s3_class(plot(check_posterior_predictions(model)), "gg")
})
26 changes: 12 additions & 14 deletions tests/testthat/test-plot.performance_roc.R
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
test_that("`plot.see_performance_roc()` works", {
if (packageVersion("performance") > "0.7.0") {
library(performance)
set.seed(123)
iris$y <- rbinom(nrow(iris), size = 1, 0.3)
folds <- sample(nrow(iris), size = nrow(iris) / 8, replace = FALSE)
test_data <- iris[folds, ]
train_data <- iris[-folds, ]
model <- glm(y ~ Sepal.Length + Sepal.Width,
data = train_data,
family = "binomial"
)
result <- performance_roc(model, new_data = test_data)
library(performance)
set.seed(123)
iris$y <- rbinom(nrow(iris), size = 1, 0.3)
folds <- sample(nrow(iris), size = nrow(iris) / 8, replace = FALSE)
test_data <- iris[folds, ]
train_data <- iris[-folds, ]
model <- glm(y ~ Sepal.Length + Sepal.Width,
data = train_data,
family = "binomial"
)
result <- performance_roc(model, new_data = test_data)

expect_s3_class(plot(result), "gg")
}
expect_s3_class(plot(result), "gg")
})

0 comments on commit bf78158

Please sign in to comment.