Non-Test Changes for Rule Engine#1058
Conversation
b6edff9 to
529251c
Compare
…into pr_split_non_tests
a2a9a44 to
e50e9f3
Compare
|
@JGreenlee I am not sure we need to cache values here; the public server has been able to handle our load from production for a while. And even if we do cache, do we have to check in the cached files? Which trips do they represent? (I assume the ones from the automated tests). And finally, we are using geofabrik on production, but it is not clear that other deployers are. If they use the public server, we will cache the results on their filesystem. Which is potentially OK, but we should then make sure that we don't run out of disk space. Note also that in general, if the pipeline is run "serverless" it will not have access to persistent storage other than the database. And even if we do store in the database, caching values precludes getting refreshes when there are new transit stops (e.g. a new BRT line https://metrobrtproject.com/) So basically, I think that caching the data is engineering overkill and should be implemented only if needed after the batching is in place |
|
@shankari These changes are not supposed to have any effect on production. They are just to help us test the rule engine without putting additional burden on the Overpass API
Yes, they represent trips from Previously, we did not have any tests for the rule engine. Now that we do (awaiting merge in #1057), we will make a ton of repetitive Overpass queries every time we run tests. |
But they are not checking for dev/prod, they are checking for whether we are connecting to geofabrik or to the default. And the connection is to the default (e.g. in the UNSW or the UToronto deployment), then the cached values will be both saved and loaded.
So then why are they part of the "non-test changes" for the rule engine. They should be part of #1039 e.g. something like https://medium.com/@everythingismindgame/mocking-the-network-call-with-unittest-python-51e9f42a28f9 |
These changes were part of #1039 and you had requested it to be split into #1057 and #1058.
Yes, much better. This can easily be converted to a mock, since it basically just puts a wrapper around |
Yes, sorry, I meant that, with the split, they should be part of #1057 since they are really only required for testing and these are the non-test changes. In fact, if we mock, I don't think that there will be any non-test changes. |
cd45974 to
30c4273
Compare
This PR implements two main changes:
Rule Engine Migration:
Transit Matching Caching:
Related Issues: