Skip to content
Merged
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
5 changes: 5 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ License MIT. Docs: <https://ipeagit.github.io/gtfstools/>.
`MEMORY.md`.
- **Code style.** Always use the convention `package::function()`. Exceptions
are functions from ggplot2 and special data.table operators such as `:=`.
- **Explicit argument names.** Never use positional arguments. Every
function call in R names its arguments explicitly, e.g.
`get_trip_length(gtfs = gtfs, trip_id = ids, unit = "km")`, never
`get_trip_length(gtfs, ids, unit = "km")`. (Values passed through `...`,
as in `c()` or `paste0()`, have no argument name to give.)

Conventions are in [`.claude/rules/r-package-conventions.md`](.claude/rules/r-package-conventions.md);
gates are in [`.claude/rules/quality-gates.md`](.claude/rules/quality-gates.md).
Expand Down
2 changes: 1 addition & 1 deletion R/build_graph.R
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ build_graph <- function(gtfs,
# 'frequencies' come from its start and end times, which are fixed too
# (fields of the wrong class are reported later, when they are used)

gtfs <- fix_overnight_in_call(gtfs, frequencies = TRUE)
gtfs <- fix_overnight_in_call(gtfs = gtfs, frequencies = TRUE)

network <- build_service_network(
gtfs,
Expand Down
2 changes: 1 addition & 1 deletion R/filter_by_time_of_day.R
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ filter_by_time_of_day <- function(gtfs,
# they are compared with the time of day as they should be. the returned
# feed keeps them fixed

gtfs <- fix_overnight_in_call(gtfs, frequencies = TRUE)
gtfs <- fix_overnight_in_call(gtfs = gtfs, frequencies = TRUE)

# if the gtfs contains a frequencies table, it's important to keep the
# stop_times of the trips listed in there intact.
Expand Down
2 changes: 1 addition & 1 deletion R/fix_gtfs.R
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ fix_gtfs <- function(
# fix times after midnight before the steps that use the times, which skip
# the spans that go back

gtfs_fixed <- fix_overnight_times(gtfs_fixed)
gtfs_fixed <- fix_overnight_times(gtfs = gtfs_fixed)

# cap max speed. this is done before interpolating, so the interpolated
# times follow the capped times
Expand Down
Loading
Loading