Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Include service window in Summary report #1534

Closed
emmambd opened this issue Jul 13, 2023 · 9 comments · Fixed by #1837
Closed

feat: Include service window in Summary report #1534

emmambd opened this issue Jul 13, 2023 · 9 comments · Fixed by #1837
Assignees
Labels
enhancement New feature request or improvement on an existing feature

Comments

@emmambd
Copy link
Contributor

emmambd commented Jul 13, 2023

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

  • 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 in trips.txt. Loop through all those services with a trip_id incalendars.txt. check that there have an start_date and end_date - take the earliest start date and the latest end date
    When only calendar_dates.txt is used: Loop through all services referenced with a trip_id in trips.txt. Loop through all those services in calendar_dates.txt. Take the earliest date and the latest date
    When both are used: Loop through all services referenced with a trip_id in trips.txt. Calculate the earliest start date and the latest end date for each service with a trip_id using calendars.txt , and then check to make sure there isn't a service exception in calendar_dates.txt on either of those dates

Design considerations

  • The summary report is getting busy (example here). How do we make sure this info fits and is intuitive?

Alternatives you've considered

No response

Additional context

  • Include both feed date range and service range
  • In the future, calculate based on majority of dates
  • Look at other validators' approach to calendar dates, e.g Google Partner Dashboard
    No response
@emmambd emmambd added enhancement New feature request or improvement on an existing feature status: Needs triage Applied to all new issues labels Jul 13, 2023
@qcdyx qcdyx self-assigned this Aug 7, 2023
@qcdyx qcdyx added status: Work in progress A PR that would close this issue has been opened. and removed status: Needs triage Applied to all new issues labels Aug 7, 2023
@qcdyx
Copy link
Contributor

qcdyx commented Aug 7, 2023

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 emmambd changed the title Include service availability date range in Summary report Include service interval date range in Summary report Aug 8, 2023
@emmambd emmambd added status: Needs triage Applied to all new issues and removed status: Work in progress A PR that would close this issue has been opened. labels Aug 8, 2023
@emmambd emmambd changed the title Include service interval date range in Summary report Include majority service window in Summary report Aug 14, 2023
@emmambd emmambd changed the title Include majority service window in Summary report Include service window in Summary report Aug 14, 2023
@fredericsimard fredericsimard moved this to Requires investigation in Bug triage Aug 31, 2023
@emmambd emmambd moved this to MobilityData backlog (enhancements) in Schedule Validator Q2 backlog Dec 7, 2023
@emmambd emmambd added this to the Now milestone Jan 9, 2024
@emmambd emmambd added status: Needs discussion We need a discussion on requirements before calling this issue ready and removed status: Needs triage Applied to all new issues labels Jan 11, 2024
@emmambd emmambd modified the milestones: Now , Next Mar 4, 2024
@emmambd emmambd modified the milestones: Next, Now Mar 21, 2024
@emmambd
Copy link
Contributor Author

emmambd commented Aug 26, 2024

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
Copy link

Alessandro100 commented Aug 27, 2024

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

@emmambd emmambd removed the status: Needs discussion We need a discussion on requirements before calling this issue ready label Sep 3, 2024
@emmambd emmambd removed this from the Now milestone Sep 4, 2024
@emmambd emmambd added this to the 6.0 Validator Release milestone Sep 4, 2024
@qcdyx
Copy link
Contributor

qcdyx commented Sep 5, 2024

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

@emmambd
Copy link
Contributor Author

emmambd commented Sep 5, 2024

@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
Copy link
Contributor

qcdyx commented Sep 9, 2024

@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
Copy link
Contributor Author

emmambd commented Sep 9, 2024

@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
Copy link
Contributor

qcdyx commented Sep 9, 2024

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

@emmambd
Copy link
Contributor Author

emmambd commented Sep 9, 2024

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

Service Date Range: January 2, 2025

@qcdyx qcdyx linked a pull request Sep 10, 2024 that will close this issue
5 tasks
@qcdyx qcdyx changed the title Include service window in Summary report feat: Include service window in Summary report Sep 13, 2024
@github-project-automation github-project-automation bot moved this from MobilityData backlog (enhancements) to Done in Schedule Validator Q2 backlog Sep 25, 2024
@github-project-automation github-project-automation bot moved this from Requires investigation to Done in Bug triage Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature request or improvement on an existing feature
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants