Skip to content

Commit ecdd419

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents bbe9f20 + c9bd0f9 commit ecdd419

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+470
-262
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@
1818
^pkgdown$
1919
^renv$
2020
^renv\.lock$
21+
^revdep$
2122
^scratch$

.github/workflows/end-to-end.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
shell: Rscript {0}
2626

2727
- name: Cache R packages
28-
uses: actions/cache@v3
28+
uses: actions/cache@v4
2929
with:
3030
path: ${{ env.R_LIBS_USER }}
3131
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}

.github/workflows/hook-dependencies-update.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
on:
22
schedule:
33
- cron: '50 8 1,15 * *'
4+
workflow_dispatch:
45

56

67
name: Hook dependency updates
@@ -32,13 +33,18 @@ jobs:
3233
Rscript -e "install.packages('remotes'); remotes::install_github('r-hub/sysreqs')"
3334
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
3435
sudo -s eval "$sysreqs"
36+
- name: install runtime dependencies
37+
run: Rscript -e "install.packages(c('renv', 'jsonlite'))"
38+
- name: update PPM URL
39+
run: Rscript inst/update-ppm-url.R
3540
- name: update dependency graph among packages
3641
run: Rscript inst/update-existing-hook-dependencies.R
3742
- name: update existing packages
3843
run: Rscript inst/update-dependency-graph-existing-packages.R
3944
- name: Create Pull Request
4045
uses: peter-evans/[email protected]
4146
with:
47+
token: ${{ secrets.PRECOMMIT_HOOK_DEPENDENCY_UPDATE }}
4248
commit-message: Update renv dependencies
4349
branch: hook-dependencies-update
4450
delete-branch: true
@@ -48,5 +54,5 @@ jobs:
4854
This PR updates the hook dependencies in `renv.lock`, auto-generated by [create-pull-request][1]. Close and re-open this to trigger `on: pull_request` events to circumvent [limitation of GitHub actions](https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#push-pull-request-branches-to-a-fork).
4955
5056
[1]: https://github.com/peter-evans/create-pull-request
51-
57+
5258

.github/workflows/hook-release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: hook-release
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
8+
jobs:
9+
if_merged:
10+
if: github.event.pull_request.merged == true && github.head_ref == 'hook-dependencies-update'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- run: |
14+
echo The PR was merged

.github/workflows/hook-tests-legacy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,21 @@ jobs:
3939
shell: Rscript {0}
4040
- name: Cache R packages (macOs)
4141
if: startsWith(runner.os, 'macOS')
42-
uses: actions/cache@v3
42+
uses: actions/cache@v4
4343
with:
4444
path: ~/Library/Application Support/renv
4545
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('renv.lock') }}
4646
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
4747
- name: Cache R packages (Linux)
4848
if: startsWith(runner.os, 'Linux')
49-
uses: actions/cache@v3
49+
uses: actions/cache@v4
5050
with:
5151
path: ~/.local/share/renv
5252
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('renv.lock') }}
5353
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
5454
- name: Cache R packages (Windows)
5555
if: startsWith(runner.os, 'Windows')
56-
uses: actions/cache@v3
56+
uses: actions/cache@v4
5757
with:
5858
path: ~\AppData\Local\renv
5959
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('renv.lock') }}

.github/workflows/hook-tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,21 @@ jobs:
3434
shell: Rscript {0}
3535
- name: Cache R packages (macOs)
3636
if: startsWith(runner.os, 'macOS')
37-
uses: actions/cache@v3
37+
uses: actions/cache@v4
3838
with:
3939
path: ~/Library/Application Support/renv
4040
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('renv.lock') }}
4141
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
4242
- name: Cache R packages (Linux)
4343
if: startsWith(runner.os, 'Linux')
44-
uses: actions/cache@v3
44+
uses: actions/cache@v4
4545
with:
4646
path: ~/.local/share/renv
4747
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('renv.lock') }}
4848
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
4949
- name: Cache R packages (Windows)
5050
if: startsWith(runner.os, 'Windows')
51-
uses: actions/cache@v3
51+
uses: actions/cache@v4
5252
with:
5353
path: ~\AppData\Local\renv
5454
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('renv.lock') }}

