Test fixes in advance of CRAN push.#300
Conversation
|
Errors in checking FF1 version (pip/uv interaction). Hold for merge testing pending rstudio/reticulate#1890 pushed to CRAN. |
There was a problem hiding this comment.
Pull request overview
Updates the package’s tests, vignettes, and CI configuration ahead of a CRAN submission, primarily to reflect upstream dependency changes (notably dplyr) and stabilize test behavior.
Changes:
- Replaced
dplyr::case_match()usage in package code and vignettes withdplyr::recode_values(). - Updated cache-clearing test to call
load_schedule()with a fixed season and to check cache entries with arguments. - Adjusted CI matrix (drop Python 3.9, add Python 3.14) and refreshed
NEWS.mdentries/punctuation.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
vignettes/alonso-penalty-2024.Rmd.orig |
Updates vignette code to use new recoding helper. |
vignettes/alonso-penalty-2024.Rmd |
Same vignette update in the non-.orig source. |
tests/testthat/test-clear_f1_cache.R |
Stabilizes cache test by using season = 2025 and argument-aware cache checks. |
R/plotting_style.R |
Updates marker recoding logic used for plotting styles. |
R/plot_fastest.R |
Updates session-to-title mapping logic for plot_fastest(). |
NEWS.md |
Notes refactor away from deprecated case_match() and other maintenance items. |
.github/workflows/check-standard.yaml |
Expands Python test matrix to include 3.14 and removes 3.9. |
Comments suppressed due to low confidence (5)
R/plot_fastest.R:97
dplyr::recode_values()is likely not an exporteddplyrAPI in commonly supported versions, so this call may fail at runtime. Also consider providing an explicit default fallback so unexpectedsessionvalues don’t turnrace_nameintoNAand break the plot title.
if (!(session %in% c("r", "R"))) {
race_name <- dplyr::recode_values(
session,
c("q", "Q") ~ paste0(race_name, " Qualifying"),
c("s", "S") ~ paste0(race_name, " Sprint"),
c("fp1", "FP1") ~ paste0(race_name, " FP1"),
c("fp2", "FP2") ~ paste0(race_name, " FP2"),
c("fp3", "FP3") ~ paste0(race_name, " FP3")
)
vignettes/alonso-penalty-2024.Rmd.orig:92
dplyrdoes not export arecode_values()helper (at least in commonly supported versions), so this call is likely to error during vignette build. Consider switching to an exported API such asdplyr::recode()/dplyr::case_when()(or add and use a package-local helper) and, if needed, specify a minimumdplyrversion in DESCRIPTION.
dplyr::mutate(param = dplyr::recode_values(
param,
"speed" ~ "Speed (kph)",
"n_gear" ~ "Gear",
"throttle" ~ "Throttle %",
vignettes/alonso-penalty-2024.Rmd.orig:128
dplyrdoes not export arecode_values()helper (at least in commonly supported versions), so this call is likely to error during vignette build. Consider switching to an exported API such asdplyr::recode()/dplyr::case_when()(or add and use a package-local helper) and, if needed, specify a minimumdplyrversion in DESCRIPTION.
dplyr::mutate(param = dplyr::recode_values(
param,
"speed" ~ "Speed (kph)",
"n_gear" ~ "Gear",
"throttle" ~ "Throttle %",
vignettes/alonso-penalty-2024.Rmd:80
dplyrdoes not export arecode_values()helper (at least in commonly supported versions), so this call is likely to error during vignette build. Consider switching to an exported API such asdplyr::recode()/dplyr::case_when()(or add and use a package-local helper) and, if needed, specify a minimumdplyrversion in DESCRIPTION.
dplyr::mutate(param = dplyr::recode_values(
param,
"speed" ~ "Speed (kph)",
"n_gear" ~ "Gear",
"throttle" ~ "Throttle %",
vignettes/alonso-penalty-2024.Rmd:124
dplyrdoes not export arecode_values()helper (at least in commonly supported versions), so this call is likely to error during vignette build. Consider switching to an exported API such asdplyr::recode()/dplyr::case_when()(or add and use a package-local helper) and, if needed, specify a minimumdplyrversion in DESCRIPTION.
dplyr::mutate(param = dplyr::recode_values(
param,
"speed" ~ "Speed (kph)",
"n_gear" ~ "Gear",
"throttle" ~ "Throttle %",
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #300 +/- ##
==========================================
- Coverage 94.33% 92.88% -1.46%
==========================================
Files 20 20
Lines 971 1082 +111
==========================================
+ Hits 916 1005 +89
- Misses 55 77 +22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.