Prepare chef package for CRAN submission by removing non-compliant dependencies, fixing validation errors, and adding documentation examples.#43
Open
NNcino wants to merge 16 commits into
Open
Conversation
Replace testr with withr/testthat equivalents to enable CRAN submission. CRAN prohibits packages with Remotes fields. - Replace testr::create_local_project() → withr temp dir pattern - Replace testr::skip_on_devops() → testthat::skip_on_ci() - Remove testr from Suggests and delete Remotes field - Delete helper-skip-on-devops.R
- Add R (>= 4.1.0) to Depends: package uses native pipe |> syntax
- Remove unused pryr/qs from Suggests; add qs2 which targets 1.12.0
now requires for its default storage format
- Fix expand_over_endpoints: assigning list() to endpoint_group_metadata
was silently dropped by data.table — use [[ ]] assignment with
vector("list", nrow(.)) to correctly add the column
- Wrap evaluate_criteria example in \dontrun{}: the function requires
criterion_wrapper from a targets pipeline context and cannot run standalone
- Fix expand_over_endpoints example: load data before building endpoint_def
and pass actual CMCLAS values; endpoint_group_filter/metadata are output
columns and must not be included in the input
- Fix use_chef tests: add usethis::local_project(force=TRUE) to all tests
that call use_chef() from a temp dir — usethis 3.2.1 now requires a
project marker and rejects plain temp directories
- Fix test-check_duplicate_functions: add dir.create("R") before tests
that write to R/ and expect the subdirectory to already exist
- Fix test-filter_db_data: swap dat[[1]]/dat[[2]] assertions to match
the actual digest-based key ordering of the analysis_data_container
Test Results 1 files 23 suites 53s ⏱️ Results for commit 827efcb. ♻️ This comment has been updated with latest results. |
Helper script removes the Remotes: block from DESCRIPTION before R CMD build, for symmetry with the sibling chef-ecosystem packages. chef itself has no chef-ecosystem deps so the helper is a safe no-op here, but having the same mechanism in every repo simplifies the CRAN submission workflow. Also ignore tools/ and cran-plan.md from R CMD build. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The "filter_db_data works with >1 row in ep dataset" test hardcoded dat[[1]] and dat[[2]] to specific custom_pop_filter values. The container's row order is determined by setkey() on a digest()-derived hash, which can differ between platforms or digest package versions. CI on Linux now returns the opposite order from the local macOS run that the previous swap was tuned for. Match each expected dataset to whichever container row equals it instead of hardcoding indices. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Code coverage
|
Github pagesReview the pkgdown webpage for the PR here |
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.
Changes
\dontrun{}(requires pipeline context)Testing
All CRAN checks pass. Tests updated to work with current dependencies and usethis requirements.