containerit
containerit copied to clipboard
Package a session with locales
Extends #6 and #33
When reproducing an R session also match the locales. As shown in https://github.com/o2r-project/containerit/issues/33#issuecomment-274585637 locales are not reproduced yet
In Linux, the locale first has to be generated, if missing, and then configured as default or current locale. That seems not to be trivial, especially in non-interactive mode.
The R functions Sys.getlocale()
and Sys.setlocale()
may be helpful.
- [ ] A sessionInfo can be reproduced with German locales (or anything other than the default)
- [ ] Testthat file
tests/testthat/test_sessioninfo_reproduce.R
runs with test (uncomment corresponding lines):
test_that("the locales are the same ", {
expect_equal(local_sessionInfo$locale, docker_sessionInfo$locale)
})
See also existing test boilerplate in test_sessioninfo_reproduce.R