-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Background
As an R user, I like how renv works for capturing and enforcing project dependencies.
For those setting up a project, renv has functions to:
- Make the project an renv project, by adding some stuff (e.g., local project library, akin to repado's project-local PLUS folder; gitignore to not track the contents of the project's library; etc)
- Capture the dependencies in a project lockfile (i.e., package name, version, and source), which is somewhat like (my understanding of) Python's requirements.txt file
- Add/delete/amend entries in the project lockfile and installing them in the project-local library
For those consuming an renv project, renv has plumbing that bootstraps the project's dependencies:
- Checks whether project library is in sync with the lockfile
- Installs missing/updated dependencies in the project library
As a Stata user, I would love to have something as similar as possible. But unfortunately, I don't see a single offering in the Stata ecosystem that does this. However, I think I see a winning one-two combo: repado to set a project-local library (read: PLUS folder) and require to populate it with required packages.
Neverthess, I see some features either missing from such a system or with noteworthy rough edges.
Specific feature requests
These are probably sub-issues (or epics)
- Add
repado initto set up a folder to contain the project library. From what I understand,repadocurrently assumes the user brings their own folder and points to it withrepado, using. - Add
repado installto: collect the package, version, and source; write this info to a lockfile; and install in the repado directory. From what I can see, this can already be done with a combination ofrepadoto set the project library path andrequireto capture and install requirements. So the feature would consist of making this easier or simply available without needingrequire. - Add
repado restoreto bootstrap a project from the requirements, given the potentially non-empty contents of the project library. This would check whether requirements are installed. If not, either copy/symlink them from the global PLUS folder or install them from the desired source. Sources to support: ssc, SSC mirror, GitHub (releases), GitLab (are any Stata users there?), and local/network storage (e.g., super secret internal package or pre-release version).
Also
While my Stata skills are far more modest than the authors and maintainers, I'd be delighted to contribute--if only to have an "offline" conversation about how renv works.