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

Flex: Update stop schema and add missing_stop_id rule #1754

Closed
emmambd opened this issue May 9, 2024 · 2 comments
Closed

Flex: Update stop schema and add missing_stop_id rule #1754

emmambd opened this issue May 9, 2024 · 2 comments
Labels
enhancement New feature request or improvement on an existing feature flex Rules and rule changes related to GTFS-Flex. status: Blocked Can't work on it currently because of an external factor.

Comments

@emmambd
Copy link
Contributor

emmambd commented May 9, 2024

Describe the problem

In order to support Flex as a part of #1721, we need to

  1. modify the stop schema so stop_id is no longer a required field
  2. add a new rule for missing_stop_id and checks for ids across stop_id, location_group_id, and locations.id

Proposed solution

File name Spec language Notice to update or add Validator logic Notice table columns
stops.txt, location_groups.txt, locations.geojson In stops.txt:

stop_id

ID must be unique across all `stops.stop_id`, locations.geojson `id`, and `location_groups.location_group_id` values.

In stop_times.txt:

stop_id **Required** if `stop_times.location_group_id` AND `stop_times.location_id` are NOT defined.
-

New notice to address use case that was previously covered in missing_required_field:

missing_stop_id

ERROR: Generate if there is no stop_id, location_group_id, OR location_id


Description should specify that the producer should add stop_id to stops.txt

lineNumber and tripId

Alternatives you've considered

No response

Additional context

This seems to be the most substantial change to the previous files and requirements of the spec from the new Flex changes. We're curious to hear from consumers about this modification and the work required for them to incorporate this change.

@emmambd emmambd added enhancement New feature request or improvement on an existing feature status: Needs triage Applied to all new issues labels May 9, 2024
@emmambd emmambd changed the title Update stop schema and add missing_stop_id rule Flex: Update stop schema and add missing_stop_id rule May 9, 2024
@emmambd emmambd added flex Rules and rule changes related to GTFS-Flex. status: Blocked Can't work on it currently because of an external factor. and removed status: Needs triage Applied to all new issues labels May 9, 2024
@davidgamez
Copy link
Member

Tasks:

  • Investigate if it's possible to keep the same missing required field notice in case of non-flex feeds

@emmambd emmambd added this to the Flex: modifying pre-existing rules milestone May 14, 2024
@emmambd
Copy link
Contributor Author

emmambd commented May 15, 2024

After further clarification, this change is not required. stop_id is still required in all cases where stops.txt is still provided. The decision to define stops.txt as conditionally required is an ongoing discussion in the spec: google/transit#452

@emmambd emmambd closed this as completed May 15, 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 flex Rules and rule changes related to GTFS-Flex. status: Blocked Can't work on it currently because of an external factor.
Projects
None yet
Development

No branches or pull requests

2 participants