Skip to content

v2.8.0 Phase 0: dependency modernization + roxygen2 8.x + CI badges#79

Merged
ehrlinger merged 25 commits into
mainfrom
claude/elastic-chandrasekhar-6c6db4
May 19, 2026
Merged

v2.8.0 Phase 0: dependency modernization + roxygen2 8.x + CI badges#79
ehrlinger merged 25 commits into
mainfrom
claude/elastic-chandrasekhar-6c6db4

Conversation

@ehrlinger
Copy link
Copy Markdown
Owner

Summary

Phase 0 of the v2.8.0 varPro-integration cycle — opens the dev cycle and modernizes the dependency/doc toolchain so Phases 1–3 build on a clean, CRAN-green base.

  • Dependency modernization: randomForestSRC/randomForest moved Depends:Imports:; igraph, callr, varPro added to Suggests:. library(ggRandomForests) no longer attaches the former Depends — documented as a breaking change for downstream scripts in NEWS.md. (varPro is deliberately in Suggests: for Phase 0 — promoted to Imports: in Phase 1 with the first varPro:: call; declaring it in Imports: now would NOTE under R CMD check.)
  • Version: 2.7.32.7.3.9000; new ggRandomForests v2.8.0 (development) NEWS section.
  • Examples migrated: every bare rfsrc()/randomForest()/partial()/get.partial.plot.data() in @examples qualified (Pattern Q — randomForestSRC::rfsrc() resolves Surv() without attaching survival).
  • Test suite: new tests/testthat/setup.R attaches the dependency surface for the suite; new tests/testthat/test_namespace_hygiene.R regression guard (test 1: Depends: is R-only; test 2: clean-session callr proof that library(ggRandomForests) does not attach randomForestSRC/randomForest, gated to run under R CMD check).
  • roxygen2 8.0.0 upgrade (RoxygenNote:Config/roxygen2/version: 8.0.0; man/ byte-identical after regen) — done here because a minor-version boundary is the right place for doc-toolchain modernization.
  • README: added lint and pkgdown CI status badges.

Plan + design-spec amendments tracked in dev/plans/ (Rbuildignored; mirrored to the Obsidian vault). Phase 1 follow-ups recorded in the plan header (varPro Suggests:Imports:; audit remaining bare test-body calls; reduce setup.R).

Verification

  • R CMD check --as-cran: 0 errors | 0 warnings | 0 notes — independently re-run multiple times; identical to the pre-migration baseline.
  • devtools::test(): FAIL 0 | WARN 0 | SKIP 3 | PASS 678 (baseline was PASS 677).
  • Clean-session guard (test 2) executed and passed under R CMD check (installed package loads without attaching the former Depends) — the durable proof the migration took effect.

Notes for the reviewer

  • Commit 618bf9b (qualify test_gg_vimp.R:82) was made by an over-stepping review subagent that misreported it as a "spawn task." The content was independently verified correct and kept; flagged here for transparency.
  • Executed task-by-task with per-task spec + code-quality review and a final holistic review. No merge performed — left for you.

Test plan

  • R CMD check --as-cran is 0/0/0 on CI
  • lint and pkgdown GitHub Actions badges resolve
  • Review the @examples qualification + NEWS breaking-change wording
  • Confirm the varPro-Suggests/Phase-1-promotion decision

ehrlinger and others added 23 commits May 19, 2026 08:41
Plans live in dev/plans/ (tracked, excluded from CRAN tarball via
^dev$, mirrors the ^memory$ precedent). docs/ stays reserved for
pkgdown render output.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Underline is now 36 = chars, equal to the title
"ggRandomForests v2.8.0 (development)" (36), following the file
convention where every release heading underlines to its own
title length (e.g. v2.7.3 = 22/22). The plan's Step 3 spec block
and its length note are corrected to 36 to keep plan and
deliverable from drifting.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Execution surfaced two gaps in Task 1: (1) the dependency list
only enumerated new/changed deps + tooling, not the full declared
Imports/Suggests closure a fresh R env needs for an as-cran 0/0/0
gate (e.g. patchwork); (2) roxygen2 >= 8.0.0 migrates
RoxygenNote -> Config/roxygen2/version on document(), churning
unrelated metadata. Plan now requires the full closure and pins
roxygen2 to the committed RoxygenNote value; Task 6 stops if the
migration appears.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The plan's Task 4 spec carried the broken `^R\b` regex (backspace,
not word boundary), the fragile `../../DESCRIPTION` path, and an
incomplete skip set. Code review caught these in the deliverable;
sync the plan block to the approved test so the canonical plan and
the four component plans do not reintroduce the bug.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ph, callr

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…Phase 1)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
varPro is declared in Suggests for Phase 0 (no varPro:: code yet;
Imports would NOTE under R CMD check and break the 0/0/0 gate).
NEWS bullet, plan Goal/Task 5 block/commit msg/self-review, and a
new authoritative cross-plan decision note are synced; Phase 1
promotes varPro Suggests->Imports with the first varPro:: call.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replace bare rfsrc()/randomForest()/partial()/get.partial.plot.data()
calls in @examples blocks with fully-qualified forms (randomForestSRC::
and randomForest::) so examples resolve without package attachment after
Task 5 moved these packages from Depends: to Imports:.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…eness gate

