Closed hedsnz closed 3 years ago
a few remarks
@jwijffels I've added some documentation to the README, and set the default argument of the function call. In terms of the app failing if the path doesn't exist -- a warning will be printed to the console based on the input observer, in the same way as previously. I also added an extra stop
check that triggers if the path doesn't exist; that will close the app (in the same way as the check for file.copy
a few lines below).
To be clear, I haven't modified any of the underlying functions, I've only changed cron_rstudioaddin
. Everything appears to be working correctly through the addin, so the updated RscriptRepository
appears to be passing through to the underlying functions without any issue. But there are virtually no tests and I'm not really familiar enough with the package to know where to start with that. I'm happy to have a closer look over the next couple of weeks and try to come up with something if you'd like.
I think you need to check whether the user has write access rights to that CRON_LIVE folder as well.
I think that is covered by the existing code?
https://github.com/heds1/cronR/blob/rscript-path-patch/R/cron_rstudioaddin.R#L185
Maybe you can issue a warning at the start of the launch of the app if the user does not have write access to the CRON_LIVE folder.
How does that look? We test for write permissions as well as existence of the path, every one second after input$rscript_repository changes.
The other thing I realized is that I've changed the README.md file directly, but it looks like that's just the output of the cronR.Rmd vignette. Would it be better for me to make those changes to the vignette, and copy the output over to the README? Happy to do this and squash all the commits into a single commit for a new PR if that's helpful.
Was on holiday. That looks ok, only that this increases the version of shiny to a >= 1.0.0 which is needed to use debounce. I personally have a lot of servers where I don't want to upgrade shiny and all of it's dependencies for this debounce feature.
If no
RscriptRepository
path is provided tocron_rstudioaddin
, the environment variableCRON_LIVE
will be tried. If that's not set, it defaults to the current working directory. Removes previous process of writing to the package's extdata folder.