Skip to content

feat(config): make trips-for-route running windows configurable#810

Open
cotishq wants to merge 1 commit into
OneBusAway:mainfrom
cotishq:feat/configurable-trips-for-route-windows
Open

feat(config): make trips-for-route running windows configurable#810
cotishq wants to merge 1 commit into
OneBusAway:mainfrom
cotishq:feat/configurable-trips-for-route-windows

Conversation

@cotishq
Copy link
Copy Markdown
Contributor

@cotishq cotishq commented Apr 4, 2026

Summary

This PR resolves #800 by making trips-for-route activity windows configurable instead of hardcoded.

Previously, trips-for-route used fixed values:

  • running late window: 30m
  • running early window: 10m

Now both are configurable via config.json while preserving the same defaults.

What changed

  • Added config fields:
    • running-late-window (seconds, default 1800)
    • running-early-window (seconds, default 600)
  • Wired these values through app config into GTFS runtime config (time.Duration).
  • Updated trips_for_route_handler to use configured windows with default fallback behavior.
  • Added validation to reject negative values.
  • Updated docs and config artifacts:
    • README.markdown
    • config.schema.json
    • config.example.json
    • config.docker.example.json
  • Updated tests for config loading/validation and handler window behavior.

Backward compatibility

  • Existing behavior is unchanged when these fields are not provided.
  • Defaults remain:
    • late: 30m
    • early: 10m

Issue

Closes #800

@cotishq cotishq force-pushed the feat/configurable-trips-for-route-windows branch from b74d528 to 8c3c4ff Compare April 16, 2026 12:34
@cotishq
Copy link
Copy Markdown
Contributor Author

cotishq commented Apr 16, 2026

@Ahmedhossamdev hey can you review this and let me know what changes it still requires before getting merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make trips-for-route runningLateWindow and runningEarlyWindow configurable

1 participant