dash icon indicating copy to clipboard operation
dash copied to clipboard

Options to run jobs w necessary environment *and* packages

Open jefferis opened this issue 6 years ago • 2 comments

This PR makes three different actions instead of one for the addin

  • Run as Job in Background
  • Run as Job with Environment
  • Run as Job with Environment and Packages

The last one is normally what I want in order to run a snippet in the background since it also loads any attached packages. Note that Run as Job in Background would now run without the environment (which would be a change of behaviour from the current package), so they could perhaps be renamed

  • Run as Job in Background
  • Run as Job without Environment
  • Run as Job with Environment and Packages

although the first option seems clearer to me.

jefferis avatar Oct 24 '19 08:10 jefferis

Neat, thank you very kindly! I'll take this for a spin. To be honest I haven't tried {dash} with the latest RStudio versions, but I am aware they added similar support (run selection as job) recently (I'm using 1.3.322, the very latest daily is 1.3.536, but the latest official release is 1.2.5001).

Screen Shot 2019-10-24 at 9 44 15 pm

Screen Shot 2019-10-24 at 9 44 43 pm

I wrote this package when Jobs first appeared in the RStudio source (well before they were announced). The specification of running with/without environment or packages isn't as finely controlled as {dash}, though, so perhaps there's still a use-case here.

If you're not on mission-critical software I'd recommend trying out https://dailies.rstudio.com/ to see if it covers what you need.

jonocarroll avatar Oct 24 '19 11:10 jonocarroll

Thank you for your package and detailed description regarding use-cases. I notice today there is still no support launching jobs within RStudio packages attached mode. However this use-case is highly useful e.g. you could launch several time-consuming models across CPU cores without copy-paste manipulation. Would you check @jefferis two commits, please. It works fine. I also recommend to switch name of package which could be more representative for such use case.

dkibalnikov avatar Nov 18 '20 07:11 dkibalnikov