Closed emmambd closed 4 weeks ago
Hello @emmambd I started evaluating this issue, could you add more use cases like when calendar.txt and calendar_dates.txt coexists, which one is preferred?
In terms of how to display this in the validator, as a simple starting point I'd suggest:
Under Feed Info: • Service date range • Majority service window range with a tool tip to clarify what this is. E.g. "The date range when a significant number of trips are running. This helps detect when a single trip makes a feed appear "active" even though the bulk of service is no longer running."
Focus on the Service date range. Majority service window later
Split ticket
Tasks [] Calculate the service date range [] Unit test [] Add service date range for UI and JSON report [] Acceptance test review
For Clarification: Do we use the word "to" to connect the start date and end date or some other characters? @emmambd
@qcdyx That works!
I'd be curious if the service date range always matches what it's feed_info.txt when it's present...things to play with in QA!
@emmambd Clarifying questions:
What if earlistStartDate is null and latestEndDate is not null? Do we display "Service Date Range: N/A" or just the not null Date?
@qcdyx Can you share the feed as an example? This would mean there's only 1 service date in use for the whole feed, right?
In this case, we should just include the 1 day with no dashes.
@emmambd I don't have a specific example. I'm just wondering if I should add that logic.
@qcdyx Got it - it shouldn't happen but it is a possible edge case. Example would be:
Service Date Range: January 2, 2025
Describe the problem
Currently, the summary section of the validation report shares the
feed_start_date
andfeed_end_date
when it's provided. However, many feeds don't includefeed_info.txt
, which makes it difficult to know the service window at a glance.Proposed solution
Add full service date range to summary report. Calculation here
Pseudologic for the date range here:
When only
calendars.txt
is used: Loop through all services referenced with a trip_id intrips.txt
. Loop through all those services with a trip_id incalendars.txt
. check that there have anstart_date
andend_date
- take the earliest start date and the latest end date When onlycalendar_dates.txt
is used: Loop through all services referenced with a trip_id intrips.txt
. Loop through all those services incalendar_dates.txt
. Take the earliest date and the latest date When both are used: Loop through all services referenced with a trip_id intrips.txt
. Calculate the earliest start date and the latest end date for each service with a trip_id usingcalendars.txt
, and then check to make sure there isn't a service exception incalendar_dates.txt
on either of those datesDesign considerations
Alternatives you've considered
No response
Additional context