Thanks for taking the time to educate me on the complications - it is really informative. I agree, I think an RStudio Add-In would solve me request elegantly.
Hello everyone,
Hope I'm not late to the party. Great stuff, Max covered most of the pain points that we're trying to tackle in our corporate environment. We're working on building a CI/CD workflow for R packages (as is everyone, I guess) which, simplified would look like:
Clone a git repository -> Install dependencies -> Run tests -> Build a package -> Upload to Artifactory -> Deploy
Spent some time reading the comments and I just want to emphasize that we would really love to standardize the way we express dependencies. I like the approach of Travis CI, where dependencies are defined in the description file, and additional dependencies are defined in travis.yml. Ruby Gemfile is another example, where they have dependency groups which clearly states which dependencies are required when you're developing locally versus production requirements.
Looking forward for some feedback (or setting up a call)
glad to hear someone else is sharing (some of) these concerns @amarmesic.
I'm also still up for anything to explore this further.
As far as packages and CI / CD are concerned, I think some valuable thoughts / discussion can be had in these topics:
I think the latter makes a point about when would you clone the git repository / kick things off? Would you be looking for a Git hook that you control, or would you be looking for a service that would be watching the Git repo for tags / commits on a certain branch to trigger a build? You also might think about a timeline - maybe kick off a build / test every week even if no commits have made it to master?
Thank you @cole! We would be looking a hook that we control, in our case it's BitBucket and Jenkins. Nightly builds is something that we have adopted, making sure master stays as clean as possible.
What we (@iain and myself) are more interested at this point is npm / pip like CLI solution for R:
- you specify all your dependencies in .yaml
- run the tool and the magic happens, you don't care if devtools depends on roxygen2 or any other package but you have all your dependencies resolved
- run tests (again, they should not fail if 'testthat' is not installed)
- deploy to artifactory
I'm not sure if RStudio Package Manager is addressing these challenges (or has plans to be npm/pip for R), but it would be perfect if it does.
We'll evaluate RSPM and share some feedback soon.
Thanks,
Amar
For people who are still interested in a more streamlined CI/CD experience, the new GitHub actions may be interesting.
It's all build on docker containers, and as such allows you develop in the same container that you're also using for CI/CD.
(I guess this was technically possible with Travis as well, though not as flexible).
In my experience, this has simplified my CI/CD workflow greatly.
I've developed some custom R actions for GitHub actions, and an accompanying ghactions package:
Announcement is here: