Setting command line arguments for package installation

Open
#394 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
r
Domain
tooling

Research direction

Start in R/install-plan.R at make_build_process() and its cmd_args argument, then compare that with the package installation proposal configuration. Review the linked pak issue for context. Done means a package installation plan can pass --install-tests to R CMD INSTALL and support the testInstalledPackage() workflow.

Written by the indexing model from the issue text.

Description

feature

I opened this issue in {pak} before, but I think it is better addressed in {pkgdepends}. Here is the link to the original issue https://github.com/r-lib/pak/issues/514.

I would like to test installed packages using tools::testInstalledPackage(), see https://rdrr.io/r/tools/testInstalledPackage.html.

In order to run all R code in the examples, tests, and vignettes, examples and tests need to be explicitly installed during installation. For examples this is the default, for tests not.

In order to do that, one would have to set R CMD INSTALL --install-tests as installation command line argument.

I am not sure how to set command line arguments in a package installation plan.

It seems that this might already be possible, see the cmd_args argument in make_build_process() https://github.com/r-lib/pkgdepends/blob/6741f04bf5f7fc8d73d87b3a326b1bf5a3914a38/R/install-plan.R#L356-L357 but it is unlcear to me how to pass it from a package installation proposal since there is not configuation option matching the argument.

Dominant language
C
Stars
135
Forks
47
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from r-lib/pkgdepends

All issues in r-lib/pkgdepends

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.