Skip to content

Commit

Permalink
new minor release (updated unit tests)
Browse files Browse the repository at this point in the history
  • Loading branch information
stm committed Jan 9, 2020
1 parent 4b6a339 commit f2fb7fc
Show file tree
Hide file tree
Showing 30 changed files with 47 additions and 35 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: imagefluency
Type: Package
Title: Image Statistics Based on Processing Fluency
Version: 0.2.2
Date: 2019-12-12
Version: 0.2.3
Date: 2020-08-01
Authors@R: person(given = "Stefan", family = "Mayer", email = "[email protected]",
role = c("aut", "cre"), comment = c(ORCID = "0000-0003-0034-7090"))
Description: Get image statistics based on processing fluency theory. The
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# imagefluency

# imagefluency 0.2.3

* updated unit tests

# imagefluency 0.2.2

* under-the-hood-changes in preparation for upcoming R 4.0.0 release
Expand Down
3 changes: 1 addition & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
## Resubmission
This is a resubmission. In this version I have:

* replaced class() checks with inherits()
(in preparation for upcoming R 4.0.0 release)
* updated unit tests to fix an error with fedora/gcc

## Test environments
* local OS X install, R 3.5.1
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/articles/imagefluency.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/dot-check_input.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/dot-compl.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/dot-contr.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/dot-selfsim.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/dot-shift_axis.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/dot-sym.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/dot-sym_mirror.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/dot-typ.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/imagefluency-package.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/img_complexity.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/img_contrast.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/img_read.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/img_self_similarity.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/img_simplicity.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/img_symmetry.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/img_typicality.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/rgb2gray.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/rotate90.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/run_imagefluency.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions tests/testthat/test_complexity.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test_that("img_complexity warns if rotate is not a logical value", {

test_that("img_complexity checks whether algorithm is known", {
expect_error(img_complexity(array(0, dim = c(10, 10, 3)), algorithm = "foo"),
"Unknown image compression algorithm requested\\. Use one of the following: zip, jpg, gif, png")
"Unknown image compression algorithm requested\\. Use one of the following: zip, jpg, gif, png")

expect_error(img_complexity(array(0, dim = c(10, 10, 3)), algorithm = "zip", rotate = TRUE), NA)
expect_error(img_complexity(array(0, dim = c(10, 10, 3)), algorithm = "jpg", rotate = TRUE), NA)
Expand All @@ -34,7 +34,7 @@ test_that("img_complexity checks and handles file names as input", {
})

test_that("img_complexity normalizes input image if necessary", {
expect_equal(img_complexity(array(100:500, dim = c(50, 50, 3))), 0.1111398, tolerance = 0.001, scale = 1)
expect_equal(img_complexity(array(100:500, dim = c(50, 50, 3))), 0.1111398, tolerance = 0.01, scale = 1)
})


Expand All @@ -61,7 +61,7 @@ test_that("img_complexity works as intended (gives correct / consistent results)
# magick::image_read(img)
results <- img_complexity(img)

expect_equal(results, 0.1600421, tolerance = 0.001, scale = 1)
expect_equal(results, 0.1600421, tolerance = 0.01, scale = 1)


redChannel <- matrix(0, nrow = 300, ncol = 300)
Expand All @@ -73,7 +73,7 @@ test_that("img_complexity works as intended (gives correct / consistent results)
# magick::image_read(img)
results <- img_complexity(img)

expect_equal(results, 0.001673219, tolerance = 0.001, scale = 1)
expect_equal(results, 0.001673219, tolerance = 0.01, scale = 1)
})


Expand Down

0 comments on commit f2fb7fc

Please sign in to comment.