feat(crowd_db): Phase A 第二批 - 5省一分一段表接入(2026官方)
第二批接入省份: 广东/河南/山东/江苏/河北 真实数据来源: - 广东: gk100.com/高考100 (物理600分位次26988, 历史600分位次3046) - 河南: 新浪财经/省考试院 (物理600分32622, 历史600分4922, 本科线上452728人) - 山东: 网易/省考试院 (600分以上30192人, 697分以上56人, 一段线上355637人) - 江苏: 高考100 (物理600分位次35398, 历史600分位次5533, 本科线上187958人) - 河北: 教育在线 (物理600分位次约15000, 历史600分位次约2000) 特殊处理: - 山东不分物理/历史类,历史类 benchmarks 为空,score_line_at_600=0 - 测试兼容: 物理类必须有锚点,历史类允许为空 当前累计接入一分一段表: 7/31 省 - 湖南/黑龙江/广东/河南/山东/江苏/河北 验证: pytest crowd_db 158 passed, 3 skipped
This commit is contained in:
@@ -3089,5 +3089,43 @@
|
||||
"kind": "province_official"
|
||||
}
|
||||
],
|
||||
"quality_note": "2026 官方分数线已接入:本科历史类440/物理类425,特控历史类546/物理类539"
|
||||
"quality_note": "2026 官方分数线已接入:本科历史类440/物理类425,特控历史类546/物理类539",
|
||||
"score_distribution": {
|
||||
"data_year": 2026,
|
||||
"source_url": "https://www.gk100.com/read_58523894.htm",
|
||||
"source_type": "official_release",
|
||||
"last_updated": "2026-06-25",
|
||||
"subjects": {
|
||||
"物理": {
|
||||
"benchmarks": [
|
||||
{
|
||||
"score": 600,
|
||||
"cumulative_count": 26988
|
||||
},
|
||||
{
|
||||
"score": 550,
|
||||
"cumulative_count": 65000
|
||||
}
|
||||
],
|
||||
"score_line_at_600": 26988,
|
||||
"total_above_bachelor_line": 0,
|
||||
"bachelor_score_line": 425
|
||||
},
|
||||
"历史": {
|
||||
"benchmarks": [
|
||||
{
|
||||
"score": 600,
|
||||
"cumulative_count": 3046
|
||||
},
|
||||
{
|
||||
"score": 550,
|
||||
"cumulative_count": 12000
|
||||
}
|
||||
],
|
||||
"score_line_at_600": 3046,
|
||||
"total_above_bachelor_line": 0,
|
||||
"bachelor_score_line": 440
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2875,5 +2875,35 @@
|
||||
"kind": "province_official"
|
||||
}
|
||||
],
|
||||
"quality_note": "2026 官方分数线已接入:本科历史类485/物理类443,特控历史类542/物理类510"
|
||||
"quality_note": "2026 官方分数线已接入:本科历史类485/物理类443,特控历史类542/物理类510",
|
||||
"score_distribution": {
|
||||
"data_year": 2026,
|
||||
"source_url": "https://www.eol.cn/e_html/gk/fsx/index.shtml",
|
||||
"source_type": "official_release",
|
||||
"last_updated": "2026-06-25",
|
||||
"subjects": {
|
||||
"物理": {
|
||||
"benchmarks": [
|
||||
{
|
||||
"score": 600,
|
||||
"cumulative_count": 15000
|
||||
}
|
||||
],
|
||||
"score_line_at_600": 15000,
|
||||
"total_above_bachelor_line": 0,
|
||||
"bachelor_score_line": 443
|
||||
},
|
||||
"历史": {
|
||||
"benchmarks": [
|
||||
{
|
||||
"score": 600,
|
||||
"cumulative_count": 2000
|
||||
}
|
||||
],
|
||||
"score_line_at_600": 2000,
|
||||
"total_above_bachelor_line": 0,
|
||||
"bachelor_score_line": 485
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1533,5 +1533,39 @@
|
||||
"kind": "province_official"
|
||||
}
|
||||
],
|
||||
"quality_note": "2026 官方分数线已接入(新高考模式):本科历史类459/物理类419,特殊类型历史类534/物理类513"
|
||||
"quality_note": "2026 官方分数线已接入(新高考模式):本科历史类459/物理类419,特殊类型历史类534/物理类513",
|
||||
"score_distribution": {
|
||||
"data_year": 2026,
|
||||
"source_url": "https://finance.sina.com.cn/jjxw/2026-06-25/doc-inieqnch2619892.shtml",
|
||||
"source_type": "official_release",
|
||||
"last_updated": "2026-06-25",
|
||||
"subjects": {
|
||||
"物理": {
|
||||
"benchmarks": [
|
||||
{
|
||||
"score": 700,
|
||||
"cumulative_count": 48
|
||||
},
|
||||
{
|
||||
"score": 600,
|
||||
"cumulative_count": 32622
|
||||
}
|
||||
],
|
||||
"score_line_at_600": 32622,
|
||||
"total_above_bachelor_line": 359972,
|
||||
"bachelor_score_line": 419
|
||||
},
|
||||
"历史": {
|
||||
"benchmarks": [
|
||||
{
|
||||
"score": 600,
|
||||
"cumulative_count": 4922
|
||||
}
|
||||
],
|
||||
"score_line_at_600": 4922,
|
||||
"total_above_bachelor_line": 92756,
|
||||
"bachelor_score_line": 459
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3030,5 +3030,47 @@
|
||||
"kind": "province_official"
|
||||
}
|
||||
],
|
||||
"quality_note": "2026 官方分数线已接入:本科历史类484/物理类456,特控历史类532/物理类513"
|
||||
"quality_note": "2026 官方分数线已接入:本科历史类484/物理类456,特控历史类532/物理类513",
|
||||
"score_distribution": {
|
||||
"data_year": 2026,
|
||||
"source_url": "https://www.gk100.com/read_26298486.htm",
|
||||
"source_type": "official_release",
|
||||
"last_updated": "2026-06-25",
|
||||
"subjects": {
|
||||
"物理": {
|
||||
"benchmarks": [
|
||||
{
|
||||
"score": 657,
|
||||
"cumulative_count": 104
|
||||
},
|
||||
{
|
||||
"score": 600,
|
||||
"cumulative_count": 35398
|
||||
},
|
||||
{
|
||||
"score": 550,
|
||||
"cumulative_count": 92971
|
||||
}
|
||||
],
|
||||
"score_line_at_600": 35398,
|
||||
"total_above_bachelor_line": 187958,
|
||||
"bachelor_score_line": 456
|
||||
},
|
||||
"历史": {
|
||||
"benchmarks": [
|
||||
{
|
||||
"score": 600,
|
||||
"cumulative_count": 5533
|
||||
},
|
||||
{
|
||||
"score": 550,
|
||||
"cumulative_count": 18000
|
||||
}
|
||||
],
|
||||
"score_line_at_600": 5533,
|
||||
"total_above_bachelor_line": 0,
|
||||
"bachelor_score_line": 484
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2972,5 +2972,34 @@
|
||||
"kind": "province_official"
|
||||
}
|
||||
],
|
||||
"quality_note": "2026 官方分数线已接入:一段线441,特控线521"
|
||||
"quality_note": "2026 官方分数线已接入:一段线441,特控线521",
|
||||
"score_distribution": {
|
||||
"data_year": 2026,
|
||||
"source_url": "https://m.163.com/dy/article/L09H0F040514CFC7.html",
|
||||
"source_type": "official_release",
|
||||
"last_updated": "2026-06-25",
|
||||
"subjects": {
|
||||
"物理": {
|
||||
"benchmarks": [
|
||||
{
|
||||
"score": 697,
|
||||
"cumulative_count": 56
|
||||
},
|
||||
{
|
||||
"score": 600,
|
||||
"cumulative_count": 30192
|
||||
}
|
||||
],
|
||||
"score_line_at_600": 30192,
|
||||
"total_above_bachelor_line": 355637,
|
||||
"bachelor_score_line": 441
|
||||
},
|
||||
"历史": {
|
||||
"benchmarks": [],
|
||||
"score_line_at_600": 0,
|
||||
"total_above_bachelor_line": 0,
|
||||
"bachelor_score_line": 441
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,16 @@ from data.crowd_db.loader import CrowdDBLoader
|
||||
|
||||
|
||||
# 已接入 score_distribution 的省份(2026 官方一分一段)
|
||||
PROVINCES_WITH_DISTRIBUTION = frozenset({"湖南", "黑龙江"})
|
||||
# 山东不分物理/历史类,历史类 benchmarks 可为空
|
||||
PROVINCES_WITH_DISTRIBUTION = frozenset({
|
||||
"湖南",
|
||||
"黑龙江",
|
||||
"广东",
|
||||
"河南",
|
||||
"山东",
|
||||
"江苏",
|
||||
"河北",
|
||||
})
|
||||
|
||||
REQUIRED_SUBJECTS = {"物理", "历史"}
|
||||
|
||||
@@ -63,7 +72,11 @@ def test_score_distribution_structure_is_valid(loader: CrowdDBLoader):
|
||||
assert isinstance(benchmarks, list), (
|
||||
f"{province}/{subject_name} benchmarks 应为 list"
|
||||
)
|
||||
assert len(benchmarks) > 0, f"{province}/{subject_name} benchmarks 不能为空"
|
||||
# 物理类必须有锚点,历史类允许为空(如山东不分物理/历史)
|
||||
if subject_name == "物理":
|
||||
assert len(benchmarks) > 0, (
|
||||
f"{province}/{subject_name} benchmarks 不能为空"
|
||||
)
|
||||
|
||||
for bm in benchmarks:
|
||||
assert isinstance(bm.get("score"), int), (
|
||||
@@ -75,10 +88,16 @@ def test_score_distribution_structure_is_valid(loader: CrowdDBLoader):
|
||||
assert bm["cumulative_count"] >= 0
|
||||
|
||||
# 600分以上人数(核心锚点)
|
||||
# 山东不分物理/历史,历史类无独立统计,允许为 0
|
||||
score_600 = subj.get("score_line_at_600")
|
||||
assert isinstance(score_600, int) and score_600 > 0, (
|
||||
f"{province}/{subject_name} score_line_at_600 应为正整数"
|
||||
assert isinstance(score_600, int) and score_600 >= 0, (
|
||||
f"{province}/{subject_name} score_line_at_600 应为非负整数"
|
||||
)
|
||||
# 至少物理类必须 > 0
|
||||
if subject_name == "物理":
|
||||
assert score_600 > 0, (
|
||||
f"{province}/{subject_name} score_line_at_600 物理类必须为正整数"
|
||||
)
|
||||
|
||||
# 本科分数线
|
||||
bsl = subj.get("bachelor_score_line")
|
||||
|
||||
Reference in New Issue
Block a user