Skip to content

Commit 49f548e

Browse files
d-morrisonclaude
andcommitted
Merge main into cran-submission
Same three-way conflict as the previous main → cran-submission merge: * DESCRIPTION — kept the 0.1.0 release Title and version from cran-submission. Main's dev version (0.0.0.9054 after #218) is superseded. * NEWS.md — kept cran-submission's "first CRAN release" intro and 0.1.0 structure. All of main's incoming dev-version bullets (#218 R toolchain + gh issue allowlist, findjags casing, #210/#216/#217, OS-snapshot consolidation, Copilot decomposition) are already represented under ## Developer-facing changes from the prior merge and the "Incorporate PR #218 changes" cherry, so the main-side block is dropped rather than re-merged. * inst/WORDLIST — union of both branches, ASCII-sorted, CRLF preserved. Workflow files (.github/workflows/{claude,copilot-setup-steps, test-coverage}.yml) auto-merged to main's version, so cran-submission now inherits #218's @claude R toolchain, gh issue allowlist, and the lowercase runjags::findjags() consistency fix in test-coverage and copilot-setup. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2 parents 59bc846 + 13dcf54 commit 49f548e

3 files changed

Lines changed: 52 additions & 8 deletions

File tree

.github/workflows/claude.yml

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
permissions:
2222
contents: read
2323
pull-requests: write
24-
issues: read
24+
issues: write # so Claude can open follow-up issues for deferred work
2525
id-token: write
2626
actions: read # Required for Claude to read CI results on PRs
2727
steps:
@@ -30,6 +30,48 @@ jobs:
3030
with:
3131
fetch-depth: 1
3232

33+
# R toolchain so Claude can run common package-maintenance commands
34+
# (e.g. devtools::document(), styler::style_pkg(), pkgdown builds,
35+
# spelling::spell_check_package(), lintr, R CMD check).
36+
# Adds ~1–3 min when the dependency cache is warm; the first run after
37+
# a lockfile change is slower. JAGS is required because `runjags` is in
38+
# Imports and load-all/document needs the package to be loadable.
39+
# System libs mirror copilot-setup-steps.yml so packages that source-
40+
# build (textshaping, ragg, curl, xml2, ...) don't fail unpredictably.
41+
- name: Install system dependencies (Ubuntu)
42+
run: |
43+
sudo apt-get update
44+
sudo apt-get install -y \
45+
jags \
46+
libcurl4-openssl-dev \
47+
libssl-dev \
48+
libxml2-dev \
49+
libfontconfig1-dev \
50+
libharfbuzz-dev \
51+
libfribidi-dev \
52+
libfreetype6-dev \
53+
libpng-dev \
54+
libtiff5-dev \
55+
libjpeg-dev
56+
57+
- uses: r-lib/actions/setup-pandoc@v2
58+
59+
- uses: r-lib/actions/setup-r@v2
60+
with:
61+
use-public-rspm: true
62+
63+
- uses: r-lib/actions/setup-r-dependencies@v2
64+
with:
65+
extra-packages: |
66+
any::devtools
67+
any::roxygen2
68+
any::rjags
69+
any::rmarkdown
70+
any::lintr
71+
any::spelling
72+
any::rcmdcheck
73+
needs: check
74+
3375
- name: Resolve PR number (if any)
3476
id: pr
3577
env:
@@ -86,10 +128,12 @@ jobs:
86128
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
87129
# prompt: 'Update the pull request description to include a summary of changes.'
88130

89-
# Optional: Add claude_args to customize behavior and configuration
90-
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
91-
# or https://code.claude.com/docs/en/cli-reference for available options
92-
# claude_args: '--allowed-tools Bash(gh pr *)'
131+
# Extend the Bash allowlist so Claude can:
132+
# * run package-maintenance R commands (devtools::document(),
133+
# styler::style_pkg(), R CMD ...) — toolchain is installed above;
134+
# * file follow-up issues for work deferred out of the current PR
135+
# (gh issue create / comment / edit / view / list).
136+
claude_args: '--allowed-tools "Bash(Rscript:*)" "Bash(R:*)" "Bash(R CMD:*)" "Bash(gh issue:*)"'
93137

94138
- name: Re-assign reviewers after Claude finishes
95139
if: always() && steps.stash.outcome == 'success' && steps.pr.outputs.number != ''

.github/workflows/copilot-setup-steps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
withr::local_options(warn = 2)
103103
library(rjags)
104104
library(runjags)
105-
runjags::findJAGS()
105+
runjags::findjags()
106106
runjags::testjags()
107107
shell: Rscript {0}
108108

@@ -119,7 +119,7 @@ jobs:
119119
Rscript -e 'cat("runjags version:", as.character(packageVersion("runjags")), "\n")'
120120
echo ""
121121
echo "JAGS location (from runjags):"
122-
Rscript -e 'print(runjags::findJAGS())'
122+
Rscript -e 'print(runjags::findjags())'
123123
echo ""
124124
echo "Running JAGS test:"
125125
Rscript -e 'runjags::testjags()'

.github/workflows/test-coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
withr::local_options(warn = 2)
5959
library(rjags)
6060
library(runjags)
61-
runjags::findJAGS()
61+
runjags::findjags()
6262
runjags::testjags()
6363
shell: Rscript {0}
6464

0 commit comments

Comments
 (0)