Skip to content

Conversation

@alinacherkas
Copy link
Member

Description

This request enhances the developer's experience and streamlines the contributing process by adding renv and extending the contributing guidelines.

Main Changes

  • Configure the project to use renv which isolates the developer's environment
  • Detail how to contribute to the project in contributing guidelines
  • Update .gitignore using the modern GitHub template for R projects

Checklist

  • I have performed a self-review of my code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have updated the documentation where applicable.

Additional Context

None.

@SebKrantz
Copy link
Member

SebKrantz commented Feb 26, 2025

Thanks @alinacherkas. I'm wondering though, I presume it is still possible to contribute in the classical way? If people have to install renv to contribute to collapse (which frankly I haven't used myself all the years), it may make it more difficult to do so?

@alinacherkas
Copy link
Member Author

Hi @SebKrantz, actually, installation is not even necessary these days. According to renv documentation:

Now when one of your collaborators opens this project, renv will automatically bootstrap itself, downloading and installing the appropriate version of renv.

I have already verified this on another device and removed the note from CONTRIBUTING.md.

renv's main benefit is that all the packages (testthat, plm and other packages under Suggests) are installed in an isolated environment. Additionally, you can easily upgrade all the packages with renv::update() for testing before releasing to CRAN.

You don't really have to do much to use renv in this case. One can just open .Rproj and work the usual way.

@SebKrantz
Copy link
Member

Ok, thanks. I'll test this on your fork during the weekend - it's not a small change to the repo and I need to ensure myself and others can work without problems with it - even using VScode and other tools.

@SebKrantz
Copy link
Member

Also I still need to test this. Have forgotten about it. Would be good to also hear some additional opinions here (e.g. @NicChr @davidbudzynski). As mentioned, I'm hesitant to add things that can complicate the development workflow.

@davidbudzynski
Copy link

Apologies for the delayed response. I have been quite busy over the festive period.

To be transparent, I have limited experience with renv and am personally more comfortable using docker. That said, I am not currently convinced that renv is necessary for this project.

Beyond R itself, our only hard dependency is Rcpp. The remaining dependencies are optional and not versioned. While we could pin those to specific versions, my understanding is that they primarily support auxiliary functionality, such as working with data.table objects. Given that, I see limited benefit in introducing renv, especially when weighed against the additional setup overhead and the assumption that all contributors are familiar with it or using RStudio.

If renv were optional and we had clear documentation supporting both workflows, I would be more comfortable with its inclusion.

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

Successfully merging this pull request may close these issues.

3 participants