You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we must add a renv.lock and remove warnings on desc / usethis::use_package(). Depending on whether or not we rely on renv/activate.R, we must also add this.
we should test the hooks with renv versions and the utilities with latest CRAN.
we need a mechanism to periodically update the versions of the packages in renv.lock, probably in sync with the tag updates for the repo and the package version in DESCRIPTION. -> precommit:::release_gh().
test if new R package works with old hook versions
Blog post: Explain that renv is not a renv in the project directory. Explain upgrading.
The text was updated successfully, but these errors were encountered:
Our package has, as the README denotes, two purposes:
provide a set of useful hooks.
providing usethis like access to pre-commit.
With R as a supported language, we can isolate these two more. Maybe, one day, we'll even have separate repos for different hooks (i.e. place a .pre-commit-hooks.yaml in r-lib/styler and friends). So:
Hook tests
For hook scripts (and dependencies), we should test versions as denoted in renv.lock. We don't need the pre-commit executable. We should test on all platforms. We don't need r cmd check.
Usethis-like accessors
For usethis-like functionality, we should test CRAN with dependencies. We need the pre-commit executable and should test all combinations of installation methods and platfroms. We don't need r cmd check.
On CRAN, we need to test hooks with hook scripts and usethis-like functionality with CRAN dependencies as part of R CMD check on all platforms. Basically the second paragraph above, but skipping some tests. We can hence implement that in 2 workflows.
Using renv also implies that we no longer have to list dependencies of hooks in DESCRIPTION, which will make installation of the R package faster (and hook installation slower, once). However, if we want to check hooks on CRAN, we must install these dependencies, so probably we'll move all of these to Suggests. This means we probably should derive the hook dependencies to be listed in renv.lock from the hook scripts directly, and not from DESCRIPTION anymore. But for the hook scripts that call {precommit} hook script helpers, I am not sure renv will properly detect.
-> Put dependencies of R code from R/ as Imports: in DESCRIPTION, dependencies from inst/bin (hooks) into Suggests:. Detect dependencies from hooks with renv and put them into renv.lock (or rely on unit tests to ensure all deps are there?). Or just all suggests except testing deps like testthat?
With the latest release, R is officially supported in pre-commit 馃帀. This means we can proceed here:
r
.renv.lock
and remove warnings on desc / usethis::use_package(). Depending on whether or not we rely onrenv/activate.R
, we must also add this.renv.lock
, probably in sync with the tag updates for the repo and the package version inDESCRIPTION
. ->precommit:::release_gh()
.The text was updated successfully, but these errors were encountered: