Skip to content

Drop dplyr dependency, fix undecided-separator gap, reclassify clipr - #44

Open
vertesy wants to merge 2 commits into
devfrom
deps-drop-dplyr-fix-tie-break-reclassify-clipr
Open

Drop dplyr dependency, fix undecided-separator gap, reclassify clipr#44
vertesy wants to merge 2 commits into
devfrom
deps-drop-dplyr-fix-tie-break-reclassify-clipr

Conversation

@vertesy

@vertesy vertesy commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • countDotOrUnderscoreSeparated() used dplyr::case_when() for a single call site; replaced with a plain base R if/else chain. Same behavior as before for every previously-handled case, plus it fixes a real gap: any two-way tie among the dot/underscore/whitespace counts (e.g. "a.b_c.d_e f", where dots tie underscores at 2 and both beat the 1 whitespace) fell through all of case_when's branches and silently returned NA. It now resolves to "undecided", same as the pre-existing three-way-tie case.
  • dplyr is now unused; removed it from Imports/NAMESPACE and Development/config.R (which generates DESCRIPTION).
  • clipr is only ever used behind requireNamespace()/try() guards (an optional, best-effort feature) — exactly what Suggests is for. Moved it from Imports to Suggests. Because a NAMESPACE importFrom() forces a hard dependency (R CMD check ERRORs if a package with an importFrom() sits in Suggests), also dropped the three @importFrom clipr write_clip roxygen tags; the code already calls clipr::write_clip() fully qualified, which is exactly the supported pattern for optional Suggests-only dependencies.
  • Fixed an unrelated pre-existing R CMD check NOTE surfaced during this work: ParseFullFilePath() calls hasArg(), which lives in the methods package (not base), but nothing declared that dependency. Added @importFrom methods hasArg and moved methods into Imports.

Version bumped 1.2.1 → 1.2.2 in Development/config.R and DESCRIPTION.

Validation

R CMD check and the existing testthat suite (7/7 passing) were run on this branch. Manually verified countDotOrUnderscoreSeparated() against all documented cases plus the newly-fixed two-way-tie case. Remaining R CMD check findings are pre-existing and out of scope for this PR: the parFlags() example error and parsepvalue()'s undocumented prefix (each fixed in a sibling PR in this batch), the flag.names_list.Rd/idate.Rd broken-link warnings and dead-code cleanup (fixed in the docs-cleanup PR, not included on this branch since it branches independently from dev), and the %!in% Rd-name warning plus a sandbox locale warning (both environment-inherent).


Generated by Claude Code

claude added 2 commits August 27, 2026 21:18
- countDotOrUnderscoreSeparated() used dplyr::case_when() for a single
  call site; replaced with a plain base R if/else chain. Same behavior
  as before for every previously-handled case, plus it now fixes a real
  gap: any two-way tie among the dot/underscore/whitespace counts (e.g.
  "a.b_c.d_e f", where dots tie underscores at 2 and both beat the 1
  whitespace) fell through all of case_when's branches and silently
  returned NA. It now resolves to "undecided", same as the pre-existing
  three-way-tie case.
- dplyr is now unused; removed it from Imports/NAMESPACE and
  Development/config.R (which generates DESCRIPTION).
- clipr is only ever used behind requireNamespace()/try() guards (an
  optional, best-effort feature), which is exactly what DESCRIPTION's
  Suggests field is for. Moved it from Imports to Suggests. Because a
  NAMESPACE importFrom() forces a hard dependency (R CMD check ERRORs
  if a package with an importFrom() sits in Suggests), also dropped the
  three @importFrom clipr write_clip roxygen tags; the code already
  calls clipr::write_clip() fully qualified, which is exactly the
  supported pattern for optional Suggests-only dependencies.
- Fixed an unrelated pre-existing R CMD check NOTE surfaced during this
  work: ParseFullFilePath() calls hasArg(), which lives in the methods
  package (not base), but nothing declared that dependency. Added
  @importFrom methods hasArg and moved `methods` into Imports.

Version bumped 1.2.1 -> 1.2.2 in Development/config.R and DESCRIPTION.

Validation: R CMD check and the existing testthat suite (7/7 passing)
were run on this branch. Remaining R CMD check findings are pre-existing
and out of scope for this PR: the parFlags() example errors (fixed in
a follow-up PR forwarding it to parFlags2()), parsepvalue()'s
undocumented `prefix` param (fixed alongside its bracket bug in another
follow-up PR), the flag.names_list.Rd/idate.Rd broken-link warnings and
dead-code cleanup (fixed in the docs-cleanup PR, not included on this
branch since it branches independently from dev), and the %!in% Rd
name warning plus a sandbox locale warning, both environment-inherent
and unrelated to any source change.
…e-break-reclassify-clipr

# Conflicts:
#	DESCRIPTION
#	Development/config.R
#	NAMESPACE
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