You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason will be displayed to describe this comment to others. Learn more.
Left small comments - only big comment, and maybe it's too late.. I think I prefer all_tasks to tasks_all but if it is too late... (I think it might be.. 😅 ) - I'm fine.
Left small comments - only big comment, and maybe it's too late.. I think I prefer all_tasks to tasks_all but if it is too late... (I think it might be.. 😅 ) - I'm fine.
@shaun-scale
No, it's not too late. Actually, there is a bit gray area on how to name those methods (get/fetch/list/retrieve/$s).
Existing methods were named as tasks and projects (as named per endpoint). I also renamed list_batches to batches to be consistent with the existing naming.
For naming new yield/generator methods, some prefer _yield or _gen suffixes, making sense for differentiation but more developer-oriented. I'm open to discussing that, and it's not a big change either.
We can use all as a pre-fix as well, and this is better for grammar! I was thinking of an auto-complete scenario where IDE provides the other method when a dev types client.task
Another alternative is to use get_tasks() and get_batches() since we already have singular versions to retrieve one, and plural ones can serve to retrieve the list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Python SDK v2.0 development completed.
More details are available in the migration guide and will be provided in Release Notes.
You can refer to the internal PRD as well.
High level summary:
Object model updates:
as_dict()introduced to access object as a dictNew ways to retrieve the list of tasks/batches:
tasks_listandbatches_listare the new generator methods for bulk retrievalAPI:
Infra improvements:
pre-commitfor a better/consistent developer experiencepublish.shintroduced for an automated publish to PyPIpytesttest cases are addedDocumentation
Testing results with pytest: