Skip to content

Commit 2f2f6f4

Browse files
authored
Merge pull request #194 from atorus-research/devel
2 parents 1fa6c4c + dffbbdb commit 2f2f6f4

57 files changed

Lines changed: 5499 additions & 2485 deletions

Some content is hidden

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

.Rbuildignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
^\.Rproj\.user$
33
^azure-pipelines\.yml$
44
^\.github$
5+
^\.kiro$
56
^\.travis\.yml$
67
^_pkgdown\.yml$
78
^docs$
@@ -25,3 +26,7 @@
2526
^data-raw$
2627
^scratch.R$
2728
^CRAN-SUBMISSION$
29+
^.claude$
30+
^CLAUDE.md$
31+
^Rplots.pdf$
32+
.*\.out

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

Lines changed: 55 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,59 @@
1-
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
2-
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
on:
4-
push:
5-
branches:
6-
- main
7-
- master
8-
- devel
9-
pull_request:
10-
branches:
11-
- main
12-
- master
13-
- devel
4+
push:
5+
branches:
6+
- main
7+
- master
8+
- devel
9+
pull_request:
10+
branches:
11+
- main
12+
- master
13+
- devel
1414

15-
name: R-CMD-check
15+
name: R-CMD-check.yaml
1616

17-
jobs:
18-
R-CMD-check:
19-
runs-on: ${{ matrix.config.os }}
20-
21-
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
22-
23-
strategy:
24-
fail-fast: false
25-
matrix:
26-
config:
27-
- {os: windows-latest, r: 'release'}
28-
- {os: macOS-latest, r: 'release'}
29-
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
30-
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
31-
32-
env:
33-
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
34-
RSPM: ${{ matrix.config.rspm }}
35-
36-
steps:
37-
- uses: actions/checkout@v2
38-
39-
- uses: r-lib/actions/setup-r@v2
40-
with:
41-
r-version: ${{ matrix.config.r }}
42-
43-
- uses: r-lib/actions/setup-pandoc@v2
17+
permissions: read-all
4418

45-
- name: Query dependencies
46-
run: |
47-
install.packages('remotes')
48-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
49-
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
50-
shell: Rscript {0}
51-
52-
- name: Cache R packages
53-
if: runner.os != 'Windows'
54-
uses: actions/cache@v2
55-
with:
56-
path: ${{ env.R_LIBS_USER }}
57-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
58-
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
59-
60-
- name: Install system dependencies
61-
if: runner.os == 'Linux'
62-
run: |
63-
while read -r cmd
64-
do
65-
eval sudo $cmd
66-
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
67-
68-
- name: Install dependencies
69-
run: |
70-
remotes::install_deps(dependencies = TRUE)
71-
remotes::install_cran("rcmdcheck")
72-
shell: Rscript {0}
73-
74-
- name: Check
75-
env:
76-
_R_CHECK_CRAN_INCOMING_REMOTE_: false
77-
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
78-
shell: Rscript {0}
79-
80-
- name: Upload check results
81-
if: failure()
82-
uses: actions/upload-artifact@main
83-
with:
84-
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
85-
path: check
19+
jobs:
20+
R-CMD-check:
21+
runs-on: ${{ matrix.config.os }}
22+
23+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
24+
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
config:
29+
- {os: windows-latest, r: 'release'}
30+
- {os: macOS-latest, r: 'release'}
31+
- {os: ubuntu-22.04, r: 'release', rspm: "https://packagemanager.posit.co/cran/__linux__/jammy/latest"}
32+
- {os: ubuntu-22.04, r: 'devel', rspm: "https://packagemanager.posit.co/cran/__linux__/jammy/latest"}
33+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
34+
- {os: ubuntu-latest, r: 'release'}
35+
36+
env:
37+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
38+
R_KEEP_PKG_SOURCE: yes
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- uses: r-lib/actions/setup-pandoc@v2
44+
45+
- uses: r-lib/actions/setup-r@v2
46+
with:
47+
r-version: ${{ matrix.config.r }}
48+
http-user-agent: ${{ matrix.config.http-user-agent }}
49+
use-public-rspm: true
50+
51+
- uses: r-lib/actions/setup-r-dependencies@v2
52+
with:
53+
extra-packages: any::rcmdcheck
54+
needs: check
55+
56+
- uses: r-lib/actions/check-r-package@v2
57+
with:
58+
upload-snapshots: true
59+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/pkgdown.yaml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
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+
pull_request:
67
release:
78
types: [published]
89
workflow_dispatch:
910

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

1215
jobs:
1316
pkgdown:
1417
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 }}
1521
env:
1622
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
23+
permissions:
24+
contents: write
1725
steps:
18-
- uses: actions/checkout@v2
26+
- uses: actions/checkout@v4
1927

2028
- uses: r-lib/actions/setup-pandoc@v2
2129

@@ -28,8 +36,14 @@ jobs:
2836
extra-packages: any::pkgdown, local::.
2937
needs: website
3038

31-
- name: Deploy package
32-
run: |
33-
git config --local user.name "$GITHUB_ACTOR"
34-
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
35-
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/github-pages-deploy-action@v4.5.0
46+
with:
47+
clean: false
48+
branch: gh-pages
49+
folder: docs

