fix(scoring): safe_float 支持百分号/符号字符串,修复涨跌规则失效并清理死代码 - #2
Merged
Conversation
- safe_float 现在会剥离 "+0.85%" 这类字符串的符号与百分号, 修复 rules.yaml 中 `change > 0`(positive_change)规则因字符串转换失败而永远不命中的 bug - 删除 pipeline/collect.py 中未被引用的死函数 calculate_basic_score / get_investment_suggestion (打分逻辑已统一由 rules/scoring.calculate_score 负责) - 补充回归测试:百分号解析 + positive_change 规则命中(tests 从 7 项增至 9 项) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
change > 0(positive_change)规则因字符串转换失败而永远不命中的 bug改了什么
为什么
怎么验证的
pytest通过streamlit run main.py跑通(如涉及界面/链路)检查清单
reports/、cache/)