New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding and Renv template #148
Conversation
Hi @RichardJActon apologies for allowing this PR to go stale - I tried to initialize a project using the template just now and it complained that the
Any idea how this needs to be solved/circumvented? One other thing that comes to mind is that a more stable source of |
Ah yes - I think I've got a fix for the renv version issue that should be robust to future version changes, I've had that problem before. I'll see if I can get my fork cleaned up today so you can give it another look. |
Perfect thank you! |
Also, initially I thought that it would be too much to have two options for creating an R project, but after going through the motions of using this branch to make a project I think it's actually quite OK so we can merge this as is when this issue with the renv versions is cleared up. @cmdoret do you have any opinion on whether having a dedicated Renv-based project template is a reasonable thing to do? |
I'd be happy to move it over the the community contributed repo if you'd rather keep the core set templates small and think 3 different R options is a bit much with basic R, bioc & renv I can see it causing a bit if decision paralysis in a new user. Though the tooltips do provide a decent description of the differences - whatever you think is best. |
Thanks @RichardJActon this is great ! |
OK so I've changed a few things based on some improvements that I made in another project I was working on. There is now a dedicated renv_install.sh bash script which checks the Renv versions and picks the right URL for is the renv version is latest or older. It also assumes that the project is starting with an renv.lock file which is the source of truth for the R and renv versions. If renv.lock is missing or if there is a mismatch between the container R version and the R version in the lock file the build will throw and error. I think this makes sense given a key function of renv is to ensure the environment is indeed the same. (Note this renv_install.sh script depends on jq and curl which I added as apt packages) I've added the renv directory and the renv activation to the .Rprofile to streamline renv environment activation when the project is opened which I apparently forgot to do before. Some other minor changes I pulled in from my other project:
Right let me fork the community templates repo and apply these changes over there - I'd appreciate it if you could give it a test and see if it's all working as intended. |
OK a PR is open over in the community templates repo now. (see above) |
@@ -0,0 +1,26 @@ | |||
; Renku Config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 maybe you could make a generic PR just with this commit for all the templates... :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will need a tweak for the Jupyter ones for the right default_url but sure I can go trough the other templates add the generic comments and check I'm not nuking anyone else custom defaults
A new template for using the {renv} package for R package management.