-
Notifications
You must be signed in to change notification settings - Fork 119
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
Integration tests for Geofabrik Overpass API #959
Conversation
Adding TestOverpass.py
Workflow file runs the shell script. Shell script sets up emission environment and runs TestOverpass.py.
Adding commands to workflow to get a sense of why it's not running.
Running with the correct path this time (I think)
Adding runner permissions for setup script.
Currently, tests 2 and 3 only call the free version of the API to make calls. There are a few ways that come to mind to change this:
I think the answer is a combination of 2 and 3, but I'd like some feedback from @shankari on my tests before deciding what to do |
@nataliejschultz high-level question: why do we need to keep the configuration in a file? There is a single variable in the file. |
Change that integrates the paid overpass API with not only the integration test, but the overall functionality of match_stops.py
Figuring out why tests are passing locally and failing on github actions with prints.
Adding some prints to see if I can pinpoint the issue. Also removing more unnecessary fluff from setup script.
Call isn't going through and I think it's because i'm using http instead of https. This might be a security restriction with GitHub Actions.
Forgot to change this in the match stops module, too.
Getting `module not found` error with __future__, so adding it as a direct import to see if that fixes the error. Also adding more specificity to the echo in the .yml file
adding import just caused another error. Testing now that I updated the api key.
Coming back to this as I wait for review on other PRs.
I made sure that using This readies the code to use the overpass key for calls in both the tests and any usage of match_stops.py. Tests passing on GitHub Actions and locally: |
Changing environment variable name and adding functionality for the new setup script name.
Addressing e-mission/e-mission-docs#1036
As of now, there are three tests in the TestOverpass.py module:
test_overpass
, which compares a call to the free version of overpass with a call to the geofabrik versiontest_get_stops_near
, which passes a set of coordinates (as a list inside a dictionary) toget_stops_near
inmatch_stops.py
.test_get_predicted_transit_mode
, which passes two sets of coordinates toget_predicted_transit_mode
inmatch_stops.py
.