-
Notifications
You must be signed in to change notification settings - Fork 15
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
PB-974: Migration from trias to ojp for transport stop requests #4487
PB-974: Migration from trias to ojp for transport stop requests #4487
Conversation
Guess this has been moved to another PR by @rebert during deploy, when changing the base branch. |
yes, it is not possible to merge develop towards master with open prs on develop |
Yes, sorry for bugging the deploy process and thanks for moving the commmits 🙏 |
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.
PR title should be updated and CI is not passing
Yes, need to adapt CI to use the new secrets, will hopefully find some time for that, soon. |
Well by mocking we should not need any credential because no access to the real service should be done, unit test should not do any access to the service so they should pass even if the service is down |
054d38c
to
75011f8
Compare
with self.assertRaises(opentransapi.OpenTransNoStationException): | ||
api.get_departures("invalid_id") | ||
|
||
@patch.object(opentransapi.OpenTrans, "send_post") |
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.
I guess this test can as well be deleted.
Here we only test, if the side_effect() works basically 😉
@rebert @ltshb : Guess now this PR is ready for review. |
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.
lgtm. but I'm not allowed to approve :-)
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.
Unittest mocking needs adaptation as well as API key need to be removed from CI
6170a0c
to
80520a9
Compare
Please re-check the PR. |
80520a9
to
c8fb3c4
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.
There is still some issues with the unittest in the CI
Thanks! Forgot to push the updated Pipfile(.lock), should now be fixed |
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.
Code looks good but still have an issue with the CI
lgtm too. But I would rebase and fix the codebuild error. |
5de9dbf
to
d1e09e3
Compare
d1e09e3
to
1ecefdc
Compare
The API we use to get time table data for open transport stops will be decomissioned soon. Hence we migrate to OJP 2.0. The requests to the API and the parsing of the response needed some adaptions for that. Furthermore, the OJP 2.0 API's response sometimes has a strange timestamp format, there are sometimes 7 instead of the expexted 6 digits for the milliseconds. Hence a try except was used to safely convert to the expected format in that cases. Also some minor code clean-up was done.
…eleted superfluous comments
1ecefdc
to
574db1a
Compare
574db1a
to
a15b6b2
Compare
Originally there were separate test files for opentransapi and the stationboard. This is now again the case, also several test cases got lost, which were re-added again. Also added dependencies in order to fix TypeError: __init__() got an unexpected keyword argument 'management'
a15b6b2
to
57444a6
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.
LGTM, but I am the wrong one to approve, since I cannot approve my own code 😉
No description provided.