Skip to content

Commit 56b534e

Browse files
Merge branch 'main' into lorenzwalthert-patch-1
2 parents 9849bcf + d07e4d3 commit 56b534e

File tree

273 files changed

+378
-20887
lines changed

Some content is hidden

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

273 files changed

+378
-20887
lines changed

.github/workflows/check-full.yaml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,44 @@ jobs:
1212
R-CMD-check:
1313
runs-on: ${{ matrix.config.os }}
1414

15-
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
15+
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) ${{ matrix.config.locale }}
1616

1717
strategy:
1818
fail-fast: false
1919
matrix:
2020
config:
21-
- {os: macos-latest, r: 'release'}
21+
- { os: macos-latest, r: "release" }
2222

23-
- {os: windows-latest, r: 'devel'}
24-
- {os: windows-latest, r: 'release'}
23+
- { os: windows-latest, r: "devel" }
24+
- { os: windows-latest, r: "release" }
2525
# use 4.1 to check with rtools40's older compiler
26-
- {os: windows-latest, r: '4.1'}
26+
- { os: windows-latest, r: "4.1" }
2727

28-
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
29-
- {os: ubuntu-latest, r: 'release'}
30-
- {os: ubuntu-latest, r: 'oldrel-1'}
31-
- {os: ubuntu-latest, r: 'oldrel-2'}
32-
- {os: ubuntu-latest, r: 'oldrel-3'}
33-
- {os: ubuntu-latest, r: 'oldrel-4'}
28+
- { os: ubuntu-latest, r: "devel", locale: "en_US", http-user-agent: "release" }
29+
#- { os: ubuntu-latest, r: "release", locale: "zh_CN" }
30+
- { os: ubuntu-latest, r: "release" }
31+
- { os: ubuntu-latest, r: "oldrel-1" }
32+
- { os: ubuntu-latest, r: "oldrel-2" }
33+
- { os: ubuntu-latest, r: "oldrel-3" }
34+
- { os: ubuntu-latest, r: "oldrel-4" }
3435

3536
env:
3637
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
3738
R_KEEP_PKG_SOURCE: yes
3839

3940
steps:
41+
- name: Set 'en_US' locale
42+
if: matrix.config.locale == 'en_US'
43+
run: |
44+
sudo locale-gen en_US
45+
echo "LC_ALL=en_US" >> $GITHUB_ENV
46+
47+
- name: Set 'zh_CN' locale
48+
if: matrix.config.locale == 'zh_CN'
49+
run: |
50+
sudo locale-gen zh_CN
51+
echo "LC_ALL=zh_CN" >> $GITHUB_ENV
52+
4053
- uses: actions/checkout@v4
4154

4255
- uses: r-lib/actions/setup-pandoc@v2
@@ -49,6 +62,8 @@ jobs:
4962

5063
- uses: r-lib/actions/setup-r-dependencies@v2
5164
with:
65+
pak-version: devel
66+
upgrade: "TRUE"
5267
extra-packages: any::rcmdcheck
5368
needs: check
5469

.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/[email protected].0
42+
uses: JamesIves/[email protected].1
4343
with:
4444
clean: false
4545
branch: gh-pages

