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

Including networks, route_networks files causing false positive errors #1756

Open
evansiroky opened this issue May 11, 2024 · 3 comments · May be fixed by #1766
Open

Including networks, route_networks files causing false positive errors #1756

evansiroky opened this issue May 11, 2024 · 3 comments · May be fixed by #1766
Assignees
Labels
bug Something isn't working (crash, a rule has a problem) status: Ready An issue that is ready to be worked on.

Comments

@evansiroky
Copy link

Describe the bug

The GTFS Schedule validator flags a false positive foreign_key_violation error upon validating a GTFS feed that includes the networks.txt and route_networks.txt files.

Steps/Code to Reproduce

Try to validate the following minimally reproducable GTFS feed here: test GTFS.zip.

Expected Results

No errors are raised.

Actual Results

A single foreign_key_violation error is raised.

Screenshots

No response

Files used

No response

Validator version

5.0.1

Operating system

Web-based validator tool.

Java version

No response

Additional notes

No response

@evansiroky evansiroky added bug Something isn't working (crash, a rule has a problem) status: Needs triage Applied to all new issues labels May 11, 2024
@emmambd emmambd added status: Ready An issue that is ready to be worked on. and removed status: Needs triage Applied to all new issues labels May 14, 2024
@qcdyx
Copy link
Contributor

qcdyx commented May 16, 2024

Hello @evansiroky thanks for reporting this issue. If you take a closer look at the description of the foreign_key_violation notice, you can find it's not about networks.txt and route_networks.txt. It says that fare_leg_rules.txt has a network_id "Bus", but not found in the parent file routes.txt which contains route_ids 1, 1, 3. cc @tzujenchanmbd

image

@evansiroky
Copy link
Author

Correct, I believe that this is a false positive error. The spec for routes.network_id says that this column is:

Conditionally Forbidden... if the route_networks.txt file exists.

Since the provided example feed contains the route_networks.txt file, I believe that the routes.network_id should not be set. Therefore, I believe the example feed is spec-compliant and the validator is outputting a false-positive error.

@qcdyx
Copy link
Contributor

qcdyx commented May 17, 2024

Ok, I see what you mean. #1764
cc @tzujenchanmbd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working (crash, a rule has a problem) status: Ready An issue that is ready to be worked on.
Projects
Status: Requires investigation
Development

Successfully merging a pull request may close this issue.

3 participants