Skip to content

Commit 8cc16ae

Browse files
authored
Test fixes in advance of CRAN push. (#300)
* Fixed a testing failure from `vcr` * Refactored `case_when` from dplyr Now deprecated * Updated the GA to test Python v3.14 and dropped v3.9 * Updated DESCRIPTION's Roxygen version
1 parent fa0d76a commit 8cc16ae

8 files changed

Lines changed: 22 additions & 19 deletions

File tree

.github/workflows/check-standard.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ jobs:
2525
- {os: windows-latest, r: "release", py: "3.x" }
2626
- {os: ubuntu-latest, r: "devel", py: "3.x", http-user-agent: "release"}
2727
- {os: ubuntu-latest, r: "oldrel-1", py: "3.x" }
28-
- {os: ubuntu-latest, r: "release", py: "3.9" }
2928
- {os: ubuntu-latest, r: "release", py: "3.10"}
3029
- {os: ubuntu-latest, r: "release", py: "3.11"}
3130
- {os: ubuntu-latest, r: "release", py: "3.12"}
3231
- {os: ubuntu-latest, r: "release", py: "3.13"}
32+
- {os: ubuntu-latest, r: "release", py: "3.14"}
33+
3334

3435
env:
3536
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Config/reticulate:
1616
License: MIT + file LICENSE
1717
Encoding: UTF-8
1818
Roxygen: list(markdown = TRUE)
19-
RoxygenNote: 7.3.2
19+
RoxygenNote: 7.3.3
2020
Depends:
2121
R (>= 3.5.0),
2222
reticulate (>= 1.41)

NEWS.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
# f1dataR (development version)
22

33
* Updated code to match new `reticulate` interface for package and environment management.
4-
* Updated tests to use `vcr` package to reduce hits on the Jolpica API
4+
* Updated tests to use `vcr` package to reduce hits on the Jolpica API.
55
* Removed support for FastF1 v < 3.0 (now causes errors instead of warnings).
66
* Test suite and automated testing changes to reflect the above changes.
7-
* Fixed a data conversion issue in `time_to_sec()` (#290)
8-
* Updated testing to comply with changes in ggplot2 (#292)
7+
* Refactored out `case_match` which was deprecated from `dplyr`.
8+
* Fixed a data conversion issue in `time_to_sec()` (#290).
9+
* Updated testing to comply with changes in `ggplot2` (#292).
10+
* Updated data conversions to avoid bugs after changes in Jolpica database. (#281, #284, #298, #299)
911

1012
# f1dataR 2.0.1
1113

1214
* Forced fail-over from Ergast to Jolpica (still deprecated at 'warn' level).
13-
* Fixed a pre-season bug where Jolpica API was missing a column in load_season().
14-
* Fixed a bug resulting from a change in API for 2025 season - Thanks to @appiehappie999 (#277)
15+
* Fixed a pre-season bug where Jolpica API was missing a column in `load_season()`.
16+
* Fixed a bug resulting from a change in API for 2025 season - Thanks to @appiehappie999. (#277)
1517

1618
# f1dataR 2.0.0
1719

1820
* Deprecated Ergast and moved to Jolpica API for Ergast Functions. While this is not a breaking change in the code syntax, the documentation changes significantly to reflect this and a new major version is appropriate. (#268)
19-
* Bugfix in plot_fastest().
20-
* Bugfix in load_results() with pagination - Thanks to @awanderingspirit. (#272)
21+
* Bugfix in `plot_fastest()`.
22+
* Bugfix in `load_results()` with pagination - Thanks to @awanderingspirit. (#272)
2123
* Bugfix in README. (#267)
2224

2325
# f1dataR 1.6.0

R/plot_fastest.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ plot_fastest <- function(season = get_current_season(), round = 1, session = "R"
8787
race_name <- s$event$EventName
8888

8989
if (!(session %in% c("r", "R"))) {
90-
race_name <- dplyr::case_match(
90+
race_name <- dplyr::recode_values(
9191
session,
9292
c("q", "Q") ~ paste0(race_name, " Qualifying"),
9393
c("s", "S") ~ paste0(race_name, " Sprint"),

R/plotting_style.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ get_driver_style <- function(driver, season = get_current_season(), round = 1) {
8080

8181
driverstyle$driver <- driver
8282
driverstyle$abbreviation <- py_env$abbreviation
83-
driverstyle$marker <- dplyr::case_match(driverstyle$marker,
83+
driverstyle$marker <- dplyr::recode_values(driverstyle$marker,
8484
"o" ~ 16,
8585
"x" ~ 4,
86-
.default = 2
86+
default = 2
8787
)
8888

8989
return(driverstyle)

tests/testthat/test-clear_f1_cache.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ test_that("Cache Clearing works for memoised functions to file", {
1717

1818
expect_false(memoise::has_cache(load_schedule)())
1919
vcr::local_cassette("clear_cache")
20-
tmp <- load_schedule()
21-
expect_true(memoise::has_cache(load_schedule)())
20+
tmp <- load_schedule(season = 2025)
21+
expect_true(memoise::has_cache(load_schedule)(season = 2025))
2222
clear_f1_cache()
23-
expect_false(memoise::has_cache(load_schedule)())
23+
expect_false(memoise::has_cache(load_schedule)(season = 2025))
2424
})
2525

2626

vignettes/alonso-penalty-2024.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ long_telem_alo <- alo_telem %>%
7373
names_to = "param",
7474
values_to = "value"
7575
) %>%
76-
dplyr::mutate(param = dplyr::case_match(
76+
dplyr::mutate(param = dplyr::recode_values(
7777
param,
7878
"speed" ~ "Speed (kph)",
7979
"n_gear" ~ "Gear",
@@ -117,7 +117,7 @@ long_telem_rus <- rus_telem %>%
117117
values_to = "value"
118118
) %>%
119119
dplyr::filter(!(param == "distance_to_driver_ahead" & value > 50)) %>%
120-
dplyr::mutate(param = dplyr::case_match(
120+
dplyr::mutate(param = dplyr::recode_values(
121121
param,
122122
"speed" ~ "Speed (kph)",
123123
"n_gear" ~ "Gear",

vignettes/alonso-penalty-2024.Rmd.orig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ long_telem_alo <- alo_telem %>%
8585
names_to = "param",
8686
values_to = "value"
8787
) %>%
88-
dplyr::mutate(param = dplyr::case_match(
88+
dplyr::mutate(param = dplyr::recode_values(
8989
param,
9090
"speed" ~ "Speed (kph)",
9191
"n_gear" ~ "Gear",
@@ -121,7 +121,7 @@ long_telem_rus <- rus_telem %>%
121121
values_to = "value"
122122
) %>%
123123
dplyr::filter(!(param == "distance_to_driver_ahead" & value > 50)) %>%
124-
dplyr::mutate(param = dplyr::case_match(
124+
dplyr::mutate(param = dplyr::recode_values(
125125
param,
126126
"speed" ~ "Speed (kph)",
127127
"n_gear" ~ "Gear",

0 commit comments

Comments
 (0)