Skip to content

feat: Add a rule that stations (location_type 1) must be the parent_station of some stop (location_type 0).#1493

Merged
davidgamez merged 8 commits intoMobilityData:masterfrom
bradyhunsaker:stations
Jun 21, 2023
Merged

feat: Add a rule that stations (location_type 1) must be the parent_station of some stop (location_type 0).#1493
davidgamez merged 8 commits intoMobilityData:masterfrom
bradyhunsaker:stations

Conversation

@bradyhunsaker
Copy link
Copy Markdown
Contributor

Summary:

Part of #153.

The new notice is of type INFO because there is nothing in the specification or best practices stating that stations should have stops. There is a discussion about changing this in #1348.

As part of the change, this renames ParentLocationTypeValidator to the more general name ParentStationValidator.

For unit testing it is now necessary to consider two types of notices, so all "contains()" calls are changed to "containsExactly()" or "containsExactlyElementsIn()" to be sure that additional notices are not ignored.

Expected behavior:

If a location of type 1 (station) never appears as the parent station of a location of type 0 (stop/platform), then issue a notice.

Please make sure these boxes are checked before submitting your pull request - thanks!

This renames ParentLocationTypeValidator to the more general name ParentStationValidator.

For unit testing it is now necessary to consider two types of notices, so all "contains()" calls are changed to "containsExactly()" or "containsExactlyElementsIn" to be sure that additional notices are not ignored.
Copy link
Copy Markdown
Member

@davidgamez davidgamez left a comment

Choose a reason for hiding this comment

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

Hi @bradyhunsaker, few changes have been merged since your first PR regarding the notice documentation generation that impacts your contribution. I added a few comments to align this PR with the latest changes before approval.

@bradyhunsaker
Copy link
Copy Markdown
Contributor Author

Thanks, David! I accepted your suggested edit and removed the super() call. Any other comments?

@bradyhunsaker bradyhunsaker requested a review from davidgamez June 14, 2023 02:53
@davidgamez
Copy link
Copy Markdown
Member

Thanks, David! I accepted your suggested edit and removed the super() call. Any other comments?

Thanks, @bradyhunsaker. One more ask, Can you review the formatting(./gradlew goJF) and class imports? I'm sorry I typed my suggestions on Github and didn't have the proper formatting and missed an import.

@bradyhunsaker
Copy link
Copy Markdown
Contributor Author

OK. I'm wrestling with google-java-format right. I'm getting an error like this one:
sherter/google-java-format-gradle-plugin#68

I'll try again tomorrow.

@bradyhunsaker
Copy link
Copy Markdown
Contributor Author

Thanks. I managed to run google-java-format from a separate download rather than using gradlew. Of course it just made the change you gave.

@bradyhunsaker bradyhunsaker requested a review from davidgamez June 20, 2023 03:11
@bradyhunsaker
Copy link
Copy Markdown
Contributor Author

Thanks for the documentation fix.

The end-to-end test is now failing in validate_gradle_wrapper, but the error message looks like it's something with the system itself rather than the PR. I'm not familiar with this testing setup, so I could be wrong about that.

@bradyhunsaker bradyhunsaker requested a review from davidgamez June 21, 2023 02:18
@davidgamez
Copy link
Copy Markdown
Member

Thanks for the documentation fix.

The end-to-end test is now failing in validate_gradle_wrapper, but the error message looks like it's something with the system itself rather than the PR. I'm not familiar with this testing setup, so I could be wrong about that.

This is an intermittent issue downloading the gradle binary, I retried it and passed without issues. I'm approving and merging right now. Thanks for taking it to the end of the line!!

@davidgamez davidgamez merged commit eada0f4 into MobilityData:master Jun 21, 2023
@welcome
Copy link
Copy Markdown

welcome bot commented Jun 21, 2023

🥳 Congrats on getting your first pull request merged!

@bradyhunsaker bradyhunsaker deleted the stations branch June 23, 2023 03:09
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.

2 participants