Feature/init - #1236
Conversation
🤖 自动审查报告
📁 修改的文件
🧠 AI 代码审查意见结论:Not Ready 结构化结果:
必改项(阻断项):
建议项:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: efa2143810
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| try: | ||
| # 登录 Baostock | ||
| login_result = bs.login() | ||
| login_result = bs.login(user_id='youngyadoudou', password='uijka443$89@Yndn') |
There was a problem hiding this comment.
Remove hard-coded Baostock account credentials
This login call now embeds a specific user_id and password directly in source, which both leaks a credential and forces every deployment to use a single external account. If that account is rotated, locked, or rate-limited, Baostock fetching will fail globally instead of using environment-specific/default authentication behavior.
Useful? React with 👍 / 👎.
|
|
||
| except Exception as e: | ||
| logger.warning(f"Tushare 获取股票名称失败 {stock_code}: {e}") | ||
| logger.warning(f"Tushare 获取股票名称失败 {stock_code}, token: {self._api.token[-5:]}: {e}") |
There was a problem hiding this comment.
Guard token access inside Tushare exception logging
The exception handler dereferences self._api.token[-5:] while already handling a failure; when _api is None (for example, token not configured or client init failed), this raises a new AttributeError and masks the original error, so get_stock_name no longer degrades gracefully to None in that path.
Useful? React with 👍 / 👎.
PR Type
Background And Problem
请描述当前问题、影响范围与触发场景。
(EN) Describe the problem, its impact, and what triggers it.
Scope Of Change
请列出本 PR 修改的模块和文件范围。
(EN) List the modules and files changed in this PR.
Issue Link
必须填写以下之一 / Fill in one of:
Fixes #<issue_number>Refs #<issue_number>Verification Commands And Results
请填写你实际执行过的命令和关键结果(不要只写"已测试")。
(EN) Paste the commands you actually ran and their key output (don't just write "tested"):
关键输出/结论 / Key output & conclusion:
Compatibility And Risk
请说明兼容性影响、潜在风险(如无请写
None)。(EN) Describe compatibility impact and potential risks (write
Noneif not applicable).(EN) If this PR changes third-party model/API compatibility, request parameters, routing prefixes, or provider fallback behavior, include an official source link or announcement and clarify whether the rule is permanent, runtime-specific, or a temporary compatibility workaround.)
(EN) If this PR depends on a specific runtime or pinned dependency window (for example a LiteLLM version range, OpenAI-compatible routing, or YAML alias behavior), state the compatibility window you verified and which code paths were covered.)
(EN) If this PR touches runtime config save/cleanup/migration/backfill logic, explicitly describe whether existing config is rewritten, cleared, migrated, or left intact, and how users can restore the previous behavior.)
Rollback Plan
请至少写一句可执行的回滚方案(必填)。
(EN) Provide at least one actionable rollback step (required).
revert this PR),并说明是否需要额外回滚配置或数据迁移。(EN) For compatibility fixes, include the minimal rollback path (for example
revert this PR) and whether any additional config or data rollback is required.)EXTRACT_PROMPT Change (if applicable)
若本 PR 修改了
src/services/image_stock_extractor.py中的EXTRACT_PROMPT,请在此处粘贴完整变更后的 prompt。If this PR changes
EXTRACT_PROMPTinsrc/services/image_stock_extractor.py, paste the full updated prompt here:展开 / Expand: Full EXTRACT_PROMPT
Checklist
docs/CHANGELOG.md;README.md仅在首页级信息变化时更新,细节优先写入docs/*.md/ If user-visible changes are included, relevant docs anddocs/CHANGELOG.mdare updated;README.mdis updated only for homepage-level changes, with details kept indocs/*.md