Fetch according to geo coordinates #40
Conversation
Add ability to get coordinates for specific page and also perform search for pages with geo coordinates
wikipedia/wikipedia.py
Outdated
There was a problem hiding this comment.
add documentation for article_name
|
wikipedia/wikipedia.py
Outdated
wikipedia/wikipedia.py
Outdated
There was a problem hiding this comment.
still need a little more insight into the data structures here:
- can you link to the Mediawiki documentation page on geocordinates in a comment?
- what's in coordinates[1:]?
also, by "decimal" I meant the python Decimal type, as in:
from decimal import Decimal
one = Decimal("1.00")Decimal objects are the preferred format for lat/lon over floats and strings because of their precision and methods.
|
Almost there, thanks for correcting all of the minor details. One bigger thing left: tests! If you check the tests folder, you can see other examples of mocked out HTTP response data to make sure that Looking forward to merging after we have tests for geo coordinates! |
|
There was a problem hiding this comment.
what's the purpose of doing this instead of just importing decimal and testing if the Decimal objects are equal?
There was a problem hiding this comment.
Mostly because I don't really trust decimals.
I can change it if it's an issue.
When do you think that we can merge the new feature?
There was a problem hiding this comment.
Sorry, it looks great. This week is pretty busy for me, so I'll merge it in this weekend
There was a problem hiding this comment.
no worries :).
This is my first contribution so I kinda wanted to make it right.
Thanks and let me know if I can help in any way.
|
Mostly because I don't really trust decimals. |
|
I renamed search_loc to geosearch, just FYI. Thanks so much for your work on this pull request! I'll work on pushing v1.2 of wikipedia out to pip. |
|
Thank you. |
Ability to fetch articles using geo coordinates