Skip to content

Commit f68880c

Browse files
committed
Merge commit '1615d4ccf5e8d8a487028396fae07f8e7f5369f0'
2 parents b506ba6 + 1615d4c commit f68880c

File tree

258 files changed

+7462
-5791
lines changed

Some content is hidden

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

258 files changed

+7462
-5791
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: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -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,29 +23,29 @@ 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

4646
- 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
@@ -61,3 +62,6 @@ jobs:
6162
needs: check
6263

6364
- uses: r-lib/actions/check-r-package@v2
65+
with:
66+
upload-snapshots: true
67+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/pkgdown.yaml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,26 @@ on:
44
push:
55
branches: [main, master]
66
pull_request:
7-
branches: [main, master]
87
release:
98
types: [published]
109
workflow_dispatch:
1110

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

1415
jobs:
1516
pkgdown:
1617
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 }}
1721
env:
1822
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
23+
permissions:
24+
contents: write
1925
steps:
20-
- uses: actions/checkout@v2
26+
- uses: actions/checkout@v4
2127

2228
- uses: r-lib/actions/setup-pandoc@v2
2329

@@ -30,14 +36,14 @@ jobs:
3036
extra-packages: any::pkgdown, local::.
3137
needs: website
3238

33-
- name: Deploy package
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 🚀
3444
if: github.event_name != 'pull_request'
35-
run: |
36-
git config --local user.name "$GITHUB_ACTOR"
37-
git config --local user.email "[email protected]"
38-
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
39-
40-
- name: Build site without deploying
41-
if: github.event_name == 'pull_request'
42-
run: |
43-
Rscript -e 'pkgdown::build_site(preview = FALSE, install = FALSE)'
45+
uses: JamesIves/[email protected]
46+
with:
47+
clean: false
48+
branch: gh-pages
49+
folder: docs

.github/workflows/pr-commands.yaml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ 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:
@@ -13,8 +15,10 @@ jobs:
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

1923
- uses: r-lib/actions/pr-fetch@v2
2024
with:
@@ -30,7 +34,8 @@ jobs:
3034
needs: pr-document
3135

3236
- name: Document
33-
run: Rscript -e 'roxygen2::roxygenise()'
37+
run: roxygen2::roxygenise()
38+
shell: Rscript {0}
3439

3540
- name: commit
3641
run: |
@@ -49,8 +54,10 @@ jobs:
4954
runs-on: ubuntu-latest
5055
env:
5156
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
57+
permissions:
58+
contents: write
5259
steps:
53-
- uses: actions/checkout@v2
60+
- uses: actions/checkout@v4
5461

5562
- uses: r-lib/actions/pr-fetch@v2
5663
with:
@@ -59,10 +66,12 @@ jobs:
5966
- uses: r-lib/actions/setup-r@v2
6067

6168
- name: Install dependencies
62-
run: Rscript -e 'install.packages("styler")'
69+
run: install.packages("styler")
70+
shell: Rscript {0}
6371

6472
- name: Style
65-
run: Rscript -e 'styler::style_pkg()'
73+
run: styler::style_pkg()
74+
shell: Rscript {0}
6675

6776
- name: commit
6877
run: |

.github/workflows/test-coverage.yaml

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ on:
44
push:
55
branches: [main, master]
66
pull_request:
7-
branches: [main, master]
87

9-
name: test-coverage
8+
name: test-coverage.yaml
9+
10+
permissions: read-all
1011

1112
jobs:
1213
test-coverage:
@@ -15,17 +16,47 @@ jobs:
1516
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1617

1718
steps:
18-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v4
1920

2021
- uses: r-lib/actions/setup-r@v2
2122
with:
2223
use-public-rspm: true
2324

2425
- uses: r-lib/actions/setup-r-dependencies@v2
2526
with:
26-
extra-packages: any::covr
27+
extra-packages: any::covr, any::xml2
2728
needs: coverage
2829

2930
- name: Test coverage
30-
run: covr::codecov()
31+
run: |
32+
cov <- covr::package_coverage(
33+
quiet = FALSE,
34+
clean = FALSE,
35+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
36+
)
37+
print(cov)
38+
covr::to_cobertura(cov)
3139
shell: Rscript {0}
40+
41+
- uses: codecov/codecov-action@v5
42+
with:
43+
# Fail if error if not on PR, or if on PR and token is given
44+
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
45+
files: ./cobertura.xml
46+
plugins: noop
47+
disable_search: true
48+
token: ${{ secrets.CODECOV_TOKEN }}
49+
50+
- name: Show testthat output
51+
if: always()
52+
run: |
53+
## --------------------------------------------------------------------
54+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
55+
shell: bash
56+
57+
- name: Upload test results
58+
if: failure()
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: coverage-test-failures
62+
path: ${{ runner.temp }}/package

0 commit comments

Comments
 (0)