Skip to content

Pre-CRAN polish for 0.3.0 (+ keep Colin as maintainer)#115

Merged
VincentGuyader merged 2 commits into
masterfrom
docs/pre-cran-polish-0.3.0
May 12, 2026
Merged

Pre-CRAN polish for 0.3.0 (+ keep Colin as maintainer)#115
VincentGuyader merged 2 commits into
masterfrom
docs/pre-cran-polish-0.3.0

Conversation

@VincentGuyader
Copy link
Copy Markdown
Member

Summary

Pre-submission cleanup for the 0.3.0 CRAN release. Two commits:

  1. chore: keep Colin Fay as the package maintainer (was PR chore: keep Colin Fay as the package maintainer #114 — supersedes and closes it). Reverts the cre swap 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 to aut. cran-comments.md's "Maintainer change" section is removed (no maintainer change → no "New maintainer" note from CRAN).

  2. docs+chore: pre-CRAN polish for 0.3.0 — the result of a dedicated documentation review + a coverage pass:

    dock_from_desc() — flip default repos to PPM (consistency with dock_from_renv()): default is now c(CRAN = "https://p3m.dev/cran/latest"), and .patch_rprofile_for_ppm() is wired 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 to the generated Dockerfile; NEWS updated. Tests added (red-first): the default repos formal is the PPM URL; 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; README links to vignette("dockerfiler").
    • Vignette: adds dock_from_renv() and parse_dockerfile() sections; fixes the r(install.packages(..., repo = ...)) typo (repos =); notes the generators' default FROM/repos.
    • dock_from_desc() roxygen: @examples + @details (explaining build_from_source/update_tar_gz); documents the new repos default + PPM rewrite; fixes the AS "Default it NULL" typo; clarifies AS is a build-stage name.
    • Dockerfile$new() roxygen: @param FROM states the default; @param AS described as a build-stage name.
    • Dockerfile$ENV() roxygen: @param key,value said "label" (copy-paste from LABEL()) → "environment variable".
    • r() roxygen: clearer @description/@param/@return (captures an R expression unevaluated, returns a shell-quoted R -e '...' string); fixes the example's repo = typo.
    • get_sysreqs() roxygen: @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().
    • man/*.Rd regenerated (devtools::document(); bumps RoxygenNote 7.3.2 → 7.3.3 to match the installed roxygen2).

    Coverage: tests/testthat/test-utils.R gains 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.

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%.
  • Fast R CMD check (Rd / NAMESPACE / DESCRIPTION / cross-references): all OK. (A full --as-cran run on this box is unusually slow due to networked tests + competing processes — CI is the authoritative check; the same --as-cran run on the maintainer-revert-only branch was 0/0/1, the NOTE being the transient "unable to verify current time" host clock.)
  • New roxygen cross-refs ([dock_from_desc()], [base::shQuote()], [Dockerfile]) resolve (checking Rd cross-references ... OK).

Test plan

  • dock_from_desc default repos flip — red-first tests, green after.
  • validator-guard tests — R/utils.R 80.18% → 99.10%.
  • devtools::test() 0 failures.
  • Rd cross-references OK.
  • CI (R-CMD-check) green — authoritative.
  • pr-reviewer + Copilot.

Closes #114.

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.
@VincentGuyader
Copy link
Copy Markdown
Member Author

/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).
@VincentGuyader VincentGuyader force-pushed the docs/pre-cran-polish-0.3.0 branch from 04480f1 to 437c48a Compare May 12, 2026 07:24
@VincentGuyader
Copy link
Copy Markdown
Member Author

Force-pushed 437c48a: addressed pr-reviewer's nit — rmarkdown's smart-typography was turning -- into a U+2013 en-dash in the rendered README.md (and one slipped into cran-comments.md). Rephrased the parentheticals in README.Rmd / vignettes/dockerfiler.Rmd to use ; instead, re-knit README.md, fixed the cran-comments.md one. No en/em-dashes anywhere in source now. pr-reviewer verdict was APPROVE; local R CMD check (--no-manual --no-vignettes): 0/0/0 (one transient host NOTE). Re-triggered Copilot.

@VincentGuyader
Copy link
Copy Markdown
Member Author

/copilot review

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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() default repos to https://p3m.dev/cran/latest and 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.

Comment thread vignettes/dockerfiler.Rmd
(`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
Comment thread R/rthis.R
#' @examples
#' r(print("yeay"))
#' r(install.packages("plumber", repo = "http://cran.irsn.fr/"))
#' r(install.packages("plumber", repos = "http://cran.irsn.fr/"))
Comment thread vignettes/dockerfiler.Rmd

```{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/")))
@VincentGuyader VincentGuyader merged commit 581d38a into master May 12, 2026
10 checks passed
@VincentGuyader
Copy link
Copy Markdown
Member Author

Force-pushed 2dcdc73: one more doc nit — the vignette's \VignetteIndexEntry{getting_started} differed from its YAML title:, which triggers a rmarkdown title-mismatch warning. Aligned the index entry to Getting started with dockerfiler. Vignette renders clean. pkgdown::check_pkgdown(): no problems. Re-triggered Copilot.

@VincentGuyader
Copy link
Copy Markdown
Member Author

/copilot review

VincentGuyader added a commit that referenced this pull request May 12, 2026
…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.
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