containerit icon indicating copy to clipboard operation
containerit copied to clipboard

Package a session with locales

Open MatthiasHinz opened this issue 7 years ago • 1 comments

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)
})

MatthiasHinz avatar Jan 26 '17 16:01 MatthiasHinz

See also existing test boilerplate in test_sessioninfo_reproduce.R

nuest avatar May 30 '17 09:05 nuest