diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION new file mode 100644 index 0000000..6cedbb3 --- /dev/null +++ b/CRAN-SUBMISSION @@ -0,0 +1,3 @@ +Version: 2.0.1 +Date: 2026-11-05 19:18:27 UTC +SHA: 7d97095347953c4c51209ac8a8f7e49be58e88d0 diff --git a/DESCRIPTION b/DESCRIPTION index cdda045..37dc3ee 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Type: Package Package: gtfstools Title: General Transit Feed Specification (GTFS) Editing and Analysing Tools -Version: 2.0.0.9000 +Version: 2.0.1 Authors@R: c( person("Daniel", "Herszenhut", , "dhersz@gmail.com", role = "aut", comment = c(ORCID = "0000-0001-8066-1105")), diff --git a/NEWS.md b/NEWS.md index c48335f..28c41ee 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# gtfstools (development version) +# gtfstools v2.0.1 ## Bug fixes @@ -12,7 +12,6 @@ and return correct estimates for overnight trips. - `filter_by_weekday()` now warns when the GTFS object has no `calendar` table, instead of silently returning it unchanged. Its documentation now states that services defined only in `calendar_dates` are never related to a weekday (use `filter_by_date()` to consider them). - `validate_gtfs()` now raises an error when `n_threads` is not a whole number, as documented, instead of passing it to the validator. - ## New features - New function `fix_overnight_times()` rewrites the times of trips that run past midnight but are written as early morning times (e.g. `"00:30:00"` instead of `"24:30:00"`), as required by the GTFS specification. `fix_gtfs()` now runs it before capping speeds and filling blank stop times, so these trips are no longer left with blank times. diff --git a/R/validate_gtfs.R b/R/validate_gtfs.R index c314159..8b00a54 100644 --- a/R/validate_gtfs.R +++ b/R/validate_gtfs.R @@ -26,9 +26,10 @@ #' @param quiet A logical. Whether to hide informative messages. Defaults to #' `TRUE`. #' @param n_threads An integer. Control how many threads are used during the -#' validation. Defaults to 1. Values larger than the number of cores in the -#' running machine, or than the number of free R connections, are capped to -#' the smaller of these numbers. +#' validation. Defaults to 1. Values larger than the number of CPUs available +#' to the R session (as reported by [parallelly::availableCores()]), or than +#' the number of free R connections, are capped to the smaller of these +#' numbers. #' #' @return Invisibly returns the normalized path to the directory where the #' validation results were saved to. diff --git a/cran-comments.md b/cran-comments.md index bd36ac2..699da3d 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,11 +1,26 @@ +**This is a resubmission to fix bugs** + ## R CMD check results -── R CMD check results ─────────────────────────────────────── gtfstools 2.0.0 ──── -Duration: 11m 27.6s +── R CMD check results ─────────────────────────────────────────────────────────── gtfstools 2.0.1 ──── +Duration: 7m 25.4s 0 errors ✔ | 0 warnings ✔ | 0 notes ✔ +## Bug fixes + +- gtfstools functions now accept `dt_gtfs` objects whose tables were turned into tibbles, grouped data frames or plain data frames by other packages (e.g. after `dplyr::group_by()`). With `by_reference = TRUE`, an object with any such table now raises an informative error, since the edits can't be made by reference on a converted copy: convert it first with `as_dt_gtfs()` (#130, reported by @baarthur, who also opened PR #132). +- Several functions that involved estimating trip speed and duration would +drop trips that cross midnight if GTFS input had times in 00:MM:SS, which +disrespects the GTFS standard to report times as 24:MM:SS in such cases. +This bug has been fixed. Now all functions that calculate or change durations +and speeds now fix these times using a new function `fix_overnight_times()` +and return correct estimates for overnight trips. +- `filter_by_weekday()` now warns when the GTFS object has no `calendar` table, instead of silently returning it unchanged. Its documentation now states that services defined only in `calendar_dates` are never related to a weekday (use `filter_by_date()` to consider them). +- `validate_gtfs()` now raises an error when `n_threads` is not a whole number, as documented, instead of passing it to the validator. + + ## Notes - Change in package maintainer from Daniel to Rafael diff --git a/man/validate_gtfs.Rd b/man/validate_gtfs.Rd index c88b3aa..5926a55 100644 --- a/man/validate_gtfs.Rd +++ b/man/validate_gtfs.Rd @@ -40,9 +40,10 @@ Defaults to \code{FALSE}.} \code{TRUE}.} \item{n_threads}{An integer. Control how many threads are used during the -validation. Defaults to 1. Values larger than the number of cores in the -running machine, or than the number of free R connections, are capped to -the smaller of these numbers.} +validation. Defaults to 1. Values larger than the number of CPUs available +to the R session (as reported by \code{\link[parallelly:availableCores]{parallelly::availableCores()}}), or than +the number of free R connections, are capped to the smaller of these +numbers.} } \value{ Invisibly returns the normalized path to the directory where the