Closed aarmoa closed 7 months ago
The update involves a significant overhaul of the codebase, focusing on centralizing cookies management and metadata handling for gRPC calls. This restructuring emphasizes direct method calls over lambda functions and introduces a structured approach to managing cookies and metadata through the CookieAssistant
class and its variants. These changes aim to enhance code readability, maintainability, and consistency in creating API instances for testing purposes.
Files | Change Summary |
---|---|
CHANGELOG.md |
Refactored cookies management logic to utilize all gRPC calls' responses for updating current cookies. |
pyinjective/async_client.py .../core/network.py .../utils/grpc_api_request_assistant.py .../utils/grpc_api_stream_assistant.py |
Replaced lambda functions with direct method calls, centralized metadata handling using CookieAssistant , and simplified code structure. |
tests/client/chain/grpc/... tests/client/indexer/grpc/... tests/client/indexer/stream_grpc/... tests/core/... |
Streamlined API instance creation in tests using a new method _api_instance and updated cookie management tests. |
🐰✨
In the realm of code where the data flows,
A refactor vast, in the wind it blows.
With cookies managed and metadata neat,
Our code now dances with nimble feet.
Cheers to the changes, to simplicity we toast,
From every function to each test post.
🎉🐇
Attention: Patch coverage is 91.97861%
with 15 lines
in your changes are missing coverage. Please review.
Project coverage is 76.98%. Comparing base (
8adf955
) to head (378e2ac
).
Files | Patch % | Lines |
---|---|---|
pyinjective/core/network.py | 78.87% | 10 Missing and 5 partials :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
https://injective-labs.atlassian.net/browse/CHAIN-20?atlOrigin=eyJpIjoiZDFlNmFlOWJjNjdkNGI3NjgwN2QwOTcyZDI3MDA2NzUiLCJwIjoiaiJ9
Summary by CodeRabbit