Skip to content

FR: repado: emulate {renv} #75

@arthur-shaw

Description

@arthur-shaw

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:

  1. 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)
  2. 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
  3. 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 init to set up a folder to contain the project library. From what I understand, repado currently assumes the user brings their own folder and points to it with repado, using.
  • Add repado install to: 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 of repado to set the project library path and require to capture and install requirements. So the feature would consist of making this easier or simply available without needing require.
  • Add repado restore to 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrepado(log)Relates to repado and repadolog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions