Drop dplyr dependency, fix undecided-separator gap, reclassify clipr - #44
Open
vertesy wants to merge 2 commits into
Open
Drop dplyr dependency, fix undecided-separator gap, reclassify clipr#44vertesy wants to merge 2 commits into
vertesy wants to merge 2 commits into
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
countDotOrUnderscoreSeparated()useddplyr::case_when()for a single call site; replaced with a plain base Rif/elsechain. 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 ofcase_when's branches and silently returnedNA. It now resolves to"undecided", same as the pre-existing three-way-tie case.dplyris now unused; removed it fromImports/NAMESPACEandDevelopment/config.R(which generatesDESCRIPTION).clipris only ever used behindrequireNamespace()/try()guards (an optional, best-effort feature) — exactly whatSuggestsis for. Moved it fromImportstoSuggests. Because a NAMESPACEimportFrom()forces a hard dependency (R CMD check ERRORs if a package with animportFrom()sits inSuggests), also dropped the three@importFrom clipr write_cliproxygen tags; the code already callsclipr::write_clip()fully qualified, which is exactly the supported pattern for optional Suggests-only dependencies.ParseFullFilePath()callshasArg(), which lives in themethodspackage (notbase), but nothing declared that dependency. Added@importFrom methods hasArgand movedmethodsintoImports.Version bumped 1.2.1 → 1.2.2 in
Development/config.RandDESCRIPTION.Validation
R CMD check and the existing
testthatsuite (7/7 passing) were run on this branch. Manually verifiedcountDotOrUnderscoreSeparated()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: theparFlags()example error andparsepvalue()'s undocumentedprefix(each fixed in a sibling PR in this batch), theflag.names_list.Rd/idate.Rdbroken-link warnings and dead-code cleanup (fixed in the docs-cleanup PR, not included on this branch since it branches independently fromdev), and the%!in%Rd-name warning plus a sandbox locale warning (both environment-inherent).Generated by Claude Code