ropensci-review-tools / autotest

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

Error in eval(substitute(fn)): object 'i' not found #22

Closed njtierney closed 4 years ago

njtierney commented 4 years ago

Hi there!

I've tried to recreate the output of autotest to help work with https://github.com/ropenscilabs/statistical-software-review/issues/1 in a better way - but I run into this error

library(autotest)
packageVersion("autotest")
#> [1] '0.0.1.252'
x <- autotest_package(package = "brolgar")
#> ✓ [1 / 18]: add_key_slope
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
#> ✓ [2 / 18]: add_n_obs
#> ✓ [3 / 18]: decreasing
#> ✓ [4 / 18]: increasing
#> ✓ [5 / 18]: index_regular
#> ✓ [6 / 18]: key_slope
#> ✓ [7 / 18]: keys_near
#> ✓ [8 / 18]: monotonic
#> ✓ [9 / 18]: n_obs
#> ✓ [10 / 18]: near_middle
#> ✓ [11 / 18]: near_quantile
#> ✓ [12 / 18]: nearest_lgl
#> ✓ [13 / 18]: nearest_qt_lgl
#> ✓ [14 / 18]: sample_frac_keys
#> ✓ [15 / 18]: sample_frac_keys
#> ✓ [16 / 18]: sample_n_keys
#> ✓ [17 / 18]: sample_n_keys
#> ✓ [18 / 18]: unvarying
#> Error in eval(substitute(fn)): object 'i' not found

Created on 2020-10-08 by the reprex package (v0.3.0)

Perhaps this is an error of brolgar, but just thought I'd post here in case that helps things.

mpadge commented 4 years ago

Thanks Nick! autotest is a very rapidly moving target, for which I can only apologise for dragging you in at this premature stage. It also increments version on every commit, so easy to check whether that's just a temporary glitch. All works for me with current version, 0.0.1.261.

njtierney commented 4 years ago

Thanks, @mpadge - all good!

I now get a slightly different error message - but I cannot seem to get version 0.0.1.261, only 0.0.1.260:

# install_github("ropenscilabs/autotest")
library(autotest)
packageVersion("autotest")
#> [1] '0.0.1.260'
x <- autotest_package(package = "brolgar")
#> ✓ [1 / 18]: add_key_slope
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
#> ✓ [2 / 18]: add_n_obs
#> ✓ [3 / 18]: decreasing
#> ✓ [4 / 18]: increasing
#> ✓ [5 / 18]: index_regular
#> ✓ [6 / 18]: key_slope
#> ✓ [7 / 18]: keys_near
#> ✓ [8 / 18]: monotonic
#> ✓ [9 / 18]: n_obs
#> ✓ [10 / 18]: near_middle
#> ✓ [11 / 18]: near_quantile
#> ✓ [12 / 18]: nearest_lgl
#> ✓ [13 / 18]: nearest_qt_lgl
#> ✓ [14 / 18]: sample_frac_keys
#> Error in rbind(deparse.level, ...): numbers of columns of arguments do not match

Created on 2020-10-09 by the reprex package (v0.3.0)

mpadge commented 4 years ago

aha, i can reproduce that. I was working on autotesting a local source version - the package param can also be a directory to your local location, for which the package doesn't even have to be installed. But yeah, testing the installed version triggers that error. Shall fix right now ...

mpadge commented 4 years ago

The interesting thing now are all the functions you import from tsibble and fabletools. These currently raise a heap of messages about functions having no example code. I'll open another issue here to address that, because those messages are definitely erroneous here. Thanks for helping to improve this!

njtierney commented 4 years ago

No worries, Mark! Thanks for making an awesome package! :)

On Fri, 9 Oct 2020, 19:14 mark padgham, notifications@github.com wrote:

The interesting thing now are all the functions you import from tsibble and fabletools. These currently raise a heap of messages about functions having no example code. I'll open another issue here to address that, because those messages are definitely erroneous here. Thanks for helping to improve this!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ropenscilabs/autotest/issues/22#issuecomment-706040397, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRQDJLIJS626MC7FCYKIQLSJ3A73ANCNFSM4SIUOPPQ .