-
Notifications
You must be signed in to change notification settings - Fork 2
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: support returning and resuming partial results #17
Merged
Commits on Aug 14, 2024
-
feat: support returning and resuming partial results
Add a parameter `keep_failed` to `Dials.list_all()`, specifying whether to return the paginated partial results when an HTTP request fails. Add a parameter `resume_from` to `Dials.list_all()` to accept paginated partial results and resume the fetching. Add a field `exception` to `PaginatedBaseModel` to record the exception that causes the request to fail. If applied, users would be able to write something like: ```python data = None data = dials.h1d.list_all(<filter>, keep_failed=True, resume_from=data) ``` and resume by <Up><Enter> from the terminal.
Configuration menu - View commit details
-
Copy full SHA for 3abbb79 - Browse repository at this point
Copy the full SHA 3abbb79View commit details
Commits on Oct 29, 2024
-
feat: support returning and resuming partial results
Add a parameter `keep_failed` to `Dials.list_all()`, specifying whether to return the paginated partial results when an HTTP request fails. Add a parameter `resume_from` to `Dials.list_all()` to accept paginated partial results and resume the fetching. Add a field `exception` to `PaginatedBaseModel` to record the exception that causes the request to fail. If applied, users would be able to write something like: ```python data = None data = dials.h1d.list_all(<filter>, keep_failed=True, resume_from=data) ``` and resume by <Up><Enter> from the terminal.
Configuration menu - View commit details
-
Copy full SHA for 622704b - Browse repository at this point
Copy the full SHA 622704bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 925606f - Browse repository at this point
Copy the full SHA 925606fView commit details -
Configuration menu - View commit details
-
Copy full SHA for a79bf88 - Browse repository at this point
Copy the full SHA a79bf88View commit details
Commits on Nov 4, 2024
-
refactor: disable arbitrary_types_allowed in PaginatedBaseModel and s…
…tore exc as string - In pydantic v1, model.schema() fails when using arbitrary types. More info: pydantic/pydantic#4079 - Since exception as BaseException has no uses for now, we can safely transform it to a string and also store the exc_type for future debug
Configuration menu - View commit details
-
Copy full SHA for dc06d4a - Browse repository at this point
Copy the full SHA dc06d4aView commit details -
feat: allow resuming even if no exception ocurred
- If we list an endpoint enforcing `max_pages`, we can return the last `next` string and resume from there
Configuration menu - View commit details
-
Copy full SHA for af89333 - Browse repository at this point
Copy the full SHA af89333View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ee5030 - Browse repository at this point
Copy the full SHA 9ee5030View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9452388 - Browse repository at this point
Copy the full SHA 9452388View commit details -
Configuration menu - View commit details
-
Copy full SHA for b3faaba - Browse repository at this point
Copy the full SHA b3faabaView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.