Closed aarmoa closed 4 months ago
[!IMPORTANT]
Review skipped
Review was skipped due to path filters
Files ignored due to path filters (1)
* `poetry.lock` is excluded by `!**/*.lock`You can disable this status message by setting the
reviews.review_status
tofalse
in the CodeRabbit configuration file.
The recent update to version 1.5.3 of the project includes several key changes. The key
parameter in the PaginationOption
class was renamed to encoded_page_key
, and the handling of pagination keys was adjusted to improve functionality. A new example file demonstrates making paginated requests with an async client, and tests were added to ensure the correct behavior of pagination features. Additionally, the project's version was updated in the configuration file.
File Path | Change Summary |
---|---|
CHANGELOG.md |
Documented changes for version 1.5.3, including modifications to PaginationOption and pagination error fixes. |
examples/chain_client/9_PaginatedRequestExample.py |
Introduced a new example for making paginated requests using an async client. |
pyinjective/async_client.py |
Modified pagination key handling in initialize_tokens_from_chain_denoms method. |
pyinjective/client/model/pagination.py |
Renamed key parameter to encoded_page_key in PaginationOption class and updated related logic. |
pyproject.toml |
Updated project version from 1.5.2 to 1.5.3. |
tests/client/chain/grpc/test_chain_grpc_auth_api.py |
Renamed key parameter to encoded_page_key in PaginationOption instantiation. |
tests/client/model/test_pagination.py |
Added new tests for PaginationOption class. |
sequenceDiagram
participant User
participant ExampleScript as 9_PaginatedRequestExample.py
participant AsyncClient as async_client.py
participant PaginationOption as pagination.py
participant Network as network.py
User->>ExampleScript: Run script
ExampleScript->>Network: Setup network
ExampleScript->>AsyncClient: Fetch total supply (initial)
AsyncClient->>PaginationOption: Create pagination request
PaginationOption->>AsyncClient: Return paginated request
AsyncClient->>ExampleScript: Return initial result
loop Fetch subsequent pages
ExampleScript->>AsyncClient: Fetch total supply (next page)
AsyncClient->>PaginationOption: Create pagination request
PaginationOption->>AsyncClient: Return paginated request
AsyncClient->>ExampleScript: Return next page result
end
ExampleScript->>User: Display total supply data
In code we trust, with keys anew,
Paginated dreams come true,
Async flows and tests that gleam,
Version bumped, a coder's dream.
From Rabbit's warren, changes sprout,
A better path, there's no doubt.
🐇✨
Fixes CHAIN-123
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
key
parameter toencoded_page_key
in pagination-related functionalities for better clarity.Tests
PaginationOption
class to validate pagination request creation and handle various scenarios.Chores