run_examples side-effects a top-level Rplots.pdf; ignore it so
later check/example tasks keep a clean tree. Plan Task 7 now
states the rfsrc/randomForest grep is a seed list and
devtools::run_examples() is the authoritative completeness gate
(execution surfaced bare partial()/get.partial.plot.data() the
grep missed).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
v2.8.0 Phase 0: create tests/testthat/setup.R to attach survival,
randomForestSRC, and randomForest to the testthat session. Tests used
bare Surv()/rfsrc()/randomForest() calls which resolved only because
Depends: attached those packages; after the Depends→Imports migration
the setup file provides the equivalent test-session attachment without
weakening the package's own namespace-qualified code.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Task 8 surfaced that skip_if_not_installed("ggRandomForests")
does not skip under devtools::test() (load_all makes
requireNamespace succeed) -> spurious FAIL. Plan Task 4 block now
uses skip_if_not(installed.packages() membership); Task 8 Step 4
expectation corrected (test2 SKIPs outside R CMD check; clean-
session proof deferred to Task 10).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Fix test_namespace_hygiene.R test 1 DESCRIPTION path under R CMD check:
use system.file() first (resolves inside installed package), falling back
to the relative path for devtools::test() / pkgload context. This makes
the guard robust in both environments and eliminates the 1 error that
blocked the as-CRAN gate.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Code review (APPROVED w/ minor) asked for a comment explaining why
test 1 tries system.file() then falls back to test_path(): the
test_path-only form does not resolve under R CMD check. Plan Task 4
block synced to the final guard form so the Phase 1-3 component
plans inherit the R-CMD-check-robust version.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Final holistic review: NEWS bullet omitted callr (added to Suggests
in Task 5 for the namespace-hygiene guard) — corrected to
"igraph, callr, and varPro". Plan now records Phase 1 follow-ups
(varPro Suggests->Imports, full test-body qualification incl.
test_gg_vimp.R:82, setup.R reduction). None are Phase 0 blockers;
as-cran gate is 0/0/0.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Upgrades roxygen2 from 7.3.3 to 8.0.0. Migrates DESCRIPTION field from
RoxygenNote: 7.3.3 to Config/roxygen2/version: 8.0.0 per roxygen2 8.x
standard. NAMESPACE and man/*.Rd output is semantically identical.
R CMD check --as-cran remains 0/0/0; tests remain FAIL 0 | PASS 678.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds lint and pkgdown workflow status badges to README.md, grouped with
the existing R-CMD-check CI badge between R-CMD-check and Codecov lines.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- roxygen2 toolchain note (authoritative): branch upgraded to
  8.0.0 at user request; Config/roxygen2/version committed;
  component plans use roxygen2 >= 8.0.0, do NOT re-pin 7.3.3.
  Task 1 Step 3 / Task 6 pin guidance annotated as superseded.
- Phase 1 follow-up #2 updated: test_gg_vimp.R:82 already
  qualified in 618bf9b; Phase 1 audits remaining test bodies only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The doc-toolchain bump belongs in the 2.8.0 cycle: a minor-version
boundary is the correct release point for disruptive non-functional
toolchain changes; deferring lets them creep into a later patch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.18%. Comparing base (d8c25b3) to head (33cd51d).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #79   +/-   ##
=======================================
  Coverage   84.18%   84.18%           
=======================================
  Files          32       32           
  Lines        2403     2403           
=======================================
  Hits         2023     2023           
  Misses        380      380           
Files with missing lines Coverage Δ
R/calc_roc.R 92.06% <ø> (ø)
R/gg_error.R 89.69% <ø> (ø)
R/gg_partial.R 100.00% <ø> (ø)
R/gg_partial_rfsrc.R 88.88% <ø> (ø)
R/gg_rfsrc.R 76.25% <ø> (ø)
R/gg_roc.R 79.48% <ø> (ø)
R/gg_variable.R 82.35% <ø> (ø)
R/gg_vimp.R 75.64% <ø> (ø)
R/plot.gg_error.R 100.00% <ø> (ø)
R/plot.gg_rfsrc.R 80.30% <ø> (ø)
... and 4 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Fixes a pre-existing pkgdown CI failure on main (red since
2026-05-12, the v2.7.3 PR #75 added print.gg/summary.gg Rd topics
without indexing them). check_missing_topics() errored. They are
user-facing S3 methods, so indexed under "S3 Methods" alongside
autoplot.gg. pkgdown::check_pkgdown(".") -> no problems found.
Makes the pkgdown badge added in this PR green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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

This PR kicks off the v2.8.0 development cycle by modernizing dependency declarations (Depends → Imports), updating the roxygen2 toolchain metadata, and hardening CI/docs/tests so the package remains CRAN-green while future varPro work is layered on.

Changes:

  • Migrate randomForestSRC/randomForest from Depends: to Imports: and document the resulting attachment breaking change in NEWS.md.
  • Qualify dependency calls in roxygen @examples (and regenerated .Rd files) so examples run without attached former Depends.
  • Add test coverage to prevent regression (new namespace hygiene guard + test setup attachment surface) and add README CI badges.

Reviewed changes

Copilot reviewed 29 out of 39 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
DESCRIPTION Version bump; dependency fields; roxygen2 config
NEWS.md Document breaking attachment change
.Rbuildignore Exclude dev/ from builds
.gitignore Ignore top-level Rplots.pdf
_pkgdown.yml Add print.gg / summary.gg reference entries
README.md Add lint and pkgdown badges
tests/testthat/setup.R Attach test dependency surface
tests/testthat/test_namespace_hygiene.R New regression guard for migration
tests/testthat/test_gg_vimp.R Namespace-qualify rfsrc() in test
R/calc_roc.R Qualify example rfsrc() / randomForest() calls
R/gg_error.R Qualify rfsrc() in examples
R/gg_partial.R Qualify rfsrc() in examples
R/gg_partial_rfsrc.R Qualify rfsrc() in examples
R/gg_rfsrc.R Qualify rfsrc() in examples
R/gg_roc.R Qualify rfsrc() in examples
R/gg_variable.R Qualify rfsrc() in examples
R/gg_vimp.R Qualify rfsrc() in examples
R/plot.gg_error.R Qualify rfsrc() in examples
R/plot.gg_rfsrc.R Qualify rfsrc() in examples
R/plot.gg_roc.R Qualify rfsrc() in examples
R/plot.gg_variable.R Qualify rfsrc() in examples
R/plot.gg_vimp.R Qualify rfsrc() in examples
R/surv_partial.rfsrc.R Qualify partial() / plot-data helpers in examples
man/calc_auc.Rd Regenerated docs for qualified examples
man/calc_roc.rfsrc.Rd Regenerated docs for qualified examples
man/gg_error.Rd Regenerated docs for qualified examples
man/gg_partial.Rd Regenerated docs for qualified examples
man/gg_partial_rfsrc.Rd Regenerated docs for qualified examples
man/gg_rfsrc.rfsrc.Rd Regenerated docs for qualified examples
man/gg_roc.rfsrc.Rd Regenerated docs for qualified examples
man/gg_variable.Rd Regenerated docs for qualified examples
man/gg_vimp.Rd Regenerated docs for qualified examples
man/plot.gg_error.Rd Regenerated docs for qualified examples
man/plot.gg_rfsrc.Rd Regenerated docs for qualified examples
man/plot.gg_roc.Rd Regenerated docs for qualified examples
man/plot.gg_variable.Rd Regenerated docs for qualified examples
man/plot.gg_vimp.Rd Regenerated docs for qualified examples
man/surv_partial.rfsrc.Rd Regenerated docs for qualified examples
dev/plans/2026-05-19-v2.8.0-phase0-dependency-modernization.md In-repo execution plan for Phase 0
Files not reviewed (9)
  • man/calc_auc.Rd: Language not supported
  • man/calc_roc.rfsrc.Rd: Language not supported
  • man/gg_error.Rd: Language not supported
  • man/gg_partial.Rd: Language not supported
  • man/gg_partial_rfsrc.Rd: Language not supported
  • man/gg_rfsrc.rfsrc.Rd: Language not supported
  • man/gg_roc.rfsrc.Rd: Language not supported
  • man/gg_variable.Rd: Language not supported
  • man/gg_vimp.Rd: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/testthat/test_namespace_hygiene.R
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ehrlinger ehrlinger merged commit f3ffd38 into main May 19, 2026
15 checks passed
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