Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ jobs:
- {os: windows-latest, r: "release", py: "3.x" }
- {os: ubuntu-latest, r: "devel", py: "3.x", http-user-agent: "release"}
- {os: ubuntu-latest, r: "oldrel-1", py: "3.x" }
- {os: ubuntu-latest, r: "release", py: "3.9" }
- {os: ubuntu-latest, r: "release", py: "3.10"}
- {os: ubuntu-latest, r: "release", py: "3.11"}
- {os: ubuntu-latest, r: "release", py: "3.12"}
- {os: ubuntu-latest, r: "release", py: "3.13"}
- {os: ubuntu-latest, r: "release", py: "3.14"}


env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand Down
16 changes: 9 additions & 7 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
# f1dataR (development version)

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

# f1dataR 2.0.1

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

# f1dataR 2.0.0

* 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)
* Bugfix in plot_fastest().
* Bugfix in load_results() with pagination - Thanks to @awanderingspirit. (#272)
* Bugfix in `plot_fastest()`.
* Bugfix in `load_results()` with pagination - Thanks to @awanderingspirit. (#272)
* Bugfix in README. (#267)

# f1dataR 1.6.0
Expand Down
2 changes: 1 addition & 1 deletion R/plot_fastest.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ plot_fastest <- function(season = get_current_season(), round = 1, session = "R"
race_name <- s$event$EventName

if (!(session %in% c("r", "R"))) {
race_name <- dplyr::case_match(
race_name <- dplyr::recode_values(
session,
c("q", "Q") ~ paste0(race_name, " Qualifying"),
c("s", "S") ~ paste0(race_name, " Sprint"),
Expand Down
4 changes: 2 additions & 2 deletions R/plotting_style.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ get_driver_style <- function(driver, season = get_current_season(), round = 1) {

driverstyle$driver <- driver
driverstyle$abbreviation <- py_env$abbreviation
driverstyle$marker <- dplyr::case_match(driverstyle$marker,
driverstyle$marker <- dplyr::recode_values(driverstyle$marker,
"o" ~ 16,
"x" ~ 4,
.default = 2
default = 2
)

return(driverstyle)
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-clear_f1_cache.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ test_that("Cache Clearing works for memoised functions to file", {

expect_false(memoise::has_cache(load_schedule)())
vcr::local_cassette("clear_cache")
tmp <- load_schedule()
expect_true(memoise::has_cache(load_schedule)())
tmp <- load_schedule(season = 2025)
expect_true(memoise::has_cache(load_schedule)(season = 2025))
clear_f1_cache()
expect_false(memoise::has_cache(load_schedule)())
expect_false(memoise::has_cache(load_schedule)(season = 2025))
})


Expand Down
4 changes: 2 additions & 2 deletions vignettes/alonso-penalty-2024.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ long_telem_alo <- alo_telem %>%
names_to = "param",
values_to = "value"
) %>%
dplyr::mutate(param = dplyr::case_match(
dplyr::mutate(param = dplyr::recode_values(
param,
"speed" ~ "Speed (kph)",
"n_gear" ~ "Gear",
Expand Down Expand Up @@ -117,7 +117,7 @@ long_telem_rus <- rus_telem %>%
values_to = "value"
) %>%
dplyr::filter(!(param == "distance_to_driver_ahead" & value > 50)) %>%
dplyr::mutate(param = dplyr::case_match(
dplyr::mutate(param = dplyr::recode_values(
param,
"speed" ~ "Speed (kph)",
"n_gear" ~ "Gear",
Expand Down
4 changes: 2 additions & 2 deletions vignettes/alonso-penalty-2024.Rmd.orig
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ long_telem_alo <- alo_telem %>%
names_to = "param",
values_to = "value"
) %>%
dplyr::mutate(param = dplyr::case_match(
dplyr::mutate(param = dplyr::recode_values(
param,
"speed" ~ "Speed (kph)",
"n_gear" ~ "Gear",
Expand Down Expand Up @@ -121,7 +121,7 @@ long_telem_rus <- rus_telem %>%
values_to = "value"
) %>%
dplyr::filter(!(param == "distance_to_driver_ahead" & value > 50)) %>%
dplyr::mutate(param = dplyr::case_match(
dplyr::mutate(param = dplyr::recode_values(
param,
"speed" ~ "Speed (kph)",
"n_gear" ~ "Gear",
Expand Down
Loading