shinnytech / tqsdk-python

天勤量化开发包, 期货量化, 实时行情/历史数据/实盘交易
https://doc.shinnytech.com/tqsdk/latest
Apache License 2.0
3.57k stars 648 forks source link

[Tqsdk-Ci] Update Version 3.5.6 #478

Closed shinny-hongyan closed 5 months ago

shinny-hongyan commented 5 months ago

Automated changes by create-pull-request GitHub action

Summary by CodeRabbit

coderabbitai[bot] commented 5 months ago
Walkthrough ## 概述 此次更新主要包括版本号从`3.5.5`升级至`3.5.6`,并在广州期货交易所的功能中增加了查询主力合约的支持。同时,增强了API的功能,引入了多种交易所的常量,并优化了授权验证逻辑。 ## 更改 | 文件路径 | 更改摘要 | |----------------------|------------------------------------------------------------------------| | PKG-INFO, setup.py, .../__version__.py | 版本号更新从`3.5.5`到`3.5.6`。 | | doc/conf.py, doc/version.rst | 为`query_quotes`函数增加了查询广州期货交易所主力合约的修复。 | | tqsdk/api.py | 在`query_quotes`和`query_cont_quotes`函数中添加了`GFEX`。引入了`tqsdk.constants`中的`FUTURE_EXCHANGES`。| | tqsdk/auth.py | 更新了引用常量和包版本的导入语句。在`_has_md_grants`和`_has_td_grants`方法中使用了交易所常量进行特性检查。| | tqsdk/constants.py | 引入了不同类型交易所的常量,包括期货、股票、现货、KQ及KQD交易所。 | > 🐰✨ > 在代码的世界里跳跃, > 更新迭代不停歇。 > 版本升,问题解, > 期货新界,探索不已。 > 🌟📈

Recent Review Details **Configuration used: CodeRabbit UI**
Commits Files that changed from the base of the PR and between f8a5887c224b9083c464e040b75471653c120cfd and ff91e117490ed083789e7c7580234194c7afb0f2.
Files selected for processing (8) * PKG-INFO (1 hunks) * doc/conf.py (1 hunks) * doc/version.rst (1 hunks) * setup.py (1 hunks) * tqsdk/__version__.py (1 hunks) * tqsdk/api.py (5 hunks) * tqsdk/auth.py (4 hunks) * tqsdk/constants.py (1 hunks)
Files skipped from review due to trivial changes (5) * PKG-INFO * doc/conf.py * setup.py * tqsdk/__version__.py * tqsdk/constants.py
Additional comments not posted (5)
tqsdk/auth.py (4)
`13-14`: 更新了导入语句,直接从 `tqsdk.constants` 和 `tqsdk.__version__` 中导入所需的常量和版本信息。这种做法有助于减少命名空间污染,并提高代码的可读性。 --- `53-53`: 在 HTTP 请求头中动态插入版本号是一个好的实践,这可以帮助服务器识别请求来自哪个版本的客户端,有助于调试和监控。 --- `152-154`: 在 `_has_md_grants` 方法中,通过检查符号是否属于不同的交易所类别来决定是否有市场数据权限。这种方法提高了代码的灵活性和可维护性。 --- `164-166`: 在 `_has_td_grants` 方法中,同样通过检查符号是否属于股票交易所或期货交易所来决定交易权限。这种做法确保了权限检查的一致性和准确性。
doc/version.rst (1)
`5-8`: 更新版本记录清晰明了,正确地记录了对 `tqsdk.TqApi.query_quotes` 函数的改进,使其能够查询广州期货交易所 GFEX 的主连合约和主力合约。
---
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.