utoronto-2i2c / jupyterhub-deploy

Demo JupyterHub deployment for University of Toronto
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

add testthat and ottr packages #124

Closed hgibling closed 2 years ago

hgibling commented 2 years ago

needed to auto grade R notebooks with otter grader (https://otter-grader.readthedocs.io/en/latest/)

hgibling commented 2 years ago

I think the issue is with testthat, though I'm not sure why. Tested installs of versions 3.0.4 and 3.1.0 on JupyterHub:

> devtools::install_version("testthat", version = "3.0.4")
Downloading package from url: https://packagemanager.rstudio.com/all/__linux__/focal/latest/src/contrib/Archive/testthat/testthat_3.0.4.tar.gz
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

 1: All                              
 2: CRAN packages only               
 3: None                             
 4: cli     (3.0.1  -> 3.1.0 ) [CRAN]
 5: rlang   (0.4.11 -> 0.4.12) [CRAN]
 6: pillar  (1.6.3  -> 1.6.4 ) [CRAN]
 7: tibble  (3.1.4  -> 3.1.5 ) [CRAN]
 8: diffobj (0.3.4  -> 0.3.5 ) [CRAN]
 9: desc    (1.3.0  -> 1.4.0 ) [CRAN]
10: pkgload (1.2.2  -> 1.2.3 ) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 
Installing package into ‘/opt/r’
(as ‘lib’ is unspecified)
* installing *binary* package ‘testthat’ ...
* DONE (testthat)
> library(testthat)
Error: package or namespace load failed for ‘testthat’ in get(Info[i, 1], envir = env):
 lazy-load database '/opt/r/testthat/R/testthat.rdb' is corrupt
In addition: Warning message:
In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1
> devtools::install_version("testthat", version = "3.1.0")
Downloading package from url: https://packagemanager.rstudio.com/all/__linux__/focal/latest/src/contrib/testthat_3.1.0.tar.gz
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

 1: All                              
 2: CRAN packages only               
 3: None                             
 4: cli     (3.0.1  -> 3.1.0 ) [CRAN]
 5: rlang   (0.4.11 -> 0.4.12) [CRAN]
 6: pillar  (1.6.3  -> 1.6.4 ) [CRAN]
 7: tibble  (3.1.4  -> 3.1.5 ) [CRAN]
 8: diffobj (0.3.4  -> 0.3.5 ) [CRAN]
 9: desc    (1.3.0  -> 1.4.0 ) [CRAN]
10: pkgload (1.2.2  -> 1.2.3 ) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 
Installing package into ‘/opt/r’
(as ‘lib’ is unspecified)
* installing *binary* package ‘testthat’ ...
* DONE (testthat)
> library(testthat)
Error: package or namespace load failed for ‘testthat’ in get(method, envir = home):
 lazy-load database '/opt/r/testthat/R/testthat.rdb' is corrupt
In addition: Warning messages:
1: In .registerS3method(fin[i, 1], fin[i, 2], fin[i, 3], fin[i, 4],  :
  restarting interrupted promise evaluation
2: In get(method, envir = home) :
  restarting interrupted promise evaluation
3: In get(method, envir = home) : internal error -3 in R_decompress1

Install works fine with install.packages("testthat"), though. Not sure how to fix.

GeorgianaElena commented 2 years ago

@hgibling, I hope it's ok I pushed a few commits on your branch.

What I did was to:

Hopefully, this should fix the image built :crossed_fingers:

GeorgianaElena commented 2 years ago

It looks like everything it's green :tada:, so I'm going to merge this. This should deploy these changes on the staging hub so we can test them.

GeorgianaElena commented 2 years ago

@hgibling, once the CI finishes, do you want to test if everything works as expected at https://staging.utoronto.2i2c.cloud?

hgibling commented 2 years ago

Thanks @GeorgianaElena! everything looks like it works when I tested it on staging.

hgibling commented 2 years ago

For testing purposes, when should I expect to see the changes implemented in my JupyterHub instances? Edit: Sorry, I see now that #125 has not been completed yet :)

GeorgianaElena commented 2 years ago

The changes should now be available @hgibling :rocket: