Skip to content

Logic to update the Seal of Reliability #1761

Description

@Alessandro100

Write a shared function that would update the feed.seal_of_reliability property. With tests

Current Logic (SUBJECT TO MINOR CHANGES -- TO VERIFY)

Official: confirmed to be created on behalf of the transit agency
For at least six months
Stable: URL has not changed and appears to be permanent (no fixed dates or seasons in the URL)
Available: It returns a successful HTTP response/can be downloaded each day
Compliant: It has 0 errors in the GTFS Schedule Validator
Fresh: 
It has at least 7 days of future service coverage, based on GTFS best practices
There is continuous service coverage from the start and end of each dataset 

Grace period
If a feed is not available or fresh, the agency has 7 days to update to keep their badge. A 2 day gap in continuous service coverage is accepted.
If a feed has an error, the agency has 30 days to fix the error to keep their badge

We tested our Mobility Database feeds against this definition. [41% of the GTFS Schedule data meets this definition](https://metabase.mobilitydatabase.org/question/394-prospective-level-1-feeds-6-months-threshold-with-30-day-grace-period), showing that this bar is achievable, but still not met by slightly over half of all agencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions