MobilityData / gtfs-validator

Canonical GTFS Validator project for schedule (static) files.
https://gtfs-validator.mobilitydata.org/
Apache License 2.0
286 stars 100 forks source link

feat: Include service window in Summary report #1534

Closed emmambd closed 4 weeks ago

emmambd commented 1 year ago

Describe the problem

Currently, the summary section of the validation report shares the feed_start_date and feed_end_date when it's provided. However, many feeds don't include feed_info.txt, which makes it difficult to know the service window at a glance.

Proposed solution

Design considerations

Alternatives you've considered

No response

Additional context

qcdyx commented 1 year 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?

emmambd commented 1 month ago

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."

Alessandro100 commented 1 month ago

Focus on the Service date range. Majority service window later

Split ticket

  1. Service date range
  2. Majority service window
  3. Add service date range to API
  4. service date range 'expired' state

Tasks [] Calculate the service date range [] Unit test [] Add service date range for UI and JSON report [] Acceptance test review

qcdyx commented 1 month ago

For Clarification: Do we use the word "to" to connect the start date and end date or some other characters? @emmambd

image
emmambd commented 1 month ago

@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!

qcdyx commented 1 month ago

@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?

emmambd commented 1 month ago

@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.

qcdyx commented 1 month ago

@emmambd I don't have a specific example. I'm just wondering if I should add that logic.

emmambd commented 1 month ago

@qcdyx Got it - it shouldn't happen but it is a possible edge case. Example would be:

Service Date Range: January 2, 2025