v0.13.0
0.13.0
(December 11th, 2023)
This version of bavapi
is expected to be the last beta version before a release candidate.
Feature
- 🎉
bavapi
will now retry page requests upon failure. You can control the number of retry attempts with theretries
parameter in top-level functions and theClient
interface. - 🎉 It is now possible to control the behavior of errors in the request process. If
on_errors
is set to"warn"
(default), successful requests will be returned and a warning will be issued detailing which pages resulted in errors and each exception associated with it. Ifon_errors
is set to"raise"
(old behavior) instead, an exception will be raised as soon as any request fails. - 🎉 Added
bav_study
andreleased
filters tostudies
endpoint function and method.
Changes
- 🚀 Reduced the size of the initial request to 1 item if a paginated request is detected for improved performance.
- 🚀 Paginated requests are now performed in batches instead of starting every request from the start. This should mitigate several issues (like SSL errors) with large queries and improve overall run times. You can control this behavior through the
batch_size
andn_workers
parameters in top-level functions and theClient
interface. - 🔨 Instead of having failed requests immediately raise exceptions,
bavapi
will continue downloading pages, collect successful responses, and warn the user about the pages that failed to be collected. This can be controlled by theon_errors
parameter in top-level functions and theClient
interface. - ✨ Using
bavapi.Query
instances in request functions and methods will now combine method parameters with parameters in the query object. Parameters specified in the query object will take precedence over parameters specified in the function or method. Filter values in the method parameters will be ignored if the query object contains filters.
Fix
- 🐛 Refactored the expanding step of the result parsing pipeline to fix undefined behavior when multiple expandable columns are found in the result.
Internal
- 🧹 Removed trailing whitespaces
- 🔨 New data fetching algorithm based on asynchronous workers.
- 🐛 Fixed unmatched checkout action versions in
ci
. - 🔨 Refactored filter consolidation logic to avoid unnecessary copies of parameters.
Docs
- 📓 Added clarification about prefixed column names in
brandscape-data
endpoint results. - ✨ Various improvements to documentation, focused on warnings/tips and code snippets.
Test
- 🧪 Added tests for new
_batched
and_fetcher
modules. - 🧪 Added new test case for
parsing.responses
to test correct behavior with multiple expandable columns in the response. - 🧪 Added new tests for query consolidation logic.
- 🔧 Fixed
HTTPClient
tests to work with new architecture. - ✨ Simplified integration tests thanks to the new retry functionality