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: Validate how locations are referenced from stop_times.stop_id #960

Merged

Conversation

aababilov
Copy link
Collaborator

  • every stop (or platform) should have stop times
  • every non-stop location (station, entrance etc) may not have stop times

We produce one notice per location to avoid producing too many notices.

* every stop (or platform) should have stop times
* every non-stop location (station, entrance etc) may not have stop times

We produce one notice per location to avoid producing too many notices.
@aababilov
Copy link
Collaborator Author

I am not updating NOTICES.md since we plan to dissolve/remove this file.

@aababilov
Copy link
Collaborator Author

This PR is open-sourcing a validator rule used at Google.

@lionel-nj
Copy link
Contributor

Closing and reopening to apply the workflow defined in #953 that aims at checking code formatting.

@lionel-nj lionel-nj closed this Aug 16, 2021
@lionel-nj lionel-nj reopened this Aug 16, 2021
RULES.md Outdated Show resolved Hide resolved
Copy link
Contributor

@lionel-nj lionel-nj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @aababilov, one question: how are boarding areas treated? From #961 it seems that a boarding area should be allowed to have stop_times only if its parent station has location_type=0, if it is not the case then it should not. If said boarding area qualifies to have stop_times, then it should be used.

@barbeau thoughts?

@lionel-nj lionel-nj mentioned this pull request Aug 18, 2021
7 tasks
@aababilov
Copy link
Collaborator Author

This is a good question! Our current spec for stop_times.stop_id says:

Referenced locations must be stops/platforms, i.e. their stops.location_type value must be 0 or empty.

So, boarding areas may not be referenced from stop_times.

@lionel-nj
Copy link
Contributor

Makes senses @aababilov! Thanks for working on that. Could you fix this please, and then we'll be good to merge.

Copy link
Contributor

@lionel-nj lionel-nj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @aababilov! LGTM.

@lionel-nj lionel-nj merged commit d029165 into MobilityData:master Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants