Repository navigation
chore: drop dplyr from DESCRIPTION, regenerate NAMESPACE/man, final R CMD check verification - #142
Merged
Merged
Conversation
…ase R Removes dplyr as a direct Import per ADR-0005 Phase 3/4: - Convert data-raw/build_uds_crosswalk.R's dplyr::filter/mutate/arrange/ bind_rows call sites to Base R (subsetting, order(), and an inline bind_rows_base() helper matching the union-of-columns contract). - Convert tests/testthat/test_zi_aggregate.R's dplyr::filter/select call sites to Base R subsetting, eliminating the R CMD check WARNING for an unstated test dependency on dplyr. - Remove dplyr (>= 1.0.0) from DESCRIPTION Imports. - Regenerate NAMESPACE/man via devtools::document() (no diff). R CMD check: 0 errors, 0 warnings, 1 note (pre-existing, environment-only 'unable to verify current time' — present on main prior to this change). Closes #134. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add explicit 'intentional, out of scope for reference removal' notes next to the explanatory comment blocks in R/zi_utils.R, R/zi_prep_hud.R, data-raw/build_uds_crosswalk.R, and tests/testthat/test_zi_utils.R that document Base R helpers' dplyr-equivalence rationale, resolving the AC-wording ambiguity flagged by code review during #134. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Collaborator
Author
UAT sign-offRepo maintainer (@chris-prener) reviewed and accepted the two comment-only additions to Verified via |
Closed
3 tasks
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
Removes
dplyras a direct Import of zippeR, completing ADR-0005's Phase 3/4 and closing out [Epic L] #129. All four conversion sub-issues (#130–#133) landed the R/ call-site rewrites; this PR handles the final cleanup: dropping the dependency declaration, converting the last remainingdplyr::usage indata-raw/build_uds_crosswalk.R, and fixing a test-file dependency that R CMD check flagged. Also folds in #141, a documentation follow-up (auto-filed by code review) clarifying that explanatory dplyr-referencing comments are intentionally retained and out of scope for the epic's "nodplyr::reference" acceptance criteria.Implementation
Per the implementation plan on #134: converted
data-raw/build_uds_crosswalk.R'sdplyr::filter()/mutate()/arrange()/bind_rows()call sites to Base R (bracket subsetting,order(), and an inlinebind_rows_base()helper matching dplyr's union-of-columns contract), removeddplyr (>= 1.0.0)fromDESCRIPTIONImports, and regeneratedNAMESPACE/manviadevtools::document()(no diff — dplyr was never re-exported). During verification,R CMD checksurfaced an unstated-dependency WARNING from 18dplyr::filter()/select()calls intests/testthat/test_zi_aggregate.Rthat weren't part of the original scope; these were converted to Base R subsetting as well, since the epic's acceptance criteria require 0 warnings.Per the implementation plan on #141: added a short clarifying note next to the dplyr-referencing explanatory comment blocks in
R/zi_utils.R,R/zi_prep_hud.R,data-raw/build_uds_crosswalk.R, andtests/testthat/test_zi_utils.R, making explicit that these are intentional references documenting Base R-equivalence rationale, not functional dplyr usage. Also corrected #134's own AC checklist wording (previously "zerodplyrreferences") to match the parent epic's more precise "nodplyr::reference" phrasing, and checked off all five items with a one-line clarification.Testing
devtools::test()— 323 passed, 0 failed, 32 integration tests skipped (require live Census API key, as expected).devtools::check()— 0 errors, 0 warnings, 1 note (unable to verify current time). Confirmed via agit stashA/B comparison that this note is pre-existing and environment-only (present onmainbefore this change). Before this PR,mainhad 2 notes (the same time-check note plusNamespace in Imports field not imported from: dplyr); this PR eliminates the dplyr note and the dplyr test-dependency WARNING entirely.grep -rn "dplyr" R/ vignettes/ data-raw/ README.md tests/confirms zero remaining functionaldplyr::call sites — only explanatory comments documenting Base R equivalence rationale (inR/zi_utils.R,R/zi_prep_hud.R,tests/testthat/test_zi_utils.R) remain, left intentionally.data-raw/build_uds_crosswalk.R's Base R conversion logic (NA handling in the ZCTA filter via%in%;bind_rows_base()'s union-of-columns semantics) directly in the R console, since the script requires live network access and has no automated test coverage.grep -rn "dplyr::" R/ tests/ vignettes/ data-raw/ README.mdandgrep -rn "library(dplyr)" ...after [Code review] data-raw/build_uds_crosswalk.R: clarify 'zero dplyr references' AC wording vs. explanatory comments #141's comment edits — confirmed zero functional call sites / imports remain.devtools::test()after [Code review] data-raw/build_uds_crosswalk.R: clarify 'zero dplyr references' AC wording vs. explanatory comments #141's comment-only edits — 323 passed, 0 failed (no behavior change). Re-randevtools::document()— no NAMESPACE/man diff.Closes
Closes #134
Closes #141
Notes
inst/examples/sample_maps.R,inst/examples/sandbox.R,inst/build-data/build_sample.R, andinst/build-data/build_vectors.Rstill referencedplyrbut are out of scope — the epic's acceptance criteria explicitly enumerateR/, vignettes, README, anddata-raw/only, andR CMD checkdoes not flag these developer-only scratch scripts.dplyr::reference" (functional calls) while chore: drop dplyr from DESCRIPTION, regenerate NAMESPACE/man, final R CMD check verification #134's own checklist said "zerodplyrreferences" (could be read to include comments). Resolved in this PR via [Code review] data-raw/build_uds_crosswalk.R: clarify 'zero dplyr references' AC wording vs. explanatory comments #141: chore: drop dplyr from DESCRIPTION, regenerate NAMESPACE/man, final R CMD check verification #134's checklist wording was corrected, and the retained explanatory comments (consistent with refactor: convert dplyr filter/select/mutate/arrange call sites to Base R #130–refactor: convert dplyr rename/rename_with/bind_rows and remaining pipeline-glue call sites to Base R #133's precedent) are now explicitly marked as intentional and out of scope.⚠ UAT required (R/ changes)
Per this repo's Human-in-the-loop rule, any change to
R/scripts requires User Acceptance Testing before merge, including comment-only changes. This PR adds a 4-line clarifying comment block toR/zi_utils.R(top of file) andR/zi_prep_hud.R(inline, before an existing comment at line ~93) — both are comment-only additions, no functional/logic changes, no exported behavior change.devtools::test()(323 passed, 0 failed) anddevtools::document()(no NAMESPACE/man diff) confirm no behavioral impact. This PR must not be merged until the repo maintainer has reviewed and confirmed acceptance of these two comment additions.Co-authored-by: Copilot