This repository was archived by the owner on Jun 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 92
Convenience properties for when API is next available #150
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also simplifies the loading of mock response in api status test, and adds missing requirement to setup.py
There might be better, more distinctive names I could use for the new properties. |
Cool, very useful. Did you look into why the 3.9 test failed? |
It was a server load error. If you could manually trigger a re-run, I think it should pass. |
Server-side test failure again |
Sometime this week, I'll make a PR to use mock responses for the test that keeps failing, so we're not dependent on Overpass not having any issues at the particular moment the test is run. |
Merged the mock_response from #153 into this PR, in the hopes that it makes everything a little easier to review. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds two properties that synthesize existing API status properties to answer the question, "when can I next query Overpass?" One returns an
int
of seconds until the API can next be queried (with0
meaning the API is available now), the other returns a UTCdatetime
representing when the API can next be queried, orNone
if the API is available now. This is useful when the client has been making frequent calls to Overpass and may be blocked for a period of time.