Skip to content

Commit 6bf3f70

Browse files
committed
fix for oldrelease
1 parent 98c16c6 commit 6bf3f70

File tree

7 files changed

+31
-21
lines changed

7 files changed

+31
-21
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: assertr
22
Type: Package
33
Title: Assertive Programming for R Analysis Pipelines
4-
Version: 0.4
4+
Version: 0.4.1
55
Authors@R: person("Tony", "Fischetti", email="tony.fischetti@gmail.com",
66
role = c("aut", "cre"))
77
Maintainer: Tony Fischetti <tony.fischetti@gmail.com>

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# assertr 0.4.1
2+
3+
* fixed automated tests to success with R 3.0.3
4+
15
# assertr 0.4
26

37
* added `insist` and `within_n_sds` functions and updated vignette and documentations

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ data errors are spotted early and can be addressed quickly.
1212

1313
### Installation
1414

15+
You can install the latest version on CRAN like this
16+
17+
install.packages("assertr")
18+
19+
or you can install the bleeding-edge development version like this:
20+
1521
install.packages("devtools")
1622
devtools::install_github("tonyfischetti/assertr")
1723

18-
I also plan to make this package available on CRAN, too, in the
19-
near future.
20-
2124
### What does it look like?
2225
This package offers two assertion functions, `assert` and `verify`, that
2326
are designed to be used shortly after data-loading in a dplyr/magrittr

cran-comments.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88
There were no ERRORs, WARNINGs or NOTEs
99
when checked locally with --no-manual
1010

11-
This is my first package and this is a resubmission of this package.
12-
I changed the title of the package to proper title case, as was requested.
13-
Additionally, there was a NOTE that I didnt see because of NEWS.md so I
14-
changed it to NEWS and I checked it and I got NO NOTES, ERRORS, or WARNINGS.
11+
I got an email from Uwe.Ligges@R-project.org saying that assertr v0.4
12+
(which was just accepted into CRAN a few days ago) failed with the
13+
oldrelease (3.0.3). I was told to either fix or declare a proper version
14+
dependency.
1515

16+
I fixed it, slightly incremented the version number and I am submitting it
17+
here. This is the proper thing to do, right? Please excuse my ignorance, as
18+
this is my first package.

inst/doc/assertr.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<meta name="author" content="Tony Fischetti" />
1212

13-
<meta name="date" content="2015-03-21" />
13+
<meta name="date" content="2015-03-23" />
1414

1515
<title>Assertive R Programming with assertr</title>
1616

@@ -54,7 +54,7 @@
5454
<div id="header">
5555
<h1 class="title">Assertive R Programming with assertr</h1>
5656
<h4 class="author"><em>Tony Fischetti</em></h4>
57-
<h4 class="date"><em>2015-03-21</em></h4>
57+
<h4 class="date"><em>2015-03-23</em></h4>
5858
</div>
5959

6060

tests/testthat/test-assertions.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ test_that("assert raises error if verification fails", {
8484

8585
test_that("assert breaks appropriately", {
8686
expect_error(assert(in_set(0,1), mtcars$vs),
87-
"no applicable method for 'select_' applied to an object of class \"function\"")
87+
"no applicable method for 'select.?' applied to an object of class \"function\"")
8888
expect_error(assert("tree"),
89-
"no applicable method for 'select_' applied to an object of class \"character\"")
89+
"no applicable method for 'select.?' applied to an object of class \"character\"")
9090
})
9191
######################################
9292

@@ -111,9 +111,9 @@ test_that("insist raises error if verification fails", {
111111

112112
test_that("insist breaks appropriately", {
113113
expect_error(insist(within_n_sds(5), mtcars$vs),
114-
"no applicable method for 'select_' applied to an object of class \"function\"")
114+
"no applicable method for 'select.?' applied to an object of class \"function\"")
115115
expect_error(insist("tree"),
116-
"no applicable method for 'select_' applied to an object of class \"character\"")
116+
"no applicable method for 'select.?' applied to an object of class \"character\"")
117117
expect_error(insist(iris, within_n_sds(5), Petal.Width:Species),
118118
"argument must be a numeric vector")
119119
})

tests/testthat/test-predicates.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ test_that("not_na errors out when appropriate", {
3131
expect_error(not_na(c()),
3232
"not_na must be called with single element")
3333
expect_error(not_na(),
34-
"argument \"x\" is missing, with no default")
34+
".x. is missing")
3535
})
3636
######################################
3737

3838

3939
########### within_bounds ###########
4040
test_that("within_bounds fails appropriately", {
4141
expect_error(within_bounds(),
42-
"argument \"lower.bound\" is missing, with no default")
42+
".lower.bound. is missing")
4343
expect_error(within_bounds(1, "tree"), "bounds must be numeric")
4444
expect_error(within_bounds(2, 1),
4545
"lower bound must be strictly lower than upper bound")
@@ -65,7 +65,7 @@ test_that("returned predicate works appropriately", {
6565

6666
test_that("returned predicate fails appropriately", {
6767
expect_error(within_bounds(0,1)(),
68-
"argument \"x\" is missing, with no default")
68+
".x. is missing")
6969
expect_error(within_bounds(0,1)("tree"),
7070
"bounds must only be checked on numerics")
7171
expect_error(within_bounds(0,1)(c(1,2)),
@@ -100,12 +100,12 @@ test_that("first inner function fails appropriately", {
100100
expect_error(within_n_sds(c(1,2)),
101101
"'n' must be a positive number")
102102
expect_error(within_n_sds(),
103-
"argument \"n\" is missing, with no default")
103+
".n. is missing")
104104
})
105105

106106
test_that("second inner function fails appropriately", {
107107
expect_error(within_n_sds(1)(),
108-
"argument \"a.vector\" is missing, with no default")
108+
"argument .a.vector. is missing")
109109
expect_error(within_n_sds(1)(1),
110110
"standard deviations of vector is NA")
111111
expect_error(within_n_sds(1)(c("johnny", "marr")),
@@ -120,7 +120,7 @@ test_that("in_set fails appropriately", {
120120
expect_error(in_set(),
121121
"can not test for membership in empty set")
122122
expect_error(in_set(,allow.na=FALSE),
123-
"argument is missing, with no default")
123+
"argument is missing")
124124
})
125125

126126
test_that("returned predicate works appropriately", {
@@ -137,7 +137,7 @@ test_that("returned predicate works appropriately", {
137137

138138
test_that("returned predicate fails appropriately", {
139139
expect_error(in_set(0,1)(),
140-
"argument \"x\" is missing, with no default")
140+
".x. is missing")
141141
expect_error(in_set(0,1)(c(1,2)),
142142
"bounds must be checked on a single element")
143143
expect_error(in_set(0,1)(c()),

0 commit comments

Comments
 (0)