feat(crowd_db): Phase 2 - 2026分数线接入(6省真实数据)
P2级改进:基于真实核实的2026官方分数线更新crowd_db 真实数据来源: - 湖南:搜狐教育(本科历史类446/物理类400) - 江苏:微博/教育在线(本科历史类484/物理类456,特控历史类532/物理类513) - 广东:搜狐/新京报(本科历史类440/物理类425,特控历史类546/物理类539) - 山东:高考100(一段441,特控521) - 河北:教育在线(本科历史类485/物理类443,特控历史类542/物理类510) - 河南:微博(本科历史类459/物理类419,特殊类型历史类534/物理类513) 实现内容: 1. 6省data_year: 2025 -> 2026 2. 更新source_url指向官方公布链接 3. 增加quality_note标注2026官方分数线已接入 4. 调整check_crowd_db_consistency.py:允许多年份共存 5. 修复测试以适应过渡期 验证: pytest 155 passed, 3 skipped; consistency check通过
This commit is contained in:
@@ -113,15 +113,18 @@ def main() -> int:
|
||||
if conf is None or not (0.0 <= conf <= 1.0):
|
||||
issues.append(f"[confidence 越界] {province} confidence={conf}")
|
||||
|
||||
# 检查 5: data_year 一致性(当前应为 2025)
|
||||
# 检查 5: data_year 一致性(放宽:允许多年份共存,部分省份已更新到 2026)
|
||||
years = {
|
||||
(loader.load_metadata(p) or {}).get("data_year")
|
||||
for p in loader.list_supported_provinces()
|
||||
}
|
||||
if len(years) > 1:
|
||||
issues.append(f"[data_year 不一致] 多年份共存: {years}")
|
||||
# 只有当出现异常年份(非 2025/2026)才报错
|
||||
invalid_years = {y for y in years if y not in {2025, 2026}}
|
||||
if invalid_years:
|
||||
issues.append(f"[data_year 异常] 发现非 2025/2026 年份: {invalid_years}")
|
||||
elif years == {2026}:
|
||||
issues.append("[data_year 注意] 已切到 2026,确认 2026 录取数据已正式公布")
|
||||
issues.append("[data_year 注意] 已全部切到 2026,确认 2026 录取数据已正式公布")
|
||||
# 多年份共存(2025+2026)是正常的过渡期状态,不报错
|
||||
|
||||
# 输出
|
||||
if issues:
|
||||
|
||||
Reference in New Issue
Block a user