Skip to content

Fix dependency declarations (dplyr to Imports; drop unused abind, reshape2)#477

Closed
joethorley wants to merge 1 commit into
mainfrom
fix-dependency-declarations
Closed

Fix dependency declarations (dplyr to Imports; drop unused abind, reshape2)#477
joethorley wants to merge 1 commit into
mainfrom
fix-dependency-declarations

Conversation

@joethorley

Copy link
Copy Markdown
Collaborator

Fixes #476.

Summary

  • dplyr: SuggestsImports. dplyr:: is called unconditionally in 13 files in R/ (hc.R, hcp-ma.R, gof.R, tidy.R, glance.R, plot-cdf.R, ...). It must be a hard dependency; otherwise R CMD check flags it and those functions fail at runtime without dplyr installed.
  • Remove abind from Imports and drop the @importFrom abind abind (and the matching NAMESPACE line). abind() is never called.
  • Remove unused reshape2 from Suggests (not referenced in R/, tests/, or vignettes/; also superseded).

plyr is intentionally retained — it is genuinely used by plyr::summarise() in R/ggproto.R.

NAMESPACE was edited by hand to match (one removed line); it is otherwise what devtools::document() would produce. NEWS.md is fledge-managed so left untouched.

Test plan

  • R CMD check / devtools::check() (not run here)
  • No package behaviour changes; this is dependency-declaration hygiene only.

Opened as a draft pending maintainer review.

- Move dplyr from Suggests to Imports: it is used unconditionally via
  dplyr:: in 13 files in R/, so it must be a hard dependency.
- Remove abind from Imports and drop its @importFrom (and the matching
  NAMESPACE entry); abind() is never called.
- Remove unused reshape2 from Suggests.

plyr is retained (used by plyr::summarise() in R/ggproto.R).

Closes #476

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@joethorley joethorley marked this pull request as ready for review June 15, 2026 14:59
@joethorley

Copy link
Copy Markdown
Collaborator Author

Superseded by poissonconsulting#171, which targets poissonconsulting/main as requested.

Note: poissonconsulting/main is ahead of bcgov/main and already includes the dplyr → Imports move and the reshape2 removal from this PR (and further dependency cleanup). The only outstanding item was removing the unused abind, which #171 does. These will reach bcgov through the fork's normal upstream flow.

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.

Fix dependency declarations: dplyr should be in Imports; abind and reshape2 are unused

1 participant