.github/workflows/pre-commit.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,14 @@ jobs:
2424
- uses: actions/checkout@v4
2525
with:
2626
fetch-depth: 0
27-
- name: Install system dependencies
28-
if: runner.os == 'Linux'
29-
run: |
30-
# your system installation code here
31-
# sudo apt-get install -y libcurl4-openssl-dev
3227
- name: Set up Python
33-
uses: actions/setup-python@v5
28+
uses: actions/setup-python@v5.1.0
3429
with:
3530
python-version: "3.9"
3631
architecture: "x64"
3732
- name: Run pre-commit
3833
uses: pre-commit/[email protected]
39-
env:
34+
env:
4035
SKIP: pkgdown
4136
- name: Commit files
4237
if: failure() && startsWith(github.ref, 'refs/heads')

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
.Rhistory
44
.Rproj.user
55
.gitsum
6+
.vscode
67
Meta
78
R/scratch
89
README.html
@@ -13,6 +14,7 @@ inst/doc
1314
revdep/
1415
!revdep/*.md
1516
!revdep/problems.md
17+
tests/testthat/*/*-in_tree
1618
touchstone/*
1719
!touchstone/config.json
1820
!touchstone/script.R

.lintr

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
linters: linters_with_tags(
2-
tags = NULL,
1+
linters: all_linters(
32
commented_code_linter = NULL,
43
cyclocomp_linter = cyclocomp_linter(40),
54
fixed_regex_linter = NULL,
65
function_argument_linter = NULL,
76
indentation_linter = NULL,
87
line_length_linter(120L),
98
namespace_linter = NULL,
10-
nested_ifelse_linter = NULL,
119
nzchar_linter = NULL,
1210
object_name_linter = NULL,
1311
object_length_linter(70L),

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ default_language_version:
66

77
repos:
88
- repo: https://github.com/lorenzwalthert/precommit
9-
rev: v0.4.0
9+
rev: v0.4.2
1010
hooks:
1111
- id: style-files
1212
args:
@@ -102,7 +102,7 @@ repos:
102102
)$
103103
- id: pkgdown
104104
- repo: https://github.com/pre-commit/pre-commit-hooks
105-
rev: v4.5.0
105+
rev: v4.6.0
106106
hooks:
107107
- id: check-added-large-files
108108
args: ["--maxkb=200"]

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ The source code is organized as follows:
9898
| token-create.R | Utilities for creating tokens, mostly to insert braces around mutli-line if statements. |
9999
| token-define.R | Defines which tokens belong to which group. |
100100
| transform-code.R, transform-files.R | Transformation of code for APIs that manipulate files (e.g. `style_file()`). |
101-
| ui.R | User interaces. Top-level functions for styling. |
101+
| ui.R | User interfaces. Top-level functions for styling. |
102102
| unindent.R | Certain tokens cause unindention, e.g. closing braces. |
103103
| utils.R | low-level general purpose utilities. |
104104
| vertical.R | S3 class for pretty printing of styled code. |

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Depends:
2727
Imports:
2828
cli (>= 3.1.1),
2929
magrittr (>= 2.0.0),
30-
purrr (>= 0.2.3),
30+
purrr (>= 1.0.2),
3131
R.cache (>= 0.15.0),
3232
rlang (>= 1.0.0),
3333
rprojroot (>= 1.1),
@@ -53,6 +53,7 @@ Roxygen: list(markdown = TRUE, roclets = c( "rd", "namespace", "collate",
5353
warning("Please install r-lib/pkgapi to make sure the file API is kept
5454
up to date"); NULL}))
5555
RoxygenNote: 7.3.1
56+
Language: en-US
5657
Config/testthat/edition: 3
5758
Config/testthat/parallel: true
5859
Collate:

R/compat-dplyr.R

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ lead <- function(x, n = 1L, default = NA) {
1010
c(x[-seq_len(n)], rep(default, n))
1111
}
1212

13-
14-
arrange <- function(.data, ...) {
15-
ord <- eval(substitute(order(...)), .data, parent.frame())
16-
vec_slice(.data, ord)
17-
}
18-
1913
arrange_pos_id <- function(data) {
2014
pos_id <- data$pos_id
2115
if (is.unsorted(pos_id)) {
@@ -51,9 +45,3 @@ left_join <- function(x, y, by) {
5145
last <- function(x) {
5246
x[[length(x)]]
5347
}
54-
55-
map_dfr <- function(.x, .f, ...) {
56-
.f <- purrr::as_mapper(.f, ...)
57-
res <- map(.x, .f, ...)
58-
vec_rbind(!!!res)
59-
}

R/roxygen-examples-parse.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,6 @@ needs_rd_emulation <- function(roxygen) {
179179
#' @keywords internal
180180
post_parse_roxygen <- function(raw) {
181181
raw %>%
182-
paste0(collapse = "") %>%
182+
paste(collapse = "") %>%
183183
convert_newlines_to_linebreaks()
184184
}

0 commit comments

Comments
 (0)