-
Notifications
You must be signed in to change notification settings - Fork 51
feat(core): search pagination using next_page #1745
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
base: develop
Are you sure you want to change the base?
Conversation
Code Coverage (Ubuntu)
Diff against develop
Results for commit: 3650993 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
c369f38
to
9a72163
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SearchResult.next_page()
got refactored in order to be able to run:
prods = dag.search(**query_args)
# then
for new_page in prods.next_page(update=False):
print(f"Got {len(new_page)} more products")
# or
from collections import deque
deque(prods.next_page())
print(f"Got {len(prods)} products")
Code Coverage (Windows)
Diff against develop
Results for commit: 3650993 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
46745a7
to
5facfb1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
search fails on usgs_satapi_aws
Introduces
SearchResult.next_page()
method that returns an iterator to help dealing with pagination and iterating over pages.Deprecates
page
parameter insearch()
method, andsearch_iter_page()
.