Skip to content

Feat/more batch size settings#44

Merged
MarcusRisanger merged 6 commits intomainfrom
feat/more-batch-size-settings
Nov 19, 2025
Merged

Feat/more batch size settings#44
MarcusRisanger merged 6 commits intomainfrom
feat/more-batch-size-settings

Conversation

@MarcusRisanger
Copy link
Owner

Closes #42
Closes #43

Also adds batch_size to entity.delete().

@MarcusRisanger MarcusRisanger self-assigned this Nov 19, 2025
@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

❌ Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.40%. Comparing base (e945861) to head (41f0cd7).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
dataverse_api/dataverse.py 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_size a required parameter in the internal _batch_api_call method with a default of 500 applied at call sites
  • Added batch_size parameter to entity.delete(), entity.upsert(), and entity.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.

@MarcusRisanger MarcusRisanger added the enhancement New feature or request label Nov 19, 2025
@MarcusRisanger MarcusRisanger merged commit f5c227f into main Nov 19, 2025
8 checks passed
@MarcusRisanger MarcusRisanger deleted the feat/more-batch-size-settings branch December 4, 2025 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add batch size to upsert Add batch size setting for CreateMultiple

2 participants