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

feat: allow to download results from all pages #787

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

anesson-cs
Copy link
Collaborator

@anesson-cs anesson-cs commented Aug 9, 2023

Fixes #133

After searching some products, we can now download the ones from all pages of this search by setting exhaust to True in download_all() method parameters.

It works by saving some elements in several objects:

  • search params in SearchResults object to search next pages of the search
  • list of crunchers in SearchResults object to apply them on next pages and to skip a crunch if it has already been applied on the object
  • list of search params in EODataAccessGateway object to skip a page when it has already been requested

Then, 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.

  • Add units tests

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

Test Results

       4 files  ±0         4 suites  ±0   5m 44s ⏱️ -16s
   401 tests ±0     399 ✔️ ±0    2 💤 ±0  0 ±0 
1 604 runs  ±0  1 544 ✔️ ±0  60 💤 ±0  0 ±0 

Results for commit 480239a. ± Comparison against base commit f2ac36b.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

Code Coverage (Ubuntu)

File Coverage
All files 81%

Minimum allowed coverage is 70%

Generated by 🐒 cobertura-action against 480239a

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

Code Coverage (Windows)

File Coverage
All files 76%

Minimum allowed coverage is 70%

Generated by 🐒 cobertura-action against 480239a

@sbrunato sbrunato marked this pull request as draft January 24, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

handle search results pagination with a generator
1 participant