Skip to content

Update routeID to be routeNumber in \tracking for consistency#295

Merged
alanna-zhou merged 5 commits into
masterfrom
alanna/tracking-fields
Apr 12, 2020
Merged

Update routeID to be routeNumber in \tracking for consistency#295
alanna-zhou merged 5 commits into
masterfrom
alanna/tracking-fields

Conversation

@alanna-zhou
Copy link
Copy Markdown
Contributor

@alanna-zhou alanna-zhou commented Apr 11, 2020

Overview

Right now /tracking requires routeID and returns routeID but the Android team helped me realize that our backend views the routeID in the GTFS data (string in the GTFS) but returns it as a routeNumber (type Number). So I needed to make that change so that backend is consistent. I didn't choose to modify this in the microservice, because the whole point of the python code is to abstract that away from having to deal with what the clients know about our backend.

Changes Made

Changed references of routeID to routeNumber and changed data type of string to number.
Updated docker compose to run locally.
Updated swagger docs to reflect new required field in request body and new field in response body.

Test Coverage

Works locally, will be pushing onto servers soon.

Related PRs or Issues

#293 updated

Screenshots

Screen Shot 2020-04-11 at 2 08 10 PM

Copy link
Copy Markdown
Contributor

@aliciaxw aliciaxw left a comment

Choose a reason for hiding this comment

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

great!

Copy link
Copy Markdown
Contributor

@raahimenon raahimenon left a comment

Choose a reason for hiding this comment

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

everything looks good to me

Comment thread src/utils/RealtimeFeedUtils.js Outdated
}

return Object.values(vehicles).find(v => v.routeID === routeID && v.tripID === tripID);
const vehicleData = Object.values(vehicles).find(v => parseInt(v.routeID) === routeNumber && v.tripID === tripID);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe split this into multiple lines

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.

4 participants