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

2024-12-06 — 1 new commit(s) made to reference.md in Google Transit's repo #1932

Open
mobilitydataio opened this issue Dec 6, 2024 · 0 comments
Assignees
Labels
status: Needs triage Applied to all new issues

Comments

@mobilitydataio
Copy link

mobilitydataio commented Dec 6, 2024

Commit Nº 1

AUTHOR × DATE

  • Tzu-Jen Chan ( tzujenchanmbd )
  • December 5, 2024 @ 12:55 PM ETC (05:55 PM UTC)

MESSAGE

[GTFS-Fares v2] Add fare_leg_join_rules.txt (#439)
* Add Effective Fare Leg to term definition
* Add fare_leg_join_rules.txt
* Modify fare_leg_rules for effective fare leg
* Add from/to_stop_id
* Update file desc for from/to_stop_id
* Editorial updates

FILES CHANGED

google/transit@7be58b0

https://github.com/google/transit/commit/7be58b00bce9955551668d9aa1bf5c8c93e8839a

NEW RULE DETAILS

Describe the new validation rules

Related spec language Rationale for rule Notice name to update or add Pseudologic Notice table columns Severity Notice description
networks.network_id, fare_leg_join_rules.from_network_id, fare_leg_join_rules.to_network_id from_network_id and to_network_id are required missing_required_column If (networks.txt does not exist AND network_id field does not exist in routes.txt):

Do not trigger a notice and ignore subsequent checks

If from_network_id column does not exist or to_network id column does not exist:

Trigger Notice and do not check for missing_required_field

FieldName,

Filename

ERROR A required column is missing in the input file.
networks.network_id, fare_leg_join_rules.from_network_id, fare_leg_join_rules.to_network_id from_network_id and to_network_id are required missing_required_field If the checks for missing_required_column above are complete and do not generate a notice, then:

If from_network_id is empty and to_network_id is empty:

Trigger Notice and do not check for foreign_key_violation

csvRowNumber,

FieldName,

Filename

ERROR A required field is missing.

The given field has no value in some input row, even though values are required.

networks.network_id, fare_leg_join_rules.from_network_id, fare_leg_join_rules.to_network_id from_network_id and to_network_id should exist in networks.txt foreign_key_violation If the checks for missing_required_column and missing_required_field above are complete and do not generate a notice, then:

If the value for from_network_id does not exist in networks.network_id or routes.network_id) or the value for to_network_id does not exist in (networks.txt or routes.txt):

Trigger Notice

childFieldName,

childFilename,

csvRowNumber,

fieldValue,

parentFieldName,

parentFilename

ERROR Wrong foreign key.

A foreign key references the primary key of another file. A foreign key violation means that the foreign key referenced from a given row (the child file) cannot be found in the corresponding file (the parent file). The Foreign keys are defined in the specification under "Type" for each file.

stops.stop_id, fare_leg_join_rules.from_stop_id, fare_leg_join_rules.to_stop_id from_stop_id and to_stop_id are mutually required missing_required_field If (from_stop_id is not empty and to_stop_id is empty) or (from_stop_id is empty and to_stop_id is not empty):

Trigger Notice and do not check for foreign_key_violation

csvRowNumber,

FieldName,

Filename

ERROR A required field is missing.

The given field has no value in some input row, even though values are required.

stops.stop_id, fare_leg_join_rules.from_stop_id, fare_leg_join_rules.to_stop_id from_stop_id and to_stop_id should exist in stops.txt foreign_key_violation If the checks for missing_required_field above are complete and do not generate a notice, then:

If from_stop_id value does not exist in stops.txt or to_stop_id value does not exist in stops.txt:

Trigger Notice

childFieldName,

childFilename,

csvRowNumber,

fieldValue,

parentFieldName,

parentFilename

ERROR Wrong foreign key.

A foreign key references the primary key of another file. A foreign key violation means that the foreign key referenced from a given row (the child file) cannot be found in the corresponding file (the parent file). The Foreign keys are defined in the specification under "Type" for each file.

Sample GTFS datasets

Severity

ERROR

Additional context

@mobilitydataio mobilitydataio added the status: Needs triage Applied to all new issues label Dec 6, 2024
@emmambd emmambd added this to the 7.0 Validator Release milestone Jan 6, 2025
@emmambd emmambd assigned skalexch and unassigned emmambd Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: Needs triage Applied to all new issues
Projects
None yet
Development

No branches or pull requests

3 participants