LudvigOlsen / groupdata2

R-package: Methods for dividing data into groups. Create balanced partitions and cross-validation folds. Perform time series windowing and general grouping and splitting of data. Balance existing groups with up- and downsampling or collapse them to fewer groups.
Other
27 stars 3 forks source link

Package failing with devel version of checkmate #8

Closed mllg closed 4 years ago

mllg commented 4 years ago

I'm preparing a new release of checkmate, and some minor changes in checkmate are causing your unit tests to break. AFAICT, tests fail because some error message have slightly changed:

  ── 1. Failure: fuzz testing input checks for differs_from_previous() (@test_diff
  `xpectr::strip_msg(...)` threw an error with unexpected message.
  Expected match: "Assertion failed One of the following must apply checkmatecheckstringhandlena Must be of type string not factor checkmatechecknumberhandlena Must be of type number not factor"
  Actual message: "Assertion on handlena failed One of the following must apply checkmatecheckstringhandlena Must be of type string not factor checkmatechecknumberhandlena Must be of type number not factor"
  Backtrace:
   1. testthat::expect_error(...)
   6. xpectr::strip_msg(...)
   7. xpectr::stop_if(...)

  ── 2. Failure: fuzz testing input checks for differs_from_previous() (@test_diff
  `xpectr::strip_msg(...)` threw an error with unexpected message.
  Expected match: "Assertion failed One of the following must apply checkmatecheckstringhandlena Must be of type string not NULL checkmatechecknumberhandlena Must be of type number not NULL"
  Actual message: "Assertion on handlena failed One of the following must apply checkmatecheckstringhandlena Must be of type string not NULL checkmatechecknumberhandlena Must be of type number not NULL"
  Backtrace:
   1. testthat::expect_error(...)
   6. xpectr::strip_msg(...)
   7. xpectr::stop_if(...)

  ── 3. Failure: find_missing_starts() find the right missing starts (@test_find_m
  `xpectr::strip_msg(...)` threw an error with unexpected message.
  Expected match: "Assertion failed One of the following must apply checkmatechecknumericn Must be of type numeric not dataframe checkmatecheckcharactern Must be of type character not dataframe checkmatechecklistn Must be of type list not dataframe"
  Actual message: "Assertion on n failed One of the following must apply checkmatechecknumericn Must be of type numeric not dataframe checkmatecheckcharactern Must be of type character not dataframe checkmatechecklistn Must be of type list not dataframe"
  Backtrace:
   1. testthat::expect_error(...)
   6. xpectr::strip_msg(...)
   7. xpectr::stop_if(...)

  ── 4. Failure: fuzz testing input checks for l_starts method in group_factor() (
  `xpectr::strip_msg(...)` threw an error with unexpected message.
  Expected match: "Assertion failed One of the following must apply checkmatecheckstringstartscol May not be NA checkmatecheckcountstartscol May not be NA"
  Actual message: "Assertion on startscol failed One of the following must apply checkmatecheckstringstartscol May not be NA checkmatecheckcountstartscol May not be NA"
  Backtrace:
   1. testthat::expect_error(...)
   6. xpectr::strip_msg(...)
   7. xpectr::stop_if(...)

  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 1378 | SKIPPED: 4 | WARNINGS: 0 | FAILED: 4 ]
  1. Failure: fuzz testing input checks for differs_from_previous() (@test_differs_from_previous.R#640) 
  2. Failure: fuzz testing input checks for differs_from_previous() (@test_differs_from_previous.R#652) 
  3. Failure: find_missing_starts() find the right missing starts (@test_find_missing_starts.R#217) 
  4. Failure: fuzz testing input checks for l_starts method in group_factor() (@test_group_factor.R#1974) 

  Error: testthat unit tests failed
  Execution halted

Can you relax the tests so that the current devel version of checkmate passes your tests again?

LudvigOlsen commented 4 years ago

Hi Michel,

Thanks for a really useful package!

When do you plan to release it? I'm planning on a longer-term solution to testing error messages from different versions of packages, etc. That would require me to update xpectr as well on CRAN though, so perhaps it's better to just disable those tests temporarily. Depends on your deadline.

LudvigOlsen commented 4 years ago

@mllg I've just submitted to CRAN without those tests, so hopefully it will be updated soon. I'll enable the tests again at a later point with the new checkmate version.

mllg commented 4 years ago

Great! Thank you!