Skip to content
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

check what RSE Sheffield have been up to and cut ties #246

Open
MalikaIhle opened this issue Apr 5, 2024 · 9 comments
Open

check what RSE Sheffield have been up to and cut ties #246

MalikaIhle opened this issue Apr 5, 2024 · 9 comments
Assignees

Comments

@MalikaIhle
Copy link
Member

No description provided.

@MalikaIhle
Copy link
Member Author

we are ready to cut ties - the only thing we don't have that they do is renv and because participants fork and clone and interact with this but haven't learned renv I'd rather avoid it. I've now printed the session and indicated which combination of packages work (both latest of ggplot and ploty together or both older version together work)

@MalikaIhle
Copy link
Member Author

original repo also linked in read me - we are ready to cut ties

@NeuroShepherd
Copy link
Member

How would you feel about including a call to renv::embed() in the script? https://rstudio.github.io/renv/reference/embed.html

E.g. the .R or .Rmd scripts in this tutorial would have code like this at the beginning of the script:

renv::use(
  "[email protected]"
)

I think this would allow us to make sure participants are using the desired version of packages (so that nothing breaks) without having to include a full renv lockfile in this repo (and thus avoid confusing participants).

@MalikaIhle
Copy link
Member Author

that seems very nice! let me describe the situation so you can tell me yourself whether this is the perfect solution:

participants fork and clone my repo, they only create a copy of a R scrip to add parameters - there is no pacakges loaded there. then they push that and create a pull request. then they see ME run the RDM file with everyone's parameters. then they pull upstream to get everyone elses parameters. the tutorial stops here. but in principle some coupld then try and run my RDM file.

my requierement: I don't want them to have any different exeprience with their steps that are part of the tutorial. We can definitively add isntructions on how to run the RMD that only participants who want to do this extra can try it out.

Would this solution you suggest work? it seems like it - we would need to install and require renv to run the RMD right?
do we need to specify the renv version too?
Could there be at the top some code saying install these version if not installed, and require these versions?
Or saying install packages is deprecated because it seems to me that RStudio doest it almost automatically (jsut need to click on install all what is missing?)

@NeuroShepherd
Copy link
Member

Ah, if the tutorial participants are only using/editing/running an R script that uses base R functions, then I don't think it would be necessary to include the renv::use() function at all because they won't need any external packages!

I could, however, add renv::use() here https://github.com/lmu-osc/Collaborative-RStudio-GitHub/blob/main/plot_trait_evolution.Rmd#L35-L37 just because I see the comments about using specific package versions. I would also include some ifelse logic to install {renv} if someone running the .Rmd does not already have it installed.

@MalikaIhle
Copy link
Member Author

yes, we can do that for the rmd file, but again, for me I just dont want participants to have any error or pop up window when they fork and clone the repository and then push and pull upstream, e.g. telling them they need to download renv before being able to do anything. if this doesn't happen - we can add that.

@NeuroShepherd
Copy link
Member

Ok I made a draft of this, but renv::use() doesn't appear to behave with .Rmd files as I had expected. It's only indicated use right now is directly within .R scripts so we'll go with no {renv} at all right now. Good to know for the future, but sorry for the confusion!

I'll break the fork connection

@MalikaIhle
Copy link
Member Author

thanks for looking into it! I'm happy to revisit when you come accross better ways!

@NeuroShepherd
Copy link
Member

Ticket with GitHub opened. (I'm not sure this ticket will be visible to anyone but me though https://support.github.com/ticket/personal/0/2820372)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants