Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #44 +/- ##
==========================================
+ Coverage 89.71% 91.40% +1.68%
==========================================
Files 17 17
Lines 885 884 -1
==========================================
+ Hits 794 808 +14
+ Misses 91 76 -15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds batch_size parameter support to multiple entity operations (create, delete, upsert, and delete_columns) for better workload tuning, particularly when encountering timeouts or rate limiting (429s). The PR addresses issues #42 and #43.
Key changes:
- Made
batch_sizea required parameter in the internal_batch_api_callmethod with a default of 500 applied at call sites - Added
batch_sizeparameter toentity.delete(),entity.upsert(), andentity.delete_columns()methods - Removed default value from
chunk_data()function signature to enforce explicit batch size specification
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| dataverse_api/_api.py | Made batch_size required parameter in _batch_api_call, moved default handling to callers |
| dataverse_api/entity.py | Added batch_size parameter to create, delete, upsert, and delete_columns methods; applied 500 as default at call sites |
| dataverse_api/dataverse.py | Added batch_size parameter to submit_batch method with default of 500 |
| dataverse_api/utils/batching.py | Removed default value from chunk_data function signature |
| tests/test_entity.py | Added type ignore comments and fixed test data from single dict to list format |
| tests/test_dataverse.py | Added batch_size parameter to test call and added assertion for request body |
| coverage.xml | Updated coverage statistics |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Closes #42
Closes #43
Also adds
batch_sizetoentity.delete().