From 6bf3f70e0572d8bce659ee3b0de29824b1ce3882 Mon Sep 17 00:00:00 2001 From: Tony Fischetti Date: Mon, 23 Mar 2015 23:11:08 -0400 Subject: [PATCH] fix for oldrelease --- DESCRIPTION | 2 +- NEWS | 4 ++++ README.md | 9 ++++++--- cran-comments.md | 11 +++++++---- inst/doc/assertr.html | 4 ++-- tests/testthat/test-assertions.R | 8 ++++---- tests/testthat/test-predicates.R | 14 +++++++------- 7 files changed, 31 insertions(+), 21 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index b2c02c8..4e9369c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: assertr Type: Package Title: Assertive Programming for R Analysis Pipelines -Version: 0.4 +Version: 0.4.1 Authors@R: person("Tony", "Fischetti", email="tony.fischetti@gmail.com", role = c("aut", "cre")) Maintainer: Tony Fischetti diff --git a/NEWS b/NEWS index 283fe15..6cd09f6 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +# assertr 0.4.1 + +* fixed automated tests to success with R 3.0.3 + # assertr 0.4 * added `insist` and `within_n_sds` functions and updated vignette and documentations diff --git a/README.md b/README.md index 3e3c3d6..b7c8d60 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,15 @@ data errors are spotted early and can be addressed quickly. ### Installation +You can install the latest version on CRAN like this + + install.packages("assertr") + +or you can install the bleeding-edge development version like this: + install.packages("devtools") devtools::install_github("tonyfischetti/assertr") -I also plan to make this package available on CRAN, too, in the -near future. - ### What does it look like? This package offers two assertion functions, `assert` and `verify`, that are designed to be used shortly after data-loading in a dplyr/magrittr diff --git a/cran-comments.md b/cran-comments.md index 84579dd..8bb9ed9 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -8,8 +8,11 @@ There were no ERRORs, WARNINGs or NOTEs when checked locally with --no-manual -This is my first package and this is a resubmission of this package. -I changed the title of the package to proper title case, as was requested. -Additionally, there was a NOTE that I didnt see because of NEWS.md so I -changed it to NEWS and I checked it and I got NO NOTES, ERRORS, or WARNINGS. +I got an email from Uwe.Ligges@R-project.org saying that assertr v0.4 +(which was just accepted into CRAN a few days ago) failed with the +oldrelease (3.0.3). I was told to either fix or declare a proper version +dependency. +I fixed it, slightly incremented the version number and I am submitting it +here. This is the proper thing to do, right? Please excuse my ignorance, as +this is my first package. diff --git a/inst/doc/assertr.html b/inst/doc/assertr.html index c310f73..e232a86 100644 --- a/inst/doc/assertr.html +++ b/inst/doc/assertr.html @@ -10,7 +10,7 @@ - + Assertive R Programming with assertr @@ -54,7 +54,7 @@ diff --git a/tests/testthat/test-assertions.R b/tests/testthat/test-assertions.R index c3da61a..fea8567 100644 --- a/tests/testthat/test-assertions.R +++ b/tests/testthat/test-assertions.R @@ -84,9 +84,9 @@ test_that("assert raises error if verification fails", { test_that("assert breaks appropriately", { expect_error(assert(in_set(0,1), mtcars$vs), - "no applicable method for 'select_' applied to an object of class \"function\"") + "no applicable method for 'select.?' applied to an object of class \"function\"") expect_error(assert("tree"), - "no applicable method for 'select_' applied to an object of class \"character\"") + "no applicable method for 'select.?' applied to an object of class \"character\"") }) ###################################### @@ -111,9 +111,9 @@ test_that("insist raises error if verification fails", { test_that("insist breaks appropriately", { expect_error(insist(within_n_sds(5), mtcars$vs), - "no applicable method for 'select_' applied to an object of class \"function\"") + "no applicable method for 'select.?' applied to an object of class \"function\"") expect_error(insist("tree"), - "no applicable method for 'select_' applied to an object of class \"character\"") + "no applicable method for 'select.?' applied to an object of class \"character\"") expect_error(insist(iris, within_n_sds(5), Petal.Width:Species), "argument must be a numeric vector") }) diff --git a/tests/testthat/test-predicates.R b/tests/testthat/test-predicates.R index 902ff68..bedf274 100644 --- a/tests/testthat/test-predicates.R +++ b/tests/testthat/test-predicates.R @@ -31,7 +31,7 @@ test_that("not_na errors out when appropriate", { expect_error(not_na(c()), "not_na must be called with single element") expect_error(not_na(), - "argument \"x\" is missing, with no default") + ".x. is missing") }) ###################################### @@ -39,7 +39,7 @@ test_that("not_na errors out when appropriate", { ########### within_bounds ########### test_that("within_bounds fails appropriately", { expect_error(within_bounds(), - "argument \"lower.bound\" is missing, with no default") + ".lower.bound. is missing") expect_error(within_bounds(1, "tree"), "bounds must be numeric") expect_error(within_bounds(2, 1), "lower bound must be strictly lower than upper bound") @@ -65,7 +65,7 @@ test_that("returned predicate works appropriately", { test_that("returned predicate fails appropriately", { expect_error(within_bounds(0,1)(), - "argument \"x\" is missing, with no default") + ".x. is missing") expect_error(within_bounds(0,1)("tree"), "bounds must only be checked on numerics") expect_error(within_bounds(0,1)(c(1,2)), @@ -100,12 +100,12 @@ test_that("first inner function fails appropriately", { expect_error(within_n_sds(c(1,2)), "'n' must be a positive number") expect_error(within_n_sds(), - "argument \"n\" is missing, with no default") + ".n. is missing") }) test_that("second inner function fails appropriately", { expect_error(within_n_sds(1)(), - "argument \"a.vector\" is missing, with no default") + "argument .a.vector. is missing") expect_error(within_n_sds(1)(1), "standard deviations of vector is NA") expect_error(within_n_sds(1)(c("johnny", "marr")), @@ -120,7 +120,7 @@ test_that("in_set fails appropriately", { expect_error(in_set(), "can not test for membership in empty set") expect_error(in_set(,allow.na=FALSE), - "argument is missing, with no default") + "argument is missing") }) test_that("returned predicate works appropriately", { @@ -137,7 +137,7 @@ test_that("returned predicate works appropriately", { test_that("returned predicate fails appropriately", { expect_error(in_set(0,1)(), - "argument \"x\" is missing, with no default") + ".x. is missing") expect_error(in_set(0,1)(c(1,2)), "bounds must be checked on a single element") expect_error(in_set(0,1)(c()),