CUTR-at-USF / OpenTripPlanner-for-Android

An Android app for multi-modal trip planning and navigation using any OpenTripPlanner server.
Other
129 stars 91 forks source link

Improve process of adding new servers #410

Open barbeau opened 10 years ago

barbeau commented 10 years ago

A few times servers have been added to the OTP directory with bad bounds (e.g., overlapping with other regions, or encompassing large areas outside of routable coverage), spaces in fields, etc. We should improve the process to add new servers so there is less of a chance for error (i.e., better validation), as well as reduce the impact of errors on existing servers as much as possible.

Two ideas come to mind:

  1. Add server directory validation unit tests to OTP Android - We could run these tests manually after inserting a new record in the spreadsheet to ensure that the contents are valid. The test would also be run via Travis, so if things changed they would be caught the next time that Travis CI was triggered
  2. Add active field to OTP Directory - This field would initially be set to FALSE for new OTP servers in the directory, and then switched to TRUE after the server was validated. Additionally, OTP Android would only use active regions during normal execution. This would reduce the impact of things like bounds errors, so clients for existing regions wouldn't be impacts by errors in new regions (since the new region would be validated in an inactive state).
vreixo commented 10 years ago

@barbeau this sounds great! I'm creating the first simple tests these days and I almost have ready one that would match your proposal.

2014-09-05 15:27 GMT+02:00 Sean Barbeau notifications@github.com:

A few times servers have been added to the OTP directory with bad bounds (e.g., overlapping with other regions, or encompassing large areas outside of routable coverage), spaces in fields, etc. We should improve the process to add new servers so there is less of a chance for error (i.e., better validation), as well as reduce the impact of errors on existing servers as much as possible.

Two ideas come to mind:

  1. Add server directory validation unit tests to OTP Android - We could run these tests manually after inserting a new record in the spreadsheet to ensure that the contents are valid. The test would also be run via Travis, so if things changed they would be caught the next time that Travis CI was triggered
  2. Add active field to OTP Directory - This field would initially be set to FALSE for new OTP servers in the directory, and then switched to TRUE after the server was validated. Additionally, OTP Android would only use active regions during normal execution. This would reduce the impact of things like bounds errors, so clients for existing regions wouldn't be impacts by errors in new regions (since the new region would be validated in an inactive state).

— Reply to this email directly or view it on GitHub https://github.com/CUTR-at-USF/OpenTripPlanner-for-Android/issues/410.

barbeau commented 10 years ago

Awesome! Thanks @vreixo for working on this!

vreixo commented 9 years ago

@barbeau I have commented test of #257 as it's explained there, because it would fail with new changes.

I think that may be a good idea to add some tests, that would even try to plan a trip with all listed servers to activate that proposed filed to check that they're really working. In order to do this we could add some well known working coordinates related with each server in the directory, to avoid problems with network transportation coverage.

Even more interesting would be to try to generate step-by-step instructions from the obtained trip to be sure that all the system is working.

It's just an idea that came to my mind to really check if all is working, although it might be too complicated or prone to false errors :-)

This time it's just an idea, because I don't have spare time to work on the app right now :-)