DavZim / dataverifyr

A Lightweight, Flexible, and Fast Data Validation Package that Can Handle All Sizes of Data
https://davzim.github.io/dataverifyr/
Other
26 stars 1 forks source link

test failures when checking using data.table from github master #3

Closed tdhock closed 1 year ago

tdhock commented 1 year ago

Hi @DavZim After installing data.table from github master,

data.table::update_dev_pkg()

And then running R CMD check on dataverifyr gives the following new failure, (which is not present if you use data.table from CRAN)

* checking tests ...
  Running 'testthat.R'
 ERROR
Running the tests in 'tests/testthat.R' failed.
Last 13 lines of output:
    actual[3, ]                                                                                                    
    actual[4, ]                                                                                                    
  - actual[5, ]   Object 'does_not_exist' not found amongst [mpg, cyl, disp, hp, drat, wt, qsec, vs, am, gear, ...]
  + expected[5, ] Object 'does_not_exist' not found amongst mpg, cyl, disp, hp, drat and 6 more                    

  actual$error[2:5] vs expected$error[2:5]
    ""
    ""
    ""
  - "Object 'does_not_exist' not found amongst [mpg, cyl, disp, hp, drat, wt, qsec, vs, am, gear, ...]"
  + "Object 'does_not_exist' not found amongst mpg, cyl, disp, hp, drat and 6 more"

  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 28 ]
  Error: Test failures
  Execution halted

data.table needs to ensure that updates do not break dependent packages like dataverifyr, before uploading new versions to CRAN, so can you please submit an updated version of dataverifyr to CRAN, that fixes this test failure? In particular, I would suggest to avoid testing the messages output from data.table, and instead test the data values.

DavZim commented 1 year ago

Thanks for bringing this to my attention. This is fixed with f5f2a45. Now I test for a regex that matches both the old and the new format. Hopefully this will hold, otherwise I will adapt the code further.

Unfortunately, in the specific test case, the warning of data.table is part of the returned values of dataverifyr, therefore I want to test it. Let me know if you have any better suggestions.

I will send the package to CRAN later today!

tdhock commented 1 year ago

thx