Skip to content
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

Implementation of advanced search #206

Merged
merged 22 commits into from
Mar 28, 2023
Merged

Implementation of advanced search #206

merged 22 commits into from
Mar 28, 2023

Conversation

BelKed
Copy link
Contributor

@BelKed BelKed commented Mar 25, 2023

This PR implements a new way of searching for caches using the search API, which allows using filters and much more (with the Geocaching.advanced_search() method).

This search method is also faster because it loads less data (the data is in JSON form). Data parsing is then easier and clearer.


Now we have a main search function — Geocaching.advanced_search().
Both Geocaching.search() and Geocaching.search_rect() internally use Geocaching.advanced_search(), which reduces repeating code, since the implementation would be almost the same.

I've also updated the docstrings for those functions and added some tests.


Related PR:


Related issues:

test/test_geocaching.py Show resolved Hide resolved
pycaching/geocaching.py Show resolved Hide resolved
pycaching/geocaching.py Outdated Show resolved Hide resolved
pycaching/geocaching.py Show resolved Hide resolved
@tomasbedrich
Copy link
Owner

Nice job overall. 💪🏼 It would definitely be useful to have another pair of eyes here.

Copy link
Collaborator

@FriedrichFroebel FriedrichFroebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. I have marked some additional oddities which probably should be resolved before merging.

pycaching/geocaching.py Outdated Show resolved Hide resolved
pycaching/geocaching.py Outdated Show resolved Hide resolved
pycaching/geocaching.py Outdated Show resolved Hide resolved
test/test_geocaching.py Outdated Show resolved Hide resolved
@BelKed
Copy link
Contributor Author

BelKed commented Mar 27, 2023

Weirdly, CI fails here, but it runs on my fork:
https://github.com/BelKed/pycaching/actions/runs/4533795088

@FriedrichFroebel
Copy link
Collaborator

I am not completely sure about the CI failures as well, but I do not really feel like this should be merged until we are able to resolve this. Maybe rebasing the code on the latest master change something here?

@BelKed
Copy link
Contributor Author

BelKed commented Mar 27, 2023

I believe it's fine now :)

@FriedrichFroebel
Copy link
Collaborator

Thanks, looks good for me. Re-requesting review from @tomasbedrich before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants