ropensci-review-tools / autotest

Automatic testing of R packages
https://docs.ropensci.org/autotest
54 stars 5 forks source link

autotest_package() returns NULL #63

Closed joelnitta closed 4 months ago

joelnitta commented 3 years ago

I am trying to use autotest_package() on my in-development package, but I'm not getting any results:

remotes::install_github("joelnitta/canaper")
#> Using github PAT from envvar GITHUB_PAT
#> Downloading GitHub repo joelnitta/canaper@HEAD
#> 
#>      checking for file ‘/private/var/folders/gp/h66562zx3ps986y5z2jzrc0h0000gn/T/RtmprHuX7f/remotes83546b3eeab9/joelnitta-canaper-f5e5f53/DESCRIPTION’ ...  ✓  checking for file ‘/private/var/folders/gp/h66562zx3ps986y5z2jzrc0h0000gn/T/RtmprHuX7f/remotes83546b3eeab9/joelnitta-canaper-f5e5f53/DESCRIPTION’
#>   ─  preparing ‘canaper’:
#>      checking DESCRIPTION meta-information ...  ✓  checking DESCRIPTION meta-information
#>   ─  installing the package to process help pages
#>   ─  saving partial Rd database (1.6s)
#>   ─  checking for LF line-endings in source and make files and shell scripts
#>   ─  checking for empty or unneeded directories
#>   ─  building ‘canaper_0.0.0.9000.tar.gz’
#>      
#> 
autotest::autotest_package("canaper")
#> 
#> ── autotesting canaper ──
#> 
#> NULL

Created on 2021-10-20 by the reprex package (v2.0.0)

Session info ``` r sessioninfo::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.1.1 (2021-08-10) #> os macOS Catalina 10.15.7 #> system x86_64, darwin17.0 #> ui X11 #> language (EN) #> collate en_US.UTF-8 #> ctype en_US.UTF-8 #> tz Asia/Tokyo #> date 2021-10-20 #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date lib #> ape * 5.5 2021-04-25 [1] #> assertthat 0.2.1 2019-03-21 [1] #> autotest 0.0.2.167 2021-10-20 [1] #> backports 1.2.1 2020-12-09 [1] #> cachem 1.0.6 2021-08-19 [1] #> callr 3.7.0 2021-04-20 [1] #> canaper * 0.0.0.9000 2021-10-20 [1] #> cli 3.0.1 2021-07-17 [1] #> cluster 2.1.2 2021-04-17 [1] #> crayon 1.4.1 2021-02-08 [1] #> curl 4.3.2 2021-06-23 [1] #> digest 0.6.28 2021-09-23 [1] #> ellipsis 0.3.2 2021-04-29 [1] #> evaluate 0.14 2019-05-28 [1] #> fansi 0.5.0 2021-05-25 [1] #> fastmap 1.1.0 2021-01-25 [1] #> fs 1.5.0 2020-07-31 [1] #> glue 1.4.2 2020-08-27 [1] #> highr 0.9 2021-04-16 [1] #> htmltools 0.5.2 2021-08-25 [1] #> knitr 1.36 2021-09-29 [1] #> lattice * 0.20-44 2021-05-02 [1] #> lifecycle 1.0.1 2021-09-24 [1] #> magrittr 2.0.1 2020-11-17 [1] #> MASS 7.3-54 2021-05-03 [1] #> Matrix 1.3-4 2021-06-01 [1] #> memoise 2.0.0 2021-01-26 [1] #> mgcv 1.8-36 2021-06-01 [1] #> nlme * 3.1-152 2021-02-04 [1] #> permute * 0.9-5 2019-03-12 [1] #> picante * 1.8.2 2020-06-10 [1] #> pillar 1.6.4 2021-10-18 [1] #> pkgbuild 1.2.0 2020-12-15 [1] #> pkgconfig 2.0.3 2019-09-22 [1] #> prettyunits 1.1.1 2020-01-24 [1] #> processx 3.5.2 2021-04-30 [1] #> ps 1.6.0 2021-02-28 [1] #> purrr 0.3.4 2020-04-17 [1] #> R.cache 0.15.0 2021-04-30 [1] #> R.methodsS3 1.8.1 2020-08-26 [1] #> R.oo 1.24.0 2020-08-26 [1] #> R.utils 2.10.1 2020-08-26 [1] #> R6 2.5.1 2021-08-19 [1] #> Rcpp 1.0.7 2021-07-07 [1] #> remotes 2.4.1 2021-09-29 [1] #> reprex 2.0.0 2021-04-02 [1] #> rlang 0.4.12 2021-10-18 [1] #> rmarkdown 2.11 2021-09-14 [1] #> rprojroot 2.0.2 2020-11-15 [1] #> rstudioapi 0.13 2020-11-12 [1] #> sessioninfo 1.1.1 2018-11-05 [1] #> stringi 1.7.5 2021-10-04 [1] #> stringr 1.4.0 2019-02-10 [1] #> styler 1.6.2 2021-09-23 [1] #> tibble 3.1.5 2021-09-30 [1] #> utf8 1.2.2 2021-07-24 [1] #> vctrs 0.3.8 2021-04-29 [1] #> vegan * 2.5-7 2020-11-28 [1] #> withr 2.4.2 2021-04-18 [1] #> xfun 0.27 2021-10-18 [1] #> yaml 2.2.1 2020-02-01 [1] #> source #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> Github (ropensci-review-tools/autotest@75e43c4) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> Github (joelnitta/canaper@f5e5f53) #> CRAN (R 4.1.0) #> CRAN (R 4.1.1) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.1) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.1) #> CRAN (R 4.1.1) #> CRAN (R 4.1.0) #> CRAN (R 4.1.1) #> CRAN (R 4.1.1) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> CRAN (R 4.1.0) #> #> [1] /Library/Frameworks/R.framework/Versions/4.1/Resources/library ```
mpadge commented 3 years ago

Congratulations @joelnitta, that is indeed exactly what the package is supposed to do when your package is in perfect working order, as explained at the end of this README section. NULL means all tests pass and behaved exactly as expected. Feel free to close, or even to submit a pull request with modified README text if you think it could be explained more clearly. Thanks!

joelnitta commented 3 years ago

Whoops, my bad for not reading the README thoroughly!

Though I think the behavior could perhaps be improved if it issued a message to the effect of "All tests passed" instead of NULL. There would be no doubt then... even for users who didn't read the README carefully enough 😅

What about a message like those issued by successful tests in testthat? (the random happy emoji is optional but welcome 😁)

mpadge commented 3 years ago

Great idea - I'll leave this issue open to implement it, or as said feel free to submit pull request. Thanks!

schneiderpy commented 2 years ago

Is it ok if the result is literally "nothing" (empty line) .. ? In my case the result does not return NULL , however the var in the environment in RStudio indicates NULL , and the datatable output is empty. I assume the package is in "perfect working order" :), but I just want to be sure before going ahead (with ssr package) .. By the way, I do agree with @joelnitta that a message like "All tests passed" would be more informative and unambiguous

mpadge commented 2 years ago

Thanks @schneiderpy. More work on autotest to come very soon, including addressing this issue. I don't know what you mean by "nothing" (some aspect of your RStudio configuration, i guess), but you shouldn't worry. The function always returns NULL when all checks are passed.