cityofaustin / atd-data-tech

Austin Transportation Data & Technology Services
17 stars 2 forks source link

Support MDS 0.4.0 #1088

Closed johnclary closed 4 years ago

johnclary commented 5 years ago

MDS 0.4.0 is ready to be used by the City of Austin.

We initially thought that there wasn't a branch for 0.4.0 yet, but it looks like it's in the master branch (best practice is to delete old branches that have been merged). There is a tag for it in master. See Release Notes

sergiogcx commented 4 years ago

Oh, alright! I will have to scan the endpoints and see if there is a working 0.4 endpoint I can test against

sergiogcx commented 4 years ago

Master branch schema (self note):

https://raw.githubusercontent.com/openmobilityfoundation/mobility-data-specification/e97e17a79350867844ca44e24ac1be36e05a10b2/provider/dockless/trips.json

sergiogcx commented 4 years ago

Test Date: 03/18/2018 Provider: Bird Supports MDS 0.4: ❌ Description: To prepare, I first check the request is valid for application/vnd.mds.provider+json;version=0.3 which it works. The next step is to look at version 4 (master) https://github.com/openmobilityfoundation/mobility-data-specification/tree/dev/provider#trips-query-parameters There appears MDS 4 only needs one parameter end_time and it will get the data for the next hour. Error: Whenever I change the header to application/vnd.mds.provider+json;version=0.4 and provide the only one parameter end_time the server returns an error: 406 Not Acceptable. I tried a series of changes to the headers but the result remains always the same.

2020-03-18_16-48-47.png

sergiogcx commented 4 years ago

Test Date: 03/18/2018 Provider: Lime Supports MDS 0.4: ✅ Description: It works as specified in https://github.com/openmobilityfoundation/mobility-data-specification/tree/dev/provider#trips-query-parameters

2020-03-18_16-50-07.png

sergiogcx commented 4 years ago

Test Date: 03/18/2018 Provider: Lyft Supports MDS 0.4: ✅ Description: It works as specified in https://github.com/openmobilityfoundation/mobility-data-specification/tree/dev/provider#trips-query-parameters

2020-03-18_16-55-25.png

sergiogcx commented 4 years ago

Test Date: 03/18/2018 Provider: Ojo Supports MDS 0.4: ❌ Description: To prepare, I first check the request is valid for application/vnd.mds.provider+json;version=0.3 which it works. The next step is to look at version 4 (master) https://github.com/openmobilityfoundation/mobility-data-specification/tree/dev/provider#trips-query-parameters There appears MDS 4 only needs one parameter end_time and it will get the data for the next hour. Error: Whenever I change the header to application/vnd.mds.provider+json;version=0.4 and provide the only one parameter end_time the server returns an error: 400 Bad Request. I tried providing the parameters as it was requested, but even then it would either return a 400 or a 500 Internal Server Error:

2020-03-18_17-00-15.png

sergiogcx commented 4 years ago

Test Date: 03/18/2018 Provider: Wheels Supports MDS 0.4: ❌ Description: To prepare, I first check the request is valid for application/vnd.mds.provider+json;version=0.3 which it works. Error: Whenever I change the header to application/vnd.mds.provider+json;version=0.4 and provide the only one parameter end_time the server returns an error: 400 Bad Request:

2020-03-18_17-02-57.png

sergiogcx commented 4 years ago

Test Date: 03/18/2018 Provider: Jump Supports MDS 0.4: ❌ Description: To prepare, I first check the request is valid for application/vnd.mds.provider+json;version=0.3 which it works. Error: Whenever I change the header to application/vnd.mds.provider+json;version=0.4 and provide the only one parameter end_time the server returns an error: 406 Not Acceptable:

It appears they are explicit they do not support MDS 0.4: 2020-03-18_17-12-40.png

2020-03-18_17-12-11.png

sergiogcx commented 4 years ago

Test Date: 03/18/2018 Provider: Spin Supports MDS 0.4: ❌ Description: Currently, Spin only supports MDS 0.2, which I made sure it ran successfully first. Error: Whenever I change the header to application/vnd.mds.provider+json;version=0.4 and provide the only one parameter end_time the server returns an error: 400 Bad Request:

2020-03-18_17-17-52.png

sergiogcx commented 4 years ago

I ran into a rabbit hole trying to implement unit-tests into the MDS-client library, which previously did not exist.

This took several hours, but now I have overcome the problem and fixed it. Now I can move on and make the necessary changes to have a working mds 0.4 library:

sergiogcx commented 4 years ago

MDS 0.4 is deployed to production (no errors presented, but no data yet either), it is just matter of closely monitoring until we get some data to make sure we are doing well

I did take some time to write unit tests for the mds client library, which had not done before, it’s only about 50 different tests to cover the basics, but so far things are looking good