statist7 / LMSgrowth2

MIT License
2 stars 2 forks source link

Clean up R package #44

Closed tamuri closed 4 years ago

tamuri commented 4 years ago

This PR cleans up the R package and details several ways to run the application in the README.

Note: the install_github route won't work until this repo is made public. To test, create an OAuth key and add ref='packaged' auth_key='xyz' to the install_github command.

Output of R check 😄

── R CMD check results ───── LMSgrowth2 0.1.0 ────
Duration: 24.3s

0 errors ✓ | 0 warnings ✓ | 0 notes ✓

R CMD check succeeded
statist7 commented 4 years ago

Wow, you've been busy! And I have noted the timestamps on the commits...

You will have seen I've added the license file.

I'm working through the alternative ways of running the app. It's obviously ok in RStudio, and I have it running in shinyapps.io. But I'm having trouble with vagrant - I've downloaded it and VirtualBox, but they give an error as attached. I tried uninstalling and installing VirtualBox, but now it won't install at all. So now I'm having to run it from the applications folder. Do you have any ideas? vagrant + virtualbox error

giordano commented 4 years ago

Just a comment: yesterday I have been able to correctly use the application by following the Docker instructions. I couldn't get Vagrant working either, but I had some other misconfigurations on my system.

tamuri commented 4 years ago

Thanks for trying. I'm not sure what's happening with the Vagrant setup. I'll do some digging to check, but it's probably worth uninstalling everything and then installing VirtualBox (the version Vagrant supports: https://www.vagrantup.com/docs/virtualbox/) and then Vagrant again. I guess the Vagrant setup is not so important, we can remove it if no luck.

statist7 commented 4 years ago

I’ve tried again, uninstalling vagrant and VirtualBox. Vagrant is clear that VirtualBox should be installed first, so I did that, but it failed for unspecified reasons. So I ran it as the app. Then installing vagrant gave the same error as before, so no joy.

I’ve installed Docker/docker, but I don’t understand the syntax for the run call. You give

docker run --publish 3838:3838 -v /uploads/dir/on/host:/srv/shiny-server/LMSgrowth2/inst/uploads lmsgrowth2

but I’m unclear what to put for my ‘/uploads/dir/on/host’ - please advise.

Best wishes, Tim

tamuri commented 4 years ago

I’ve tried again, uninstalling vagrant and VirtualBox. Vagrant is clear that VirtualBox should be installed first, so I did that, but it failed for unspecified reasons. So I ran it as the app. Then installing vagrant gave the same error as before, so no joy.

OK, thanks for trying. I tried on a clean machine and it worked. It might be some incompatibility with versions of MacOS/VB (I'm just guessing). It's an "advanced" use case, I don't expect people unfamiliar with Docker or Vagrant to use either.

I’ve installed Docker/docker, but I don’t understand the syntax for the run call. You give docker run --publish 3838:3838 -v /uploads/dir/on/host:/srv/shiny-server/LMSgrowth2/inst/uploads lmsgrowth2 but I’m unclear what to put for my ‘/uploads/dir/on/host’ - please advise.

/uploads/dir/on/host is a directory on your local machine that you'd like uploaded data (i.e. users' growth references) to be saved. For example, I created one called LMSuploads and ran the command using:

docker run --publish 3838:3838 -v /Users/tamuri/LMSuploads:/srv/shiny-server/LMSgrowth2/inst/uploads

statist7 commented 4 years ago

Yes, I thought it must be something like that. But it didn’t work, saying I need give at least one argument...

Do I need to have Docker running? – it doesn’t seem to do anything, and has to be force quit afterwards.

Clearly docker and vagrant don’t like me – I’m going off them too…

tamuri commented 4 years ago

Clearly docker and vagrant don’t like me – I’m going off them too…

They are definitely an acquired taste. If you want to try again, I think you might be missing the lmsgrowth2 at the end (sorry, I it missed out in my reply to the uploads question). The full command would be (presumably you were able to run the docker build etc... command):

docker run --publish 3838:3838 -v /Users/tamuri/LMSuploads:/srv/shiny-server/LMSgrowth2/inst/uploads lmsgrowth2

statist7 commented 4 years ago

Thank you! – but that just gives another error message.

Do you have a moment to chat in teams, and I can share my terminal screen?

Best wishes, Tim

tamuri commented 4 years ago

OK, done a few rounds on this PR. The R install using devtools::install_github, Docker is working for everyone. Shinyapps.io also working. Vagrant is working for me (tried on new machine, also). I think that's a specialised use-case, hopefully only someone familiar with it would use it.