.github/workflows/pkgdown.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
- name: Deploy to GitHub pages 🚀
4141
if: github.event_name != 'pull_request'
42-
uses: JamesIves/github-pages-deploy-action@v4.4.3
42+
uses: JamesIves/github-pages-deploy-action@v4.5.0
4343
with:
4444
clean: false
4545
branch: gh-pages

.pre-commit-config.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# R specific hooks: https://github.com/lorenzwalthert/precommit
33
repos:
44
- repo: https://github.com/lorenzwalthert/precommit
5-
rev: v0.3.2.9019
5+
rev: v0.4.0
66
hooks:
77
- id: style-files
88
args: [--style_pkg=styler, --style_fun=tidyverse_style, --cache-root=styler-perm]
@@ -60,6 +60,7 @@ repos:
6060
inst/usethis-legacy-hook|
6161
LICENSE|
6262
renv/.*|
63+
revdep/.*|
6364
tests/testthat/in/.*|
6465
)$
6566
- id: readme-rmd-rendered
@@ -83,23 +84,24 @@ repos:
8384
(?x)^(
8485
inst/hooks/exported/pkgdown.R|
8586
tests/testthat/in/.*|
86-
inst/renv-update\.R|
87+
inst/update-renv-prepare.R|
88+
inst/update-ppm-url.R|
8789
inst/update-dependency-graph-existing-packages\.R|
8890
inst/update-existing-hook-dependencies\.R|
8991
renv/activate.R|
9092
vignettes/FAQ\.Rmd|
9193
)$
9294
- id: pkgdown
9395
- repo: https://github.com/pre-commit/pre-commit-hooks
94-
rev: v4.4.0
96+
rev: v4.5.0
9597
hooks:
9698
- id: check-added-large-files
9799
- id: end-of-file-fixer
98100
exclude: '\.Rd' # sometimes roxygen fails to generate EOF blank line.
99101
- id: file-contents-sorter
100102
files: '^\.Rbuildignore$'
101103
- repo: https://github.com/pre-commit-ci/pre-commit-ci-config
102-
rev: v1.5.1
104+
rev: v1.6.1
103105
hooks:
104106
# Only required when https://pre-commit.ci is used for config validation
105107
- id: check-pre-commit-ci-config
@@ -117,11 +119,12 @@ repos:
117119
- docopt
118120
- fs
119121
- yaml
120-
- purrr
121-
- rlang
122+
- purrr
123+
- glue
124+
- rlang
122125
- git2r
123126
- desc
124-
- glue
127+
- lorenzwalthert/precommit
125128
stages: [commit, push]
126129
- id: hooks-config-to-inst
127130
name: hooks-config-to-inst

API

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ open_config(root = here::here())
1111
open_wordlist(root = here::here())
1212
path_pre_commit_exec(check_if_exists = TRUE)
1313
path_precommit_exec(check_if_exists = TRUE)
14+
precommit_docopt(doc, args = commandArgs(trailingOnly = TRUE), ...)
1415
robust_purl(path)
1516
roxygen_assert_additional_dependencies()
1617
roxygenize_with_cache(key, dirs)

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: precommit
22
Title: Pre-Commit Hooks
3-
Version: 0.3.2.9020
3+
Version: 0.4.0.9000
44
Author: Lorenz Walthert
55
Maintainer: Lorenz Walthert <[email protected]>
66
Description: Useful git hooks for R building on top of the multi-language
@@ -48,5 +48,5 @@ Roxygen: list(markdown = TRUE, roclets = c( "rd", "namespace", "collate",
4848
if (rlang::is_installed("pkgapi")) "pkgapi::api_roclet" else {
4949
warning("Please install r-lib/pkgapi to make sure the file API is kept
5050
up to date"); NULL} ) )
51-
RoxygenNote: 7.2.3
51+
RoxygenNote: 7.3.0
5252
SystemRequirements: git

0 commit comments

Comments
 (0)