-
Notifications
You must be signed in to change notification settings - Fork 11
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
Slight refactoring of NTT code to prep for additional v3 changes #69
Slight refactoring of NTT code to prep for additional v3 changes #69
Conversation
7484788
to
77f56cd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for doing this cleanup!
A couple things caught my eye, mainly in mbta_api.py. Of course, these just reflect my opinions and i'm happy to be overridden on any of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Very sorry it took me this long to review. Thanks for taking this on!
Minor changes made:
cars
changed tovehicles
since Silver Line buses are tracked now as welldata
function totrains
since it fetches train dataLess minor changes made:
vehicle_data_for_routes()
andvehicle_array_is_new()
The idea behind these changes was to preserve the
test_mode
functionality while ensuring that data for all trains in the tracker was accurate - previous logic defined all trains as new whentest_mode
was active - current logic should still include all trains intest_mode
but their JSON data should accurately show whether or not they are newnewOnly
ingetTrainRoutePairsForLine()
Not going to lie, I only did this b/c it was the only way to get test mode to work with the changes I made described above. I am not sure why this was needed. Please double check this.
I did test these changes and trains are tracking properly, BUT I am not sure how this will affect interactions with the database, SO we should definitely consider that before merging this PR.