Skip to content

Commit 268aee8

Browse files
Merge branch 'main' into expect-shape
2 parents cdb15a2 + c7fedf4 commit 268aee8

File tree

269 files changed

+8141
-3769
lines changed

Some content is hidden

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

269 files changed

+8141
-3769
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@
1919
^LICENSE\.md$
2020
^\.github/workflows/R\.yaml$
2121
^\.github/workflows/pr-commands\.yaml$
22+
^CRAN-SUBMISSION$

.github/CODE_OF_CONDUCT.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at [email protected].
63+
All complaints will be reviewed and investigated promptly and fairly.
64+
65+
All community leaders are obligated to respect the privacy and security of the
66+
reporter of any incident.
67+
68+
## Enforcement Guidelines
69+
70+
Community leaders will follow these Community Impact Guidelines in determining
71+
the consequences for any action they deem in violation of this Code of Conduct:
72+
73+
### 1. Correction
74+
75+
**Community Impact**: Use of inappropriate language or other behavior deemed
76+
unprofessional or unwelcome in the community.
77+
78+
**Consequence**: A private, written warning from community leaders, providing
79+
clarity around the nature of the violation and an explanation of why the
80+
behavior was inappropriate. A public apology may be requested.
81+
82+
### 2. Warning
83+
84+
**Community Impact**: A violation through a single incident or series of
85+
actions.
86+
87+
**Consequence**: A warning with consequences for continued behavior. No
88+
interaction with the people involved, including unsolicited interaction with
89+
those enforcing the Code of Conduct, for a specified period of time. This
90+
includes avoiding interactions in community spaces as well as external channels
91+
like social media. Violating these terms may lead to a temporary or permanent
92+
ban.
93+
94+
### 3. Temporary Ban
95+
96+
**Community Impact**: A serious violation of community standards, including
97+
sustained inappropriate behavior.
98+
99+
**Consequence**: A temporary ban from any sort of interaction or public
100+
communication with the community for a specified period of time. No public or
101+
private interaction with the people involved, including unsolicited interaction
102+
with those enforcing the Code of Conduct, is allowed during this period.
103+
Violating these terms may lead to a permanent ban.
104+
105+
### 4. Permanent Ban
106+
107+
**Community Impact**: Demonstrating a pattern of violation of community
108+
standards, including sustained inappropriate behavior, harassment of an
109+
individual, or aggression toward or disparagement of classes of individuals.
110+
111+
**Consequence**: A permanent ban from any sort of public interaction within the
112+
community.
113+
114+
## Attribution
115+
116+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
117+
version 2.1, available at
118+
<https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.
119+
120+
Community Impact Guidelines were inspired by
121+
[Mozilla's code of conduct enforcement ladder][https://github.com/mozilla/inclusion].
122+
123+
For answers to common questions about this code of conduct, see the FAQ at
124+
<https://www.contributor-covenant.org/faq>. Translations are available at <https://www.contributor-covenant.org/translations>.
125+
126+
[homepage]: https://www.contributor-covenant.org

.github/workflows/R-CMD-check.yaml

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
22
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
#
44
# NOTE: This workflow is overkill for most R packages and
@@ -8,9 +8,10 @@ on:
88
push:
99
branches: [main, master]
1010
pull_request:
11-
branches: [main, master]
1211

13-
name: R-CMD-check
12+
name: R-CMD-check.yaml
13+
14+
permissions: read-all
1415

1516
jobs:
1617
R-CMD-check:
@@ -22,53 +23,45 @@ jobs:
2223
fail-fast: false
2324
matrix:
2425
config:
25-
- {os: macOS-latest, r: 'release'}
26+
- {os: macos-latest, r: 'release'}
2627

2728
- {os: windows-latest, r: 'release'}
28-
# Use 3.6 to trigger usage of RTools35
29-
- {os: windows-latest, r: '3.6'}
29+
# use 4.0 or 4.1 to check with rtools40's older compiler
30+
- {os: windows-latest, r: 'oldrel-4'}
3031

31-
# Use older ubuntu to maximise backward compatibility
32-
- {os: ubuntu-18.04, r: 'devel', http-user-agent: 'release'}
33-
- {os: ubuntu-18.04, r: 'release'}
34-
- {os: ubuntu-18.04, r: 'oldrel-1'}
35-
- {os: ubuntu-18.04, r: 'oldrel-2'}
36-
- {os: ubuntu-18.04, r: 'oldrel-3'}
37-
- {os: ubuntu-18.04, r: 'oldrel-4'}
32+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
33+
- {os: ubuntu-latest, r: 'release'}
34+
- {os: ubuntu-latest, r: 'oldrel-1'}
35+
- {os: ubuntu-latest, r: 'oldrel-2'}
36+
- {os: ubuntu-latest, r: 'oldrel-3'}
37+
- {os: ubuntu-latest, r: 'oldrel-4'}
3838

3939
env:
4040
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
4141
R_KEEP_PKG_SOURCE: yes
4242

4343
steps:
44-
- uses: actions/checkout@v2
44+
- uses: actions/checkout@v4
4545

46-
- uses: r-lib/actions/setup-pandoc@v1
46+
- uses: r-lib/actions/setup-pandoc@v2
4747

48+
# For file snapshot that uses png
4849
- name: Install xquartz
4950
if: runner.os == 'macOS'
5051
run: brew install --cask xquartz
5152

52-
- uses: r-lib/actions/setup-r@v1
53+
- uses: r-lib/actions/setup-r@v2
5354
with:
5455
r-version: ${{ matrix.config.r }}
5556
http-user-agent: ${{ matrix.config.http-user-agent }}
5657
use-public-rspm: true
5758

58-
- uses: r-lib/actions/setup-r-dependencies@v1
59+
- uses: r-lib/actions/setup-r-dependencies@v2
5960
with:
60-
extra-packages: rcmdcheck
61-
62-
- uses: r-lib/actions/check-r-package@v1
63-
64-
- name: Show testthat output
65-
if: always()
66-
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
67-
shell: bash
61+
extra-packages: any::rcmdcheck
62+
needs: check
6863

69-
- name: Upload check results
70-
if: failure()
71-
uses: actions/upload-artifact@main
64+
- uses: r-lib/actions/check-r-package@v2
7265
with:
73-
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
74-
path: check
66+
upload-snapshots: true
67+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/pkgdown.yaml

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,49 @@
1-
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
22
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
on:
44
push:
55
branches: [main, master]
6-
tags: ['*']
6+
pull_request:
7+
release:
8+
types: [published]
9+
workflow_dispatch:
710

8-
name: pkgdown
11+
name: pkgdown.yaml
12+
13+
permissions: read-all
914

1015
jobs:
1116
pkgdown:
1217
runs-on: ubuntu-latest
18+
# Only restrict concurrency for non-PR jobs
19+
concurrency:
20+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
1321
env:
1422
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
23+
permissions:
24+
contents: write
1525
steps:
16-
- uses: actions/checkout@v2
26+
- uses: actions/checkout@v4
1727

18-
- uses: r-lib/actions/setup-pandoc@v1
28+
- uses: r-lib/actions/setup-pandoc@v2
1929

20-
- uses: r-lib/actions/setup-r@v1
30+
- uses: r-lib/actions/setup-r@v2
2131
with:
2232
use-public-rspm: true
2333

24-
- uses: r-lib/actions/setup-r-dependencies@v1
34+
- uses: r-lib/actions/setup-r-dependencies@v2
2535
with:
26-
extra-packages: pkgdown
36+
extra-packages: any::pkgdown, local::.
2737
needs: website
2838

29-
- name: Deploy package
30-
run: |
31-
git config --local user.name "$GITHUB_ACTOR"
32-
git config --local user.email "[email protected]"
33-
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
39+
- name: Build site
40+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
41+
shell: Rscript {0}
42+
43+
- name: Deploy to GitHub pages 🚀
44+
if: github.event_name != 'pull_request'
45+
uses: JamesIves/[email protected]
46+
with:
47+
clean: false
48+
branch: gh-pages
49+
folder: docs

.github/workflows/pr-commands.yaml

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,41 @@
1-
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
22
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
on:
44
issue_comment:
55
types: [created]
66

7-
name: Commands
7+
name: pr-commands.yaml
8+
9+
permissions: read-all
810

911
jobs:
1012
document:
11-
if: startsWith(github.event.comment.body, '/document')
13+
if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/document') }}
1214
name: document
1315
runs-on: ubuntu-latest
1416
env:
1517
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
18+
permissions:
19+
contents: write
1620
steps:
17-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v4
1822

19-
- uses: r-lib/actions/pr-fetch@v1
23+
- uses: r-lib/actions/pr-fetch@v2
2024
with:
2125
repo-token: ${{ secrets.GITHUB_TOKEN }}
2226

23-
- uses: r-lib/actions/setup-r@v1
27+
- uses: r-lib/actions/setup-r@v2
2428
with:
2529
use-public-rspm: true
2630

27-
- uses: r-lib/actions/setup-r-dependencies@v1
31+
- uses: r-lib/actions/setup-r-dependencies@v2
2832
with:
29-
extra-packages: roxygen2
33+
extra-packages: any::roxygen2
34+
needs: pr-document
3035

3136
- name: Document
32-
run: Rscript -e 'roxygen2::roxygenise()'
37+
run: roxygen2::roxygenise()
38+
shell: Rscript {0}
3339

3440
- name: commit
3541
run: |
@@ -38,30 +44,34 @@ jobs:
3844
git add man/\* NAMESPACE
3945
git commit -m 'Document'
4046
41-
- uses: r-lib/actions/pr-push@v1
47+
- uses: r-lib/actions/pr-push@v2
4248
with:
4349
repo-token: ${{ secrets.GITHUB_TOKEN }}
4450

4551
style:
46-
if: startsWith(github.event.comment.body, '/style')
52+
if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/style') }}
4753
name: style
4854
runs-on: ubuntu-latest
4955
env:
5056
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
57+
permissions:
58+
contents: write
5159
steps:
52-
- uses: actions/checkout@v2
60+
- uses: actions/checkout@v4
5361

54-
- uses: r-lib/actions/pr-fetch@v1
62+
- uses: r-lib/actions/pr-fetch@v2
5563
with:
5664
repo-token: ${{ secrets.GITHUB_TOKEN }}
5765

58-
- uses: r-lib/actions/setup-r@v1
66+
- uses: r-lib/actions/setup-r@v2
5967

6068
- name: Install dependencies
61-
run: Rscript -e 'install.packages("styler")'
69+
run: install.packages("styler")
70+
shell: Rscript {0}
6271

6372
- name: Style
64-
run: Rscript -e 'styler::style_pkg()'
73+
run: styler::style_pkg()
74+
shell: Rscript {0}
6575

6676
- name: commit
6777
run: |
@@ -70,6 +80,6 @@ jobs:
7080
git add \*.R
7181
git commit -m 'Style'
7282
73-
- uses: r-lib/actions/pr-push@v1
83+
- uses: r-lib/actions/pr-push@v2
7484
with:
7585
repo-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)