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

Only warn if feed_contact_email or url are both unset. #1423

Closed
takohei opened this issue May 1, 2023 · 3 comments · Fixed by #1514
Closed

Only warn if feed_contact_email or url are both unset. #1423

takohei opened this issue May 1, 2023 · 3 comments · Fixed by #1514
Assignees
Labels
bug Something isn't working (crash, a rule has a problem) good first issue Good task for newcomers to work on. status: Work in progress A PR that would close this issue has been opened.

Comments

@takohei
Copy link

takohei commented May 1, 2023

Describe the bug

Best Practice recommends that at least one of feed_contact_email and feed_contact_url be provided in feed_info.txt.
https://gtfs.org/schedule/best-practices/#feed_infotxt

However, Validator raise a missing_recommended_field warning if either the email or the url is not provided.

Steps/Code to Reproduce

Validate test feed.
https://github.com/MobilityData/gtfs-validator/files/11365074/akocity_with_email.zip

Tested version: 4.0.0

Expected Results

No missing_recommended_field warning.

It is inappropriate to recommend that both be set, since some agencies only publish either an email address or a web form as their contact information.

Actual Results

A "missing_recommended_field" raised as follows

filename csvRowNumber
"feed_info.txt" 2

Screenshots

No response

Files used

akocity_with_email.zip

Validator version

4.0.0

Operating system

Windows

Java version

No response

Additional notes

Warnings for missing recommended fields in feed_info.txt was requested. #885

In response to that request, the recommended annotation feature (#1149) and the missing_recommended_field warning (#1157) were added.

At that time, recommended annotations were added to feed_contact_email and feed_contact_url, so that each is checked independently. #1156

It would be better to remove the recommended annotations for feed_contact_email and feed_contact_url and then add a check that at least one of them is set.

@takohei takohei added bug Something isn't working (crash, a rule has a problem) status: Needs triage Applied to all new issues labels May 1, 2023
@welcome
Copy link

welcome bot commented May 1, 2023

Thanks for opening your first issue in this project! If you haven't already, you can join our slack and join the #gtfs-validators channel to meet our awesome community. Come say hi 👋!

Welcome to the community and thank you for your engagement in open source! 🎉

@isabelle-dr
Copy link
Contributor

Hello @takohei, thank you for opening this issue and providing all this context!

You're right, at least one of feed_contact_email and feed_contact_url should be provided in feed_info.txt, the validator should only give a warning if the two are missing.
Thank you for flagging this, our team will look at this issue shortly.

@isabelle-dr isabelle-dr added status: Ready An issue that is ready to be worked on. good first issue Good task for newcomers to work on. and removed status: Needs triage Applied to all new issues labels May 1, 2023
@l646505418
Copy link

Hi, @isabelle-dr ,for this issue, maybe can add a specific function after load
issue
to check the NoticeContainer and adjust validationNotice accordingly.

@isabelle-dr isabelle-dr added this to the Now milestone Jun 12, 2023
@isabelle-dr isabelle-dr linked a pull request Jun 12, 2023 that will close this issue
4 tasks
@qcdyx qcdyx self-assigned this Jun 19, 2023
@qcdyx qcdyx added status: Work in progress A PR that would close this issue has been opened. and removed status: Ready An issue that is ready to be worked on. labels Jun 19, 2023
@emmambd emmambd removed this from the Now milestone Jan 9, 2024
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) good first issue Good task for newcomers to work on. status: Work in progress A PR that would close this issue has been opened.
Projects
5 participants