Skip to content

Add Claude skills tooling, prepare for CRAN, and clean up repo - #13

Merged
szimmer merged 6 commits into
mainfrom
add-claude-skills
Sep 1, 2026
Merged

szimmer merged 6 commits into
mainfrom
add-claude-skills

Conversation

@szimmer

@szimmer szimmer commented Aug 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Enable the Posit r-lib Claude Code skills plugin (.claude/settings.json)
  • Prepare the package for CRAN submission:
    • Add [cph] (copyright holder) role for RTI International in Authors@R
    • Expand the Description field to spell out SRS/PPS on first use
    • Add missing @examples to serp_sort() (the only exported function without them)
    • Add install.packages("SampleSelectR") instructions to the README
    • Add cran-comments.md documenting a clean R CMD check --as-cran run (0 errors, 0 warnings, 0 notes)
  • Add a shared pre-commit hook (.githooks/pre-commit) that keeps README.md in sync with README.Rmd; document the one-time git config core.hooksPath .githooks setup step for collaborators
  • Remove orphaned, unreferenced files: man/figures/README-pressure-1.png, data-raw/IPEDS_2023/flags2023.xlsx, and .github/install_package.R

Test plan

  • devtools::check(cran = TRUE) passes with 0 errors, 0 warnings, 0 notes
  • urlchecker::url_check() passes
  • devtools::build_readme() re-knits cleanly and matches the committed README.md
  • Verified the pre-commit hook blocks a commit when only one of README.Rmd/README.md is staged

* DESCRIPTION: add copyright holder (RTI International) to Authors@R;
  expand Description field to spell out SRS/PPS on first use
* serp_sort(): add missing @examples (required for CRAN, was the only
  exported function without them); regenerate man/ and NAMESPACE
* README: add install.packages("SampleSelectR") instructions ahead of
  the GitHub dev-install steps
* Add cran-comments.md documenting a clean R CMD check --as-cran run
  (0 errors, 0 warnings, 0 notes)
Add .githooks/pre-commit (usethis's standard README hook), which blocks
a commit when README.Rmd is newer than README.md or when only one of
the pair is staged. Hooks in .git/hooks aren't tracked by git, so the
script lives in a committed .githooks/ directory instead; document the
one-time `git config core.hooksPath .githooks` setup step in README so
collaborators pick it up after cloning.

Also includes an incidental re-knit of README.md (the proportional
allocation example's tie-break output shifted slightly on rebuild;
worth a look separately since the seed is fixed).
* man/figures/README-pressure-1.png: leftover plot from the default
  Rmd template's "pressure" example chunk; current README.Rmd has no
  such chunk
* data-raw/IPEDS_2023/flags2023.xlsx: only flags2023.csv is read by
  ipeds.Rmd
* .github/install_package.R: not referenced by any GitHub Actions
  workflow
@szimmer szimmer changed the title Add claude skills Add Claude skills tooling, prepare for CRAN, and clean up repo Aug 21, 2026
szimmer and others added 2 commits August 21, 2026 15:26
A stray \cr immediately after \enumerate{}'s closing brace in the
`outputs` @PARAM docs produced a bare \ in the generated LaTeX with no
open paragraph to break, causing 'LaTeX Error: There's no line here to
end.' and failing devtools::build_manual() / R CMD Rd2pdf.
* Sampling_Output(): switch cat() to message() so the per-stratum
  sampling summary can be silenced with suppressMessages(). Writing to
  the console with cat() is one of the most common first-submission
  rejections ("please use message()/warning() or if(verbose)cat()");
  all four samplers -- srs(), sys(), sys_pps(), chromy_pps() -- printed
  unconditionally with no way to turn it off.
* DESCRIPTION: add method references in the form CRAN asks for, Kalton
  (1983) <doi:10.4135/9781412984683> and Chromy (1979) linked to the
  ASA proceedings PDF. Both were already cited in the man pages, and
  CRAN routinely asks for them in the Description field. The Chromy
  link stays on http because www.asasrms.org does not present a valid
  TLS certificate; the http URL resolves without redirect.
* Replace @Keywords internal with @nord on the seven unexported
  helpers (check_frame_type, check_n, check_outall, check_string_mos,
  Sampling_Output, chromy_inner, create_group_variable). They were
  shipping man pages into the PDF manual and pkgdown reference, which
  also leaves an opening for a reviewer to ask for @examples on
  internal functions. Nothing cross-referenced them.
* Sampling_Output(): add the missing blank roxygen line that was
  collapsing the title and description into a two-sentence \title{}.
* cran-comments.md: report the 1 expected "New submission" NOTE rather
  than 0 notes, document the http URL rationale, and reflow to soft
  wrap.
* .githooks/pre-commit: only require README.Rmd and README.md to be
  staged together when README.Rmd is itself staged. Re-knitting after
  the message() change above updates README.md alone, which the hook
  was rejecting. Staging README.Rmd without README.md still fails,
  since that means the re-knit is missing.

Verified with devtools::check(manual = TRUE, cran = TRUE, "--as-cran"):
0 errors, 0 warnings, 0 notes. Also checked with
_R_CHECK_CRAN_INCOMING_=TRUE, where the only NOTEs are "New submission"
and the local absence of pandoc.

Incidental: regenerating docs migrated the generated files from
roxygen2 7.3.3 to the installed 8.1.0. That rewrites NAMESPACE's
importFrom() calls into multi-line form, replaces RoxygenNote with
Config/roxygen2/version, and adds the maintainer to the Authors list in
the package Rd (7.3.3 had been omitting them). README.md is re-knit;
the sampling interval and random start now print at full precision
because message() does not apply getOption("digits") the way cat() did.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@szimmer
szimmer marked this pull request as ready for review August 31, 2026 16:52

@biasow38-rgb biasow38-rgb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed and tested the changes locally. The package built and installed successfully, all tests and examples passed, and the updated serp_sort() and suppressible Sampling_Output() behavior worked as expected. Approved.

@szimmer
szimmer merged commit 5c86e3e into main Sep 1, 2026
6 checks passed
@szimmer
szimmer deleted the add-claude-skills branch September 1, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants