-
Notifications
You must be signed in to change notification settings - Fork 44
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
feat: allow to download results from all pages #787
base: develop
Are you sure you want to change the base?
Conversation
Code Coverage (Ubuntu)
Minimum allowed coverage is Generated by 🐒 cobertura-action against 480239a |
Code Coverage (Windows)
Minimum allowed coverage is Generated by 🐒 cobertura-action against 480239a |
480239a
to
654017c
Compare
Code Coverage (Ubuntu)
Diff against develop
Results for commit: 555375b Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Code Coverage (Windows)
Diff against develop
Results for commit: 555375b Minimum allowed coverage is ♻️ This comment has been updated with latest results |
9c58e01
to
e08e53c
Compare
e08e53c
to
3f5d1a1
Compare
'SearchResult' class could not be imported before the rebase due to a circular import
…rom download_all() input products
3f5d1a1
to
5bedf51
Compare
5bedf51
to
555375b
Compare
Fixes #133
After searching some products, we can now download the ones from all pages of this search by setting
exhaust
toTrue
indownload_all()
method parameters (False
by default).It works by saving some elements in several objects:
SearchResults
object to search next pages of the searchSearchResults
object to apply them on next pages and to skip a crunch if it has already been applied on the objectEODataAccessGateway
object to skip a page when it has already been requestedThen, the
search_iter_page()
is called to search products from all pages by skipping the one already found.Finally, if there are other products, they are added to the initial
SearchResults
object.