Pre-CRAN polish for 0.3.0 (+ keep Colin as maintainer)#115
Conversation
Revert the maintainer (`cre`) swap from #111: Colin Fay (`contact@colinfay.me`) stays the `cre`, Vincent Guyader goes back to `aut`. Both remain listed as authors. No "New maintainer" note will be emitted by CRAN's submission system, so the corresponding section of `cran-comments.md` is removed.
|
/copilot review |
Bundled pre-submission cleanup, the result of a dedicated documentation review plus a coverage pass. dock_from_desc(): flip the default `repos` to `c(CRAN = "https://p3m.dev/cran/latest")`, matching dock_from_renv(), and wire `.patch_rprofile_for_ppm()` into the generated Rprofile.site RUN so the build pulls pre-compiled Linux binaries (the `__linux__/$VERSION_CODENAME/` rewrite + the strict `HTTPUserAgent` PPM requires). Pass `repos = c(CRAN = "https://cran.rstudio.com/")` to opt out. Breaking change (behaviour of the generated Dockerfile); NEWS updated. Tests added (red-first): the default `repos` formal is the PPM URL, and a default `dock_from_desc()` invocation produces the rewritten Rprofile line. Documentation: - README: the renv.lock section now shows the bare `dock_from_renv(lockfile = ...)` call and spells out the 0.3.0 defaults (multi-arch `rocker/r-ver`, p3m.dev binaries, `rstudio` user) and how to opt out; a `parse_dockerfile()` section is added; the README links to `vignette("dockerfiler")`. - Vignette: adds `dock_from_renv()` and `parse_dockerfile()` sections, fixes the `r(install.packages(..., repo = ...))` typo (`repos =`), and notes the generators' default `FROM` / `repos`. - `dock_from_desc()` roxygen: add `@examples` and `@details` (explaining the `build_from_source` / `update_tar_gz` interplay), document the new `repos` default + PPM rewrite, fix the `AS` "Default it NULL" typo, clarify `AS` is a build-stage name. - `Dockerfile$new()` roxygen: `@param FROM` now states the default (`"rocker/r-base"`, and that the high-level generators differ); `@param AS` describes it as a build-stage name. - `Dockerfile$ENV()` roxygen: `@param key,value` said "label" (copy-paste from `LABEL()`); now "environment variable". - `r()` roxygen: clearer `@description` / `@param` / `@return` (it captures an R *expression* unevaluated and returns a shell-quoted `R -e '...'` string), fix the example's `repo =` typo. - `get_sysreqs()` roxygen: add `@examples`. - NEWS: split the dense "Small polish bundle" bullet into readable, user-facing lines; widen the FROM/repos breaking-change bullets to cover `dock_from_desc()`. - regenerated `man/*.Rd` (`devtools::document()`; bumps `RoxygenNote` 7.3.2 -> 7.3.3 to match the installed roxygen2). Coverage: - `tests/testthat/test-utils.R`: direct tests for the type/length/NA/format guards of every `.validate_*` helper. These guards are part of the security contract (the argument is interpolated into a generated Dockerfile directive) but were only exercised via the format-regex branch. Package coverage is back to 99.65% (`R/utils.R` 99.10%, was 80.18%); `cran-comments.md` updated with the real figure. Full test suite: 0 failures. R CMD check --as-cran: 0/0/0 (one transient "unable to verify current time" host NOTE, unrelated).
04480f1 to
437c48a
Compare
|
Force-pushed |
|
/copilot review |
There was a problem hiding this comment.
Pull request overview
Pre-CRAN cleanup for the dockerfiler 0.3.0 release, including maintainer metadata alignment and documentation/test polishing. It also changes dock_from_desc()’s default CRAN repository configuration to Posit Public Package Manager (PPM) and wires in the PPM Rprofile rewrite so generated Dockerfiles pull Linux binaries by default.
Changes:
- Revert maintainer role swap (keep Colin Fay as
cre) and update CRAN submission notes accordingly. - Flip
dock_from_desc()defaultrepostohttps://p3m.dev/cran/latestand apply the PPM Rprofile rewrite logic. - Documentation refresh (README, vignette, roxygen/Rd) plus additional validator-guard and
dock_from_desc()regression tests.
Reviewed changes
Copilot reviewed 12 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| vignettes/dockerfiler.Rmd | Vignette updates: clarify defaults, add dock_from_renv() / parse_dockerfile() sections, fix repos= usage. |
| tests/testthat/test-utils.R | New direct tests for .validate_* guard branches (type/length/NA/format). |
| tests/testthat/test-dock_from_desc.R | Tests asserting new dock_from_desc() default repos and PPM rewrite emission. |
| README.Rmd | README source updates: clarify generator defaults, add parse_dockerfile() section, link to vignette. |
| README.md | Regenerated README output reflecting README.Rmd changes. |
| R/rthis.R | Roxygen improvements for r() and example param fix (repos=). |
| R/get_sysreqs.R | Add roxygen examples (dontrun). |
| R/dockerfile.R | Roxygen clarification for Dockerfile$new() params and ENV() docs. |
| R/dock_from_desc.R | Default repos flipped to PPM + call into .patch_rprofile_for_ppm(); expanded parameter docs/examples. |
| NEWS.md | Release notes reorganized; document repos default flip for both generators. |
| man/r.Rd | Regenerated Rd for r() documentation updates. |
| man/get_sysreqs.Rd | Regenerated Rd with examples. |
| man/dockerfiles.Rd | Regenerated Rd reflecting dock_from_desc() default repos + details/examples. |
| man/Dockerfile.Rd | Regenerated Rd reflecting roxygen clarifications for FROM/AS and ENV(). |
| DESCRIPTION | Maintainer role reverted; RoxygenNote bumped. |
| cran-comments.md | Remove “Maintainer change” section; update coverage note. |
Files not reviewed (4)
- man/Dockerfile.Rd: Language not supported
- man/dockerfiles.Rd: Language not supported
- man/get_sysreqs.Rd: Language not supported
- man/r.Rd: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| (`https://p3m.dev/cran/latest`). Pass `FROM = "rocker/r-base"` or | ||
| `repos = c(CRAN = "https://cran.rstudio.com/")` to opt out. | ||
|
|
||
| ## Create a Dockerfile from an renv.lock |
| #' @examples | ||
| #' r(print("yeay")) | ||
| #' r(install.packages("plumber", repo = "http://cran.irsn.fr/")) | ||
| #' r(install.packages("plumber", repos = "http://cran.irsn.fr/")) |
|
|
||
| ```{r} | ||
| my_dock$RUN(r(install.packages("attempt", repo = "http://cran.irsn.fr/"))) | ||
| my_dock$RUN(r(install.packages("attempt", repos = "http://cran.irsn.fr/"))) |
|
Force-pushed |
|
/copilot review |
…Entry (#116) #115 was merged from commit 437c48a, before the 2dcdc73 force-push that fixed the vignette index entry, so that fix was lost; this restores it. Plus the three Copilot inline comments on #115: - `vignettes/dockerfiler.Rmd`: section heading "Create a Dockerfile from an renv.lock" -> "... from a renv.lock" (article). - `R/rthis.R` `@examples`, `vignettes/dockerfiler.Rmd` "Basic workflow" chunk, `README.Rmd`: the illustrative `install.packages(..., repos = "http://cran.irsn.fr/")` now uses the canonical HTTPS CRAN mirror `https://cloud.r-project.org` instead of a plaintext-HTTP regional mirror. - restored `%\VignetteIndexEntry{Getting started with dockerfiler}` so it matches the vignette's YAML `title:` (silences the rmarkdown title-mismatch warning). regenerated `man/r.Rd`; re-knit `README.md`. No code-logic change. `devtools::test()` on the touched test file: 0 failures. Vignette renders clean. No en/em-dashes in source.
Summary
Pre-submission cleanup for the 0.3.0 CRAN release. Two commits:
chore: keep Colin Fay as the package maintainer(was PR chore: keep Colin Fay as the package maintainer #114 — supersedes and closes it). Reverts thecreswap from docs(cran-prep): switch maintainer to Vincent + rewrite cran-comments.md for 0.3.0 #111: Colin Fay stays the maintainer; Vincent Guyader goes back toaut.cran-comments.md's "Maintainer change" section is removed (no maintainer change → no "New maintainer" note from CRAN).docs+chore: pre-CRAN polish for 0.3.0— the result of a dedicated documentation review + a coverage pass:dock_from_desc()— flip defaultreposto PPM (consistency withdock_from_renv()): default is nowc(CRAN = "https://p3m.dev/cran/latest"), and.patch_rprofile_for_ppm()is wired into the generatedRprofile.siteRUN so the build pulls pre-compiled Linux binaries (the__linux__/$VERSION_CODENAME/rewrite + the strictHTTPUserAgentPPM requires). Passrepos = c(CRAN = "https://cran.rstudio.com/")to opt out. Breaking change to the generated Dockerfile; NEWS updated. Tests added (red-first): the defaultreposformal is the PPM URL; a defaultdock_from_desc()invocation produces the rewritten Rprofile line.Documentation:
dock_from_renv(lockfile = ...)call and spells out the 0.3.0 defaults (multi-archrocker/r-ver, p3m.dev binaries,rstudiouser) and how to opt out; aparse_dockerfile()section is added; README links tovignette("dockerfiler").dock_from_renv()andparse_dockerfile()sections; fixes ther(install.packages(..., repo = ...))typo (repos =); notes the generators' defaultFROM/repos.dock_from_desc()roxygen:@examples+@details(explainingbuild_from_source/update_tar_gz); documents the newreposdefault + PPM rewrite; fixes theAS"Default it NULL" typo; clarifiesASis a build-stage name.Dockerfile$new()roxygen:@param FROMstates the default;@param ASdescribed as a build-stage name.Dockerfile$ENV()roxygen:@param key,valuesaid "label" (copy-paste fromLABEL()) → "environment variable".r()roxygen: clearer@description/@param/@return(captures an R expression unevaluated, returns a shell-quotedR -e '...'string); fixes the example'srepo =typo.get_sysreqs()roxygen:@examples.FROM/reposbreaking-change bullets to coverdock_from_desc().man/*.Rdregenerated (devtools::document(); bumpsRoxygenNote7.3.2 → 7.3.3 to match the installed roxygen2).Coverage:
tests/testthat/test-utils.Rgains direct tests for the type/length/NA/format guards of every.validate_*helper (these guards are part of the security contract — the argument is interpolated into a generated Dockerfile directive — but were only exercised via the format-regex branch). Package coverage is back to 99.65% (R/utils.R99.10%, was 80.18%);cran-comments.mdupdated with the real figure.Verification
devtools::test(): 0 failures (3 pre-existing warnings only — 2 deliberate "warns when path missing" tests + an rlang lifecycle deprecation from a dependency).covr::package_coverage(): 99.65%.R CMD check(Rd / NAMESPACE / DESCRIPTION / cross-references): all OK. (A full--as-cranrun on this box is unusually slow due to networked tests + competing processes — CI is the authoritative check; the same--as-cranrun on the maintainer-revert-only branch was 0/0/1, the NOTE being the transient "unable to verify current time" host clock.)[dock_from_desc()],[base::shQuote()],[Dockerfile]) resolve (checking Rd cross-references ... OK).Test plan
dock_from_descdefaultreposflip — red-first tests, green after.R/utils.R80.18% → 99.10%.devtools::test()0 failures.Closes #114.