-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CI/CD tests with gctorture2(1, inhibit_release = TRUE)
#114
Comments
Current iteration, with still 50% coverage, and giving an error with tibblify(list())
spec <- spec_object(
tib_dbl("a")
)
try(tibblify(list(a = 1:2), spec = spec))
try(tibblify(list(), spec = spec))
try(tibblify(list(a = 1, a = 1), spec = spec))
try(tibblify(list(1), spec = spec))
try(tibblify(list(1, b = 1), spec = spec))
# transform
spec <- spec_object(
tib_dbl("a", transform = as.numeric)
)
tibblify(list(a = "1"), spec = spec)
# types
spec <- spec_object(
a = tib_scalar("a", hms::hms(), required = FALSE, transform = hms::hms)
)
tibblify(list(a = 1), spec = spec)
tibblify(list(), spec = spec)
try(tibblify(list(a = 1:2), spec = spec))
spec <- spec_object(
tib_lgl("a", required = FALSE)
)
tibblify(list(a = TRUE), spec = spec)
tibblify(list(), spec = spec)
spec <- spec_object(
tib_int("a", required = FALSE)
)
tibblify(list(a = 1L), spec = spec)
tibblify(list(), spec = spec)
spec <- spec_object(
tib_dbl("a", required = FALSE)
)
tibblify(list(a = 1), spec = spec)
tibblify(list(), spec = spec)
spec <- spec_object(
tib_chr("a", required = FALSE)
)
tibblify(list(a = "x"), spec = spec)
tibblify(list(), spec = spec)
spec <- spec_object(
tib_int_vec("a", required = FALSE)
)
tibblify(list(a = 1:2), spec = spec)
spec <- spec_df(
tib_int("a")
)
tibblify(list(list(a = 1L), list(a = 2L)), spec = spec)
spec <- spec_df(
tib_int("a")
)
tibblify(list(list(a = 1L), list(a = 2L)), spec = spec)
spec <- spec_df(
.names_to = "x",
tib_int("a")
)
tibblify(list(x = list(a = 1L), y = list(a = 2L)), spec = spec)
spec <- spec_df(
.names_to = "x",
tib_variant("a")
)
tibblify(list(x = list(a = 1L), y = list(a = "z")), spec = spec) |
The following gives an error after four minutes (!) with # types
spec <- spec_object(
a = tib_scalar("a", hms::hms(), required = FALSE, transform = hms::hms)
)
tibblify(list(a = 1), spec = spec) |
It seems that the most time is spent constructing and throwing the error message:
|
Would you be open to using plogr for logging the C++ code? |
...and I can confirm that #113 (comment) is indeed the cause for this particular failure. |
gctorture2(1, inhibit_release = TRUE)
The alternative - maybe easier - would be to test out a cpp11 implementation and see whether I encounter the same performance issues and if so whether we can fix them. Might be the easier route. What do you think? |
How would a cpp11 implementation help? Are you suggesting to replace all I believe a minimal test suite would also be useful in that case. |
Running the full test suite with
gctorture()
is prohibitive. I think it might be possible to devise a minimal set of tests, and in these tests to run only thetibblify()
call ingctorture()
. The following set of tests (to be stored incovr.R
) already gives 50% of coverage:I am using the following script (e.g. in
run.R
) to find the next uncovered item:This script runs in just a few seconds. Run this script, find the next uncovered line, devise code that triggers that line, rinse, repeat.
The goal would be to:
gctorture_tibblify()
in those testsskip_if_ci()
those tests, or run them in a special step on GHAFollow-up to #113.
The text was updated successfully, but these errors were encountered: