Add section on releasing to CRAN#285
Conversation
Adds a new "Releasing to CRAN" section to code-publication.qmd covering versioning, pre-release checklist, CRAN submission, and post-acceptance steps including git tagging and version bumping. Closes #277 Co-authored-by: Douglas Ezra Morrison <d-morrison@users.noreply.github.com>
|
@claude add the diagram from https://github.com/edgararuiz-zz/cran-stages (with attribution) |
|
Claude finished @d-morrison's task in 4m 39s —— View job Adding CRAN Stages DiagramTasks:
Done! Added the CRAN stages diagram to What was added (lines 128–130 of the updated file): The diagram below illustrates the stages of the CRAN submission pipeline:
.](https://raw.githubusercontent.com/edgararuiz-zz/cran-stages/master/cran-stages.png){fig-alt="..."}Note: The image is referenced via |
Co-authored-by: Douglas Ezra Morrison <d-morrison@users.noreply.github.com>
|
@claude fix failing workflows |
|
Claude finished @d-morrison's task in 5m 33s —— View job Fixed Failing WorkflowsRoot Causes Found and Fixed:
Changes made in commit
Tasks:
Note on remaining failures:
|
- Replace broken external image (404) with a text description and hyperlink to the cran-stages repository by Edgar Ruiz - Replace em dashes with ASCII hyphens in the pre-release checklist Co-authored-by: Douglas Ezra Morrison <d-morrison@users.noreply.github.com>
|
|
@claude review |
|
Claude finished @d-morrison's task in 1m 13s —— View job Code ReviewTasks:
Overall AssessmentThe new "Releasing to CRAN" section is well-structured, practical, and covers the most important steps in a logical order. The writing is clear and the code examples are helpful. A few items worth addressing: Issues1.
The # New rhub v2 workflow:
rhub::rhub_setup() # run once to add a GitHub Actions workflow
rhub::rc_submit() # trigger a check runAlternatively, the R-hub GitHub Actions workflow can be set up manually. Leaving the deprecated function name will confuse users who have rhub v2 installed. 2.
For CRAN submissions, devtools::check(cran = TRUE)Suggestions3. Consider adding The R Packages book pre-release checklist recommends running 4. Slight duplication with "Create Github release" section above The "After CRAN Acceptance" subsection restates the git tag and GitHub release steps that already appear in the 2. **Create a GitHub release**: Follow the steps described in the
[Create Github release](#create-github-release) section above.5. Submission comments note is slightly inaccurate
What's Working Well
| Branch |
|
Claude Code CLI (local session) is working on this — paws off until I'm done. |
- Replace deprecated rhub::check_for_cran() with the rhub v2 GitHub Actions workflow (rhub::rhub_setup() / rhub::rc_submit()). - Use devtools::check(cran = TRUE) for stricter CRAN-aligned checks. - Add urlchecker::url_check() to the pre-release checklist. - Cross-reference the 'Create Github release' section instead of restating the tag/release steps under 'After CRAN Acceptance'. - Clarify that submit_cran() opens a web form rather than prompting inline. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Addressed all five items from the latest review:
@claude review |
|
Claude finished @d-morrison's task in 1m 59s —— View job Code ReviewTasks:
Previous Review Items — Status
All five items are addressed. The section reads well overall. New Issue Found
I apologize — my previous review incorrectly specified # Correct rhub v2 usage:
rhub::rhub_setup() # run once to add the GitHub Actions workflow
rhub::rhub_check() # trigger a check run
What's Working Well
| Branch |
There was a problem hiding this comment.
Pull request overview
Adds guidance to the lab manual’s “Code Publication” chapter for releasing an R package to CRAN, aligning with Issue #277’s request to summarize and link to the R Packages CRAN release chapter and to include lab-specific tagging/release details.
Changes:
- Introduces a new “Releasing to CRAN” section covering versioning, pre-release checks, submission, and post-acceptance steps.
- Adds links to CRAN resources and the R Packages CRAN release guidance.
|
Claude Code CLI (local session) is working on this — paws off until I'm done. |
The line paired rhub_setup() (which configures the GitHub Actions workflow) with rc_submit() (the separate R Consortium runners path). rhub_check() is the function that triggers a run via the workflow that rhub_setup() installs, so the two now describe one coherent workflow. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Addressed the new review item. rhub function (line 162): Replaced Note for the record: @claude review |
|
Claude finished @d-morrison's task in 1m 48s —— View job Code ReviewTasks:
Previous Review Items — Status
The rhub fix is correct. On the Copilot Reviewer's Remaining FlagsVersion numbering (copilot's line 196 comment) — Not a real bug The copilot reviewer said Long prose lines (copilot's line 127 and 184 comments) — Minor / cosmetic Lines 124, 126–127, and 184 are long single-line paragraphs. The copilot reviewer asked for semantic line breaks to make diffs easier to review. This hasn't been addressed, but it's a style preference rather than a correctness issue. Example of what they're asking for, applied to lines 126–127: The CRAN submission pipeline goes through several stages:
initial upload, automated checks, human review by CRAN maintainers, and final acceptance or rejection.
For a visual overview of the full pipeline,
see the [CRAN stages diagram](https://github.com/edgararuiz-zz/cran-stages) by Edgar Ruiz.Missing blank line before nested list (copilot's line 163 comment) — Very minor Line 160 ends with "Use the following to test on additional platforms:" and the nested bullet list follows immediately with no blank line. This renders correctly in pandoc/Quarto (tight lists within ordered list items are handled), so it's not a functional issue — just cosmetic style consistency. Overall AssessmentThe section is accurate, well-structured, and actionable. The two outstanding copilot style flags (long lines, missing blank line) are cosmetic. The version numbering is correct. The content is ready for merge as-is; whether to address the line-wrapping style before merging is your call. |
|
Claude Code CLI (local session) is working on this — paws off until I'm done. |
Address remaining Copilot style flags on the CRAN release section:
- Wrap the long intro paragraph (CRAN section) and the 'After CRAN
Acceptance' tag-the-release item into semantic line breaks, matching the
repo's one-clause-per-line convention.
- Add a blank line before the nested platform-test bullet list in step 5.
The flagged 1.2.0.9000 -> 1.2.1.9000 version bump is intentionally left as-is:
usethis::use_version('dev') appends .9000 without incrementing the patch, so
1.2.0 -> 1.2.0.9000 is correct.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Addressed the remaining Copilot style flags (commit 3c1e8b6):
On the version-numbering flag (line 196 / The rhub v2 fix from the prior round ( @claude review |
|
Done with my local session — unclaiming. (Re-triggered @claude review on the latest commit.) |
|
Claude finished @d-morrison's task in 1m 38s —— View job Code ReviewTasks:
Copilot Style Flags — Status
All four Copilot flags are now resolved. On the Version Numberd-morrison's reasoning is correct and backed by the usethis docs: Overall AssessmentThe section is accurate, well-structured, and all flagged issues are resolved. The semantic line breaks match the repo convention, the blank line before the nested list renders reliably in Pandoc/Quarto, and the technical content (rhub v2, This section is ready to merge. | Branch |
|
Claude finished @d-morrison's task in 1m 15s —— View job Code ReviewTasks:
Previous Review Items — Final Status
No New IssuesThe latest commit ( A quick check on the items that generated debate:
Overall AssessmentThe "Releasing to CRAN" section is accurate, well-structured, and ready for merge. All review items from all rounds are resolved. The section covers versioning, pre-release checks, submission, and post-acceptance steps in the right order with correct function names and references. | Branch |
| 3. **Commit the version bump**: Stage and commit the updated `DESCRIPTION` (and `NEWS.md` if you added a `# mypackage (development version)` header): | ||
| ```bash | ||
| git add DESCRIPTION NEWS.md | ||
| git commit -m "Start development toward next release (1.2.0.9000)" |
|
@claude address #285 (review) |
|
Claude finished @d-morrison's task in 7m 14s —— View job Addressed Copilot Review #pullrequestreview-4423402337Tasks:
Summary of changes (commit
|
| Item | Change |
|---|---|
| "Github" → "GitHub" | Lines 14, 114, 116, 118 |
{#sec-create-github-release} label |
Added to ## Create GitHub release header |
| Checklist link | Updated anchor from #create-github-release → #sec-create-github-release |
| Cross-reference in CRAN section | Replaced [Create Github release](#create-github-release) with @sec-create-github-release |
| Temporal phrase | "As of rhub v2" → "In rhub v2" |
| Version-bump description (line 196) | Removed "increment the patch version and" — use_version("dev") does NOT increment the patch; it appends .9000 to the current version (1.2.0 → 1.2.0.9000) |
| Semantic line breaks | Applied throughout the CRAN section |
Version numbers (1.2.0.9000) |
Left as-is — confirmed correct in prior review rounds |
| Branch |
…fs, fix version-bump description
- Apply semantic line breaks throughout the CRAN section (lines 130-131, 135, 147,
149, 156-158, 160-163, 173, 178, 181, 183, 197-228) per repo convention
- Fix "Github" → "GitHub" in checklist, header, and paragraph (lines 14, 114, 116, 118)
- Add {#sec-create-github-release} label to the "Create GitHub release" header
- Update checklist link to use new anchor (#sec-create-github-release)
- Replace manual (#create-github-release) cross-reference in CRAN section
with Quarto @sec-create-github-release cross-reference
- Fix line 167 temporal phrase: "As of rhub v2" → "In rhub v2"
- Fix line 196 description: "increment the patch version and add .9000" was wrong;
usethis::use_version("dev") appends .9000 WITHOUT incrementing the patch
(1.2.0 → 1.2.0.9000, not 1.2.1.9000); description now matches the example
Addresses pullrequestreview-4423402337
Co-authored-by: Douglas Ezra Morrison <d-morrison@users.noreply.github.com>
| which will tag the repository, | ||
| creating a marker at this specific point in time. | ||
|
|
||
| Detailed instructions [here.](https://docs.github.com/en/enterprise/2.13/user/articles/creating-releases) |
| In rhub v2, this runs via GitHub Actions: | ||
| run `rhub::rhub_setup()` once to add the workflow to your repository, | ||
| then `rhub::rhub_check()` to trigger a check run. | ||
| (The older `rhub::check_for_cran()` function was removed in the v2 rewrite.) |
| you may want to release it on [CRAN](https://cran.r-project.org/) (the Comprehensive R Archive Network). | ||
| This section summarizes the release process | ||
| and adds lab-specific guidance on versioning and tagging. | ||
| For full details, see the [R Packages book chapter on releasing to CRAN](https://r-pkgs.org/release.html) by Hadley Wickham and Jennifer Bryan. |
|
Claude Code CLI (local session) is working on this — paws off until I'm done. |
|
@claude review |
|
Claude finished @d-morrison's task in 2m 3s —— View job Code ReviewTasks:
New Copilot Flags — AssessmentThe latest Copilot review (2026-06-17) raised four items. Here's my assessment of each: 1. GitHub Enterprise 2.13 link (line 123) — Real issue, fix recommended
Detailed instructions [here.](https://docs.github.com/en/enterprise/2.13/user/articles/creating-releases)This URL is pinned to GitHub Enterprise 2.13 (released ~2018). The page may already be stale or inaccessible. The canonical URL for the current GitHub docs on managing releases is: Detailed instructions [here.](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository)The link text is also worth improving — 2. "Annotated tag" claim (line 219) — Real technical inaccuracy, fix required
using an annotated tag named `v` followed by the version number (e.g., `v1.2.0`).The cross-referenced section ( For CRAN releases, annotated tags are better practice (they store tagger, date, and message as separate Git objects). If the intent is to require annotated tags, explicit CLI instructions should be provided: git tag -a v1.2.0 -m "Release v1.2.0"
git push origin v1.2.0Otherwise, remove the word "annotated" from line 219. Copilot's flag is valid and this is the most significant issue remaining. 3. rhub v2 claims without reference (lines 184–187) — Valid suggestion, low priority Lines 184–187 make specific claims about rhub v2 behavior (GitHub Actions-based, 4. Long sentence at line 131 — Not worth addressing Line 131 is already a single, well-formed sentence that fits naturally on one line. The semantic line break convention is applied throughout the surrounding paragraphs (lines 127–130, 133–138). This one remaining sentence is not egregiously long and is lower priority than items 1–3. Skipping this is fine. Summary
Items 1 and 2 are the blockers. Item 3 is a nice-to-have. Otherwise the section is accurate and well-structured. |
- Replace stale GitHub Enterprise 2.13 releases URL with canonical docs URL and clearer link text. - Drop 'annotated' (the cross-referenced GitHub UI creates lightweight tags). - Link the rhub v2 vignette for the rhub v2 guidance. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@claude review |
|
Claude finished @d-morrison's task in 1m 29s —— View job Code ReviewTasks:
Previous Review Items — Final StatusThe latest commit (
All prior review items across all rounds are resolved. No New IssuesA fresh read of the full section found nothing new to flag. Spot-checks on items that generated debate in earlier rounds:
Overall AssessmentThe "Releasing to CRAN" section is accurate, well-structured, and all flagged issues from all review rounds are resolved. This section is ready to merge. |
Adds a "Releasing to CRAN" section to
code-publication.qmdcovering versioning, pre-release checklist, CRAN submission, and post-acceptance steps including git tagging and GitHub releases.Closes #277
Generated with Claude Code