InjectiveLabs / sdk-python

Injective Exchange API for Python clients
Apache License 2.0
41 stars 29 forks source link

Fix/sync dev with v151 #325

Closed aarmoa closed 6 months ago

aarmoa commented 6 months ago

Summary by CodeRabbit

coderabbitai[bot] commented 6 months ago

Walkthrough

The update primarily adjusts compatibility with a new version of the protobuf library across various Python files, changing how JSON representations of messages are handled. Additionally, the project's dependency versions for aiohttp and urllib3 are modified, and new entries for derivative pairs are added to configuration files for different network environments.

Changes

File Path Change Summary
CHANGELOG.md, pyproject.toml Updated dependency versions and adapted to new protobuf standards.
pyinjective/composer.py, .../utils/grpc_api_... Replaced including_default_value_fields=True with always_print_fields_with_no_presence=True in various methods.
pyinjective/denoms_devnet.ini, pyinjective/denoms_mainnet.ini Added new derivative pairs and adjusted tick sizes in network configurations.
tests/test_composer.py Updated test functions to align with new protobuf parameters.

🐇💻 In the land of code, where the bits align,
A rabbit hopped, through lines so fine.
With a flick of its tail, updates unfurl,
Protobuf dances, new worlds swirl.
Cheers to changes, the rabbit's delight,
In the glow of the screen, it hops through the night. 🌌🌟


Recent Review Details **Configuration used: .coderabbit.yaml** **Review profile: CHILL**
Commits Files that changed from the base of the PR and between d921dcaad53e0942d1e72371e74391c8e94f7766 and ad3f2f608fc8817d4de22ca1f3632b14b054eb1d.
Files selected for processing (1) * tests/test_composer.py (31 hunks)
Additional Context Used
Ruff (7)
tests/test_composer.py (7)
24-24: Redefinition of unused `inj_usdt_spot_market` from line 13 --- 24-24: Redefinition of unused `btc_usdt_perp_market` from line 10 --- 24-24: Redefinition of unused `first_match_bet_market` from line 11 --- 42-42: Redefinition of unused `inj_token` from line 12 --- 43-43: Redefinition of unused `inj_usdt_spot_market` from line 13 --- 1195-1195: Redefinition of unused `test_msg_cancel_derivative_order` from line 960 --- 1359-1359: Redefinition of unused `test_msg_external_transfer` from line 1270
Additional comments not posted (20)
tests/test_composer.py (20)
`205-205`: Change in `json_format.MessageToDict` argument aligns with `protobuf` library update. --- `236-236`: Change in `json_format.MessageToDict` argument aligns with `protobuf` library update. --- `277-277`: Change in `json_format.MessageToDict` argument aligns with `protobuf` library update. --- `340-340`: Change in `json_format.MessageToDict` argument aligns with `protobuf` library update. --- `406-406`: Change in `json_format.MessageToDict` argument aligns with `protobuf` library update. --- `449-449`: Change in `json_format.MessageToDict` argument aligns with `protobuf` library update. --- `496-496`: Change in `json_format.MessageToDict` argument aligns with `protobuf` library update. --- `545-545`: Change in `json_format.MessageToDict` argument aligns with `protobuf` library update. --- `582-582`: Change in `json_format.MessageToDict` argument aligns with `protobuf` library update. --- `631-631`: Change in `json_format.MessageToDict` argument aligns with `protobuf` library update. --- `659-659`: Change in `json_format.MessageToDict` argument aligns with `protobuf` library update. --- `686-686`: Change in `json_format.MessageToDict` argument aligns with `protobuf` library update. --- `789-789`: Change in `json_format.MessageToDict` argument aligns with `protobuf` library update. --- `814-814`: Change in `json_format.MessageToDict` argument aligns with `protobuf` library update. --- `866-866`: Change in `json_format.MessageToDict` argument aligns with `protobuf` library update. --- `904-904`: Change in `json_format.MessageToDict` argument aligns with `protobuf` library update. --- `956-956`: Change in `json_format.MessageToDict` argument aligns with `protobuf` library update. --- `997-997`: Change in `json_format.MessageToDict` argument aligns with `protobuf` library update. --- `1023-1023`: Change in `json_format.MessageToDict` argument aligns with `protobuf` library update. --- `1087-1087`: Change in `json_format.MessageToDict` argument aligns with `protobuf` library update.
---
Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.