.github/workflows/rhub.yaml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# R-hub's generic GitHub Actions workflow file. It's canonical location is at
2+
# https://github.com/r-hub/actions/blob/v1/workflows/rhub.yaml
3+
# You can update this file to a newer version using the rhub2 package:
4+
#
5+
# rhub::rhub_setup()
6+
#
7+
# It is unlikely that you need to modify this file manually.
8+
9+
name: R-hub
10+
run-name: "${{ github.event.inputs.id }}: ${{ github.event.inputs.name || format('Manually run by {0}', github.triggering_actor) }}"
11+
12+
on:
13+
workflow_dispatch:
14+
inputs:
15+
config:
16+
description: 'A comma separated list of R-hub platforms to use.'
17+
type: string
18+
default: 'linux,windows,macos'
19+
name:
20+
description: 'Run name. You can leave this empty now.'
21+
type: string
22+
id:
23+
description: 'Unique ID. You can leave this empty now.'
24+
type: string
25+
26+
jobs:
27+
28+
setup:
29+
runs-on: ubuntu-latest
30+
outputs:
31+
containers: ${{ steps.rhub-setup.outputs.containers }}
32+
platforms: ${{ steps.rhub-setup.outputs.platforms }}
33+
34+
steps:
35+
# NO NEED TO CHECKOUT HERE
36+
- uses: r-hub/actions/setup@v1
37+
with:
38+
config: ${{ github.event.inputs.config }}
39+
id: rhub-setup
40+
41+
linux-containers:
42+
needs: setup
43+
if: ${{ needs.setup.outputs.containers != '[]' }}
44+
runs-on: ubuntu-latest
45+
name: ${{ matrix.config.label }}
46+
strategy:
47+
fail-fast: false
48+
matrix:
49+
config: ${{ fromJson(needs.setup.outputs.containers) }}
50+
container:
51+
image: ${{ matrix.config.container }}
52+
53+
steps:
54+
- uses: r-hub/actions/checkout@v1
55+
- uses: r-hub/actions/platform-info@v1
56+
with:
57+
token: ${{ secrets.RHUB_TOKEN }}
58+
job-config: ${{ matrix.config.job-config }}
59+
- uses: r-hub/actions/setup-deps@v1
60+
with:
61+
token: ${{ secrets.RHUB_TOKEN }}
62+
job-config: ${{ matrix.config.job-config }}
63+
- uses: r-hub/actions/run-check@v1
64+
with:
65+
token: ${{ secrets.RHUB_TOKEN }}
66+
job-config: ${{ matrix.config.job-config }}
67+
68+
other-platforms:
69+
needs: setup
70+
if: ${{ needs.setup.outputs.platforms != '[]' }}
71+
runs-on: ${{ matrix.config.os }}
72+
name: ${{ matrix.config.label }}
73+
strategy:
74+
fail-fast: false
75+
matrix:
76+
config: ${{ fromJson(needs.setup.outputs.platforms) }}
77+
78+
steps:
79+
- uses: r-hub/actions/checkout@v1
80+
- uses: r-hub/actions/setup-r@v1
81+
with:
82+
job-config: ${{ matrix.config.job-config }}
83+
token: ${{ secrets.RHUB_TOKEN }}
84+
- uses: r-hub/actions/platform-info@v1
85+
with:
86+
token: ${{ secrets.RHUB_TOKEN }}
87+
job-config: ${{ matrix.config.job-config }}
88+
- uses: r-hub/actions/setup-deps@v1
89+
with:
90+
job-config: ${{ matrix.config.job-config }}
91+
token: ${{ secrets.RHUB_TOKEN }}
92+
- uses: r-hub/actions/run-check@v1
93+
with:
94+
job-config: ${{ matrix.config.job-config }}
95+
token: ${{ secrets.RHUB_TOKEN }}

.github/workflows/test-coverage.yaml

Lines changed: 20 additions & 8 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,36 +16,47 @@ jobs:
1516
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1617

1718
steps:
18-
- uses: actions/checkout@v3
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
3031
run: |
31-
covr::codecov(
32+
cov <- covr::package_coverage(
3233
quiet = FALSE,
3334
clean = FALSE,
34-
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
35+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
3536
)
37+
print(cov)
38+
covr::to_cobertura(cov)
3639
shell: Rscript {0}
3740

41+
- uses: codecov/codecov-action@v4
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+
file: ./cobertura.xml
46+
plugin: noop
47+
disable_search: true
48+
token: ${{ secrets.CODECOV_TOKEN }}
49+
3850
- name: Show testthat output
3951
if: always()
4052
run: |
4153
## --------------------------------------------------------------------
42-
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
54+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
4355
shell: bash
4456

4557
- name: Upload test results
4658
if: failure()
47-
uses: actions/upload-artifact@v3
59+
uses: actions/upload-artifact@v4
4860
with:
4961
name: coverage-test-failures
5062
path: ${{ runner.temp }}/package

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,10 @@ inst/doc
66
Tplyr.Rproj
77
docs/
88
scratch.R
9+
*.out
10+
*.pdf
11+
inst/design
12+
scratch/
13+
PR.md
14+
.DS_Store
15+
TPLYR2_REQUIREMENTS.MD

0 commit comments

Comments
 (0)