Repository navigation
feat: AkShare 数据源在界面下拉框中可选 - #22
Open
xuyixiao0224 wants to merge 1 commit into
Open
xuyixiao0224 wants to merge 1 commit into
xuyixiao0224 wants to merge 1 commit into
Conversation
AkShareSource 已完整实现且 create_data_source 与 _DEFAULT_SYMBOLS 均已支持, 但因列在 _HIDDEN_KINDS 中,界面无法选择,只能手改 settings.json 启用。 把 akshare 从 _HIDDEN_KINDS 移出并追加到 DATA_SOURCE_CHOICES 末尾。 normalize_data_source_kind 的 supported 集合为两者并集,本改动不改变该并集, 对已有 settings.json 完全向后兼容;MT5 仍为下拉框首项,各项默认值未改动。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
akshare数据源在代码层面已经完整可用——create_data_source()有对应分支、_DEFAULT_SYMBOLS有默认标的、AkShareSource实现完整(含 baostock 回退)——但它被列在_HIDDEN_KINDS里,界面下拉框中选不到,只有手改settings.json才能启用。对只看 A 股的使用者来说,这个能力实际存在却不可发现。
改动
("akshare", "AkShare(A股)")追加到DATA_SOURCE_CHOICES_HIDDEN_KINDS中移除akshare兼容性
normalize_data_source_kind()的supported集合是DATA_SOURCE_CHOICES ∪ _HIDDEN_KINDS。本改动只是把一项从后者移到前者,并集不变,因此:settings.json中任何取值的解析结果都不变测试
pytest -m "not e2e"ruff check pa_agent tests备注
tushare/yfinance/eastmoney/eastmoney_futures保持隐藏不动,本 PR 不涉及。