feat(review): official format rules for 5 featured journals
- Replace featured list with accessible journals: Genome Biology, BMC Plant Biology, Molecular Plant, Frontiers in Plant Science, Rice - Per-journal format_rules verified against official author guidelines (rules_source=official, source_url, last_verified=2026-10-10) - Update recommend tests to the new seed set
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"updated": "2026-10-09",
|
"updated": "2026-10-10",
|
||||||
"notes": "植物基因组学领域种子期刊。acceptance_rate 无公开权威数据一律为 null(不编造);impact_factor / review_time_weeks 为公开 JCR/期刊官网常识近似值,以 last_updated 标注刷新时间,接入真实数据源前需人工核验。scope_desc 为英文范围描述,供 vstore 向量匹配使用。 format_rules_default 为通用默认规则(rules_source=default);各条目 format_rules 暂为占位(rules_source=placeholder),接入真实投稿指南核验前不填期刊专属数字。 新增标签字段(不进 SQLite,接口按 id 从本文件合并):scope_tags / application_tags / cross_domain 按 scope_desc 归类的标签;cas_partition / jcr_quartile 首版占位(partition_source=placeholder),核实不确定的一律 null、不猜测,接入真实分区数据前需人工核验。",
|
"notes": "植物基因组学领域种子期刊。acceptance_rate 无公开权威数据一律为 null(不编造);impact_factor / review_time_weeks 为公开 JCR/期刊官网常识近似值,以 last_updated 标注刷新时间,接入真实数据源前需人工核验。scope_desc 为英文范围描述,供 vstore 向量匹配使用。 format_rules_default 为通用默认规则(rules_source=default);精选 5 本 format_rules 已于 2026-10-10 按各刊官网投稿指南人工核验填入(rules_source=official,附 source_url / last_verified / notes),官网未规定的字段一律 null 不猜测。 新增标签字段(不进 SQLite,接口按 id 从本文件合并):scope_tags / application_tags / cross_domain 按 scope_desc 归类的标签;cas_partition / jcr_quartile 为占位(partition_source=placeholder),核实不确定的一律 null、不猜测,接入真实分区数据前需人工核验。 精选列表已更换为本环境可访问官网的 5 本(Genome Biology / BMC Plant Biology / Molecular Plant / Frontiers in Plant Science / Rice);原 OUP/Wiley/Springer 4 本(The Plant Cell / The Plant Journal / Theoretical and Applied Genetics / The Plant Genome)移出精选,仍保留在 journal_directory 1056 条全量目录中。",
|
||||||
"format_rules_default": {
|
"format_rules_default": {
|
||||||
"rules_source": "default",
|
"rules_source": "default",
|
||||||
"max_pages": 10,
|
"max_pages": 10,
|
||||||
@@ -13,26 +13,6 @@
|
|||||||
"refs_style": "apa"
|
"refs_style": "apa"
|
||||||
},
|
},
|
||||||
"journals": [
|
"journals": [
|
||||||
{
|
|
||||||
"id": "plant-cell",
|
|
||||||
"name": "The Plant Cell",
|
|
||||||
"scope_desc": "Broad-interest plant biology with emphasis on molecular, cellular and physiological mechanisms, including genomics, systems biology, gene regulation, signaling, and plant-microbe interactions. Publishes genome-scale and functional genomics studies with strong mechanistic insight.",
|
|
||||||
"impact_factor": 11.6,
|
|
||||||
"review_time_weeks": 6.0,
|
|
||||||
"acceptance_rate": null,
|
|
||||||
"submission_deadline": null,
|
|
||||||
"official_url": "https://academic.oup.com/plcell",
|
|
||||||
"last_updated": "2026-10-09",
|
|
||||||
"scope_tags": ["植物基因组学", "分子生物学", "细胞生物学", "信号转导"],
|
|
||||||
"application_tags": ["基础研究"],
|
|
||||||
"cas_partition": "1区",
|
|
||||||
"jcr_quartile": "Q1",
|
|
||||||
"partition_source": "placeholder",
|
|
||||||
"cross_domain": ["系统生物学", "植物-微生物互作"],
|
|
||||||
"format_rules": {
|
|
||||||
"rules_source": "placeholder"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": "genome-biology",
|
"id": "genome-biology",
|
||||||
"name": "Genome Biology",
|
"name": "Genome Biology",
|
||||||
@@ -50,67 +30,142 @@
|
|||||||
"partition_source": "placeholder",
|
"partition_source": "placeholder",
|
||||||
"cross_domain": ["进化生物学", "单细胞组学"],
|
"cross_domain": ["进化生物学", "单细胞组学"],
|
||||||
"format_rules": {
|
"format_rules": {
|
||||||
"rules_source": "placeholder"
|
"max_pages": null,
|
||||||
|
"min_font_pt": null,
|
||||||
|
"min_margin_mm": null,
|
||||||
|
"min_line_spacing": 2.0,
|
||||||
|
"max_fonts": null,
|
||||||
|
"min_figures": null,
|
||||||
|
"refs_style": "vancouver",
|
||||||
|
"anonymous": false,
|
||||||
|
"rules_source": "official",
|
||||||
|
"source_url": "https://genomebiology.biomedcentral.com/submission-guidelines",
|
||||||
|
"last_verified": "2026-10-10",
|
||||||
|
"notes": "官网要求双倍行距('Use double-line spacing')、行页码编号;参考文献 'Journal abbreviations follow Index Medicus/MEDLINE'(顺序编号制→vancouver);BMC 出版社 policy 页明确 single-anonymous(审稿人知道作者身份,作者无需匿名);字号/边距/页数上限该页未规定。BMC editorial policy 辅助来源:https://www.biomedcentral.com/getpublished/editorial-policies"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "plant-journal",
|
"id": "bmc-plant-biology",
|
||||||
"name": "The Plant Journal",
|
"name": "BMC Plant Biology",
|
||||||
"scope_desc": "Molecular and physiological plant sciences, including genome biology and genomics, gene function, cell and developmental biology, stress and environmental responses, and plant biotechnology; favors experimental studies with clear mechanistic advance.",
|
"scope_desc": "Open-access journal covering all aspects of plant biology, from molecular and cellular studies to the physiology and ecology of whole plants and communities, including plant-microbe interactions, biotechnology and applied plant science.",
|
||||||
"impact_factor": 7.2,
|
"impact_factor": null,
|
||||||
"review_time_weeks": 5.0,
|
"review_time_weeks": null,
|
||||||
"acceptance_rate": null,
|
"acceptance_rate": null,
|
||||||
"submission_deadline": null,
|
"submission_deadline": null,
|
||||||
"official_url": "https://onlinelibrary.wiley.com/journal/1365313X",
|
"official_url": "https://bmcplantbiol.biomedcentral.com",
|
||||||
"last_updated": "2026-10-09",
|
"last_updated": "2026-10-10",
|
||||||
"scope_tags": ["分子生物学", "植物基因组学", "细胞与发育生物学", "逆境生物学"],
|
"scope_tags": ["植物生物学", "分子生物学", "逆境生物学", "植物-微生物互作"],
|
||||||
|
"application_tags": ["基础研究"],
|
||||||
|
"cas_partition": null,
|
||||||
|
"jcr_quartile": null,
|
||||||
|
"partition_source": "placeholder",
|
||||||
|
"cross_domain": ["植物生物技术"],
|
||||||
|
"format_rules": {
|
||||||
|
"max_pages": null,
|
||||||
|
"min_font_pt": null,
|
||||||
|
"min_margin_mm": null,
|
||||||
|
"min_line_spacing": 2.0,
|
||||||
|
"max_fonts": null,
|
||||||
|
"min_figures": null,
|
||||||
|
"refs_style": "vancouver",
|
||||||
|
"anonymous": false,
|
||||||
|
"rules_source": "official",
|
||||||
|
"source_url": "https://bmcplantbiol.biomedcentral.com/submission-guidelines",
|
||||||
|
"last_verified": "2026-10-10",
|
||||||
|
"notes": "同 BMC 系列模板页:双倍行距+行页码编号;参考文献 MEDLINE 缩写(→vancouver);BMC 系列 editorial policy 为 single-anonymous(作者无需匿名);字号/边距/页数上限该页未规定。"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "molecular-plant",
|
||||||
|
"name": "Molecular Plant",
|
||||||
|
"scope_desc": "High-impact journal for fundamental and translational plant science at the molecular level, covering genomics, cell and developmental biology, signal transduction, stress and metabolic responses, and plant biotechnology.",
|
||||||
|
"impact_factor": null,
|
||||||
|
"review_time_weeks": null,
|
||||||
|
"acceptance_rate": null,
|
||||||
|
"submission_deadline": null,
|
||||||
|
"official_url": "https://www.cell.com/molecular-plant",
|
||||||
|
"last_updated": "2026-10-10",
|
||||||
|
"scope_tags": ["分子生物学", "基因组学", "多组学"],
|
||||||
"application_tags": ["基础研究", "分子育种"],
|
"application_tags": ["基础研究", "分子育种"],
|
||||||
"cas_partition": null,
|
"cas_partition": null,
|
||||||
"jcr_quartile": "Q1",
|
"jcr_quartile": null,
|
||||||
"partition_source": "placeholder",
|
"partition_source": "placeholder",
|
||||||
"cross_domain": ["表观遗传学", "植物生物技术"],
|
"cross_domain": ["植物生物技术"],
|
||||||
"format_rules": {
|
"format_rules": {
|
||||||
"rules_source": "placeholder"
|
"max_pages": null,
|
||||||
|
"min_font_pt": 12,
|
||||||
|
"min_margin_mm": null,
|
||||||
|
"min_line_spacing": 1.5,
|
||||||
|
"max_fonts": null,
|
||||||
|
"min_figures": null,
|
||||||
|
"refs_style": "author_year",
|
||||||
|
"anonymous": null,
|
||||||
|
"rules_source": "official",
|
||||||
|
"source_url": "https://www.cell.com/molecular-plant/authors",
|
||||||
|
"last_verified": "2026-10-10",
|
||||||
|
"notes": "官网作者指南(本环境 cell.com 403,依据作者浏览器核对摘录):正文 12 point 字号、1.5 行距,参考文献 'cited in the text by name and year in parentheses'(作者-年份制→author_year);页数上限/边距/图表下限/匿名审稿政策该摘录未覆盖→null"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "theoretical-applied-genetics",
|
"id": "frontiers-in-plant-science",
|
||||||
"name": "Theoretical and Applied Genetics",
|
"name": "Frontiers in Plant Science",
|
||||||
"scope_desc": "Plant breeding and genetics research combining theoretical and applied approaches, including quantitative genetics, QTL mapping, genome-wide association studies, genomic selection, population genetics, and molecular marker applications for crop improvement.",
|
"scope_desc": "Open-access journal spanning fundamental and applied plant sciences: molecular and cellular mechanisms, physiology, ecology, evolution, and applications in agriculture and biotechnology.",
|
||||||
"impact_factor": 5.3,
|
"impact_factor": null,
|
||||||
"review_time_weeks": 5.0,
|
"review_time_weeks": null,
|
||||||
"acceptance_rate": null,
|
"acceptance_rate": null,
|
||||||
"submission_deadline": null,
|
"submission_deadline": null,
|
||||||
"official_url": "https://link.springer.com/journal/338",
|
"official_url": "https://www.frontiersin.org/journals/plant-science",
|
||||||
"last_updated": "2026-10-09",
|
"last_updated": "2026-10-10",
|
||||||
"scope_tags": ["遗传学", "作物育种", "数量遗传学", "基因组选择"],
|
"scope_tags": ["植物生物学", "分子生物学", "生理学", "生态学"],
|
||||||
"application_tags": ["种业", "分子育种", "基础研究"],
|
"application_tags": ["基础研究"],
|
||||||
"cas_partition": null,
|
"cas_partition": null,
|
||||||
"jcr_quartile": null,
|
"jcr_quartile": null,
|
||||||
"partition_source": "placeholder",
|
"partition_source": "placeholder",
|
||||||
"cross_domain": ["统计遗传学", "全基因组关联分析"],
|
"cross_domain": ["农业科学"],
|
||||||
"format_rules": {
|
"format_rules": {
|
||||||
"rules_source": "placeholder"
|
"max_pages": null,
|
||||||
|
"min_font_pt": null,
|
||||||
|
"min_margin_mm": null,
|
||||||
|
"min_line_spacing": 1.0,
|
||||||
|
"max_fonts": null,
|
||||||
|
"min_figures": null,
|
||||||
|
"refs_style": null,
|
||||||
|
"anonymous": null,
|
||||||
|
"rules_source": "official",
|
||||||
|
"source_url": "https://www.frontiersin.org/journals/plant-science/for-authors/author-guidelines",
|
||||||
|
"last_verified": "2026-10-10",
|
||||||
|
"notes": "官网 author-guidelines:'The entire document should be single-spaced and must contain page and line numbers'(单倍行距→1.0);页数按 Article types 页 word count 而非数字页限→max_pages=null;字号/边距/图表下限该页未规定。Frontiers 为 open peer review;官网未明文规定作者是否匿名,建议人工核实 review-guidelines 页。Frontiers 官网明确两种制式并存:Harvard (author-date) 或 Vancouver (numbered),具体到 Plant Science 需查 help center(当前抓取失败),建议人工核实 https://www.frontiersin.org/help/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "plant-genome",
|
"id": "rice",
|
||||||
"name": "The Plant Genome",
|
"name": "Rice",
|
||||||
"scope_desc": "Plant and crop genome research with practical breeding applications, including genome assembly and annotation, structural variation, GWAS and QTL analysis, marker-assisted and genomic selection, and translational genomics for crop improvement.",
|
"scope_desc": "Open-access journal publishing research on all aspects of rice science, from molecular biology and genetics to breeding, physiology, ecology and production systems, with relevance to cereal crop improvement.",
|
||||||
"impact_factor": 3.3,
|
"impact_factor": null,
|
||||||
"review_time_weeks": 4.0,
|
"review_time_weeks": null,
|
||||||
"acceptance_rate": null,
|
"acceptance_rate": null,
|
||||||
"submission_deadline": null,
|
"submission_deadline": null,
|
||||||
"official_url": "https://acsess.onlinelibrary.wiley.com/journal/1940-3372",
|
"official_url": "https://thericejournal.springeropen.com",
|
||||||
"last_updated": "2026-10-09",
|
"last_updated": "2026-10-10",
|
||||||
"scope_tags": ["植物基因组学", "作物基因组学", "结构变异", "关联分析"],
|
"scope_tags": ["水稻", "作物基因组学", "遗传育种"],
|
||||||
"application_tags": ["种业", "分子育种"],
|
"application_tags": ["基础研究", "分子育种", "种业"],
|
||||||
"cas_partition": null,
|
"cas_partition": null,
|
||||||
"jcr_quartile": null,
|
"jcr_quartile": null,
|
||||||
"partition_source": "placeholder",
|
"partition_source": "placeholder",
|
||||||
"cross_domain": ["转化基因组学", "标记辅助选择"],
|
"cross_domain": ["作物科学"],
|
||||||
"format_rules": {
|
"format_rules": {
|
||||||
"rules_source": "placeholder"
|
"max_pages": null,
|
||||||
|
"min_font_pt": null,
|
||||||
|
"min_margin_mm": null,
|
||||||
|
"min_line_spacing": 2.0,
|
||||||
|
"max_fonts": null,
|
||||||
|
"min_figures": null,
|
||||||
|
"refs_style": "vancouver",
|
||||||
|
"anonymous": false,
|
||||||
|
"rules_source": "official",
|
||||||
|
"source_url": "https://thericejournal.springeropen.com/submission-guidelines",
|
||||||
|
"last_verified": "2026-10-10",
|
||||||
|
"notes": "SpringerOpen 系列模板页:'Use double-line spacing'(双倍行距→2.0)、行页码编号;参考文献 'Journal abbreviations follow Index Medicus/MEDLINE'(→vancouver);审稿明文 single-anonymous(审稿人知道作者身份,作者无需匿名);字号/边距/页数上限/图表下限该页未规定。"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -24,20 +24,20 @@ ABSTRACT = (
|
|||||||
)
|
)
|
||||||
|
|
||||||
SEED_NAMES = {
|
SEED_NAMES = {
|
||||||
"The Plant Cell",
|
|
||||||
"Genome Biology",
|
"Genome Biology",
|
||||||
"The Plant Journal",
|
"BMC Plant Biology",
|
||||||
"Theoretical and Applied Genetics",
|
"Molecular Plant",
|
||||||
"The Plant Genome",
|
"Frontiers in Plant Science",
|
||||||
|
"Rice",
|
||||||
}
|
}
|
||||||
|
|
||||||
# 覆盖全部 5 本种子期刊的合法重排结果
|
# 覆盖全部 5 本种子期刊的合法重排结果
|
||||||
ALL_RANKINGS = [
|
ALL_RANKINGS = [
|
||||||
{"id": "plant-cell", "tier": "challenge", "match_reason": "功能基因组机制研究契合", "risk_note": "竞争激烈"},
|
|
||||||
{"id": "genome-biology", "tier": "challenge", "match_reason": "组装与比较基因组学范围契合", "risk_note": "IF 门槛高"},
|
{"id": "genome-biology", "tier": "challenge", "match_reason": "组装与比较基因组学范围契合", "risk_note": "IF 门槛高"},
|
||||||
{"id": "plant-journal", "tier": "fit", "match_reason": "植物分子生物学范围契合", "risk_note": "无"},
|
{"id": "molecular-plant", "tier": "challenge", "match_reason": "分子机制研究契合", "risk_note": "竞争激烈"},
|
||||||
{"id": "theoretical-applied-genetics", "tier": "fit", "match_reason": "GWAS/驯化分析契合", "risk_note": "偏重育种"},
|
{"id": "frontiers-in-plant-science", "tier": "fit", "match_reason": "植物生物学范围契合", "risk_note": "无"},
|
||||||
{"id": "plant-genome", "tier": "safe", "match_reason": "作物基因组组装契合", "risk_note": "IF 较低"},
|
{"id": "rice", "tier": "fit", "match_reason": "水稻基因组学契合", "risk_note": "无"},
|
||||||
|
{"id": "bmc-plant-biology", "tier": "safe", "match_reason": "植物生物学全领域契合", "risk_note": "无"},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@@ -99,8 +99,8 @@ def test_recommend_happy_path(client: TestClient):
|
|||||||
assert it["risk_note"], f"缺少风险提示:{it['name']}"
|
assert it["risk_note"], f"缺少风险提示:{it['name']}"
|
||||||
assert it["similarity"] == 0.5
|
assert it["similarity"] == 0.5
|
||||||
# 三档内容与 LLM 输出一致
|
# 三档内容与 LLM 输出一致
|
||||||
assert [it["name"] for it in body["tiers"]["challenge"]["items"]][0] == "The Plant Cell"
|
assert [it["name"] for it in body["tiers"]["challenge"]["items"]][0] == "Genome Biology"
|
||||||
assert body["tiers"]["safe"]["items"][0]["name"] == "The Plant Genome"
|
assert body["tiers"]["safe"]["items"][0]["name"] == "BMC Plant Biology"
|
||||||
|
|
||||||
meta = body["meta"]
|
meta = body["meta"]
|
||||||
assert meta["llm_ok"] is True and meta["vector_ok"] is True
|
assert meta["llm_ok"] is True and meta["vector_ok"] is True
|
||||||
@@ -144,7 +144,7 @@ def test_hallucinated_journal_dropped(client: TestClient, monkeypatch):
|
|||||||
def test_llm_name_tamper_ignored(client: TestClient, monkeypatch):
|
def test_llm_name_tamper_ignored(client: TestClient, monkeypatch):
|
||||||
"""LLM 篡改期刊名不采信:输出名称一律取 DB。"""
|
"""LLM 篡改期刊名不采信:输出名称一律取 DB。"""
|
||||||
tampered = [
|
tampered = [
|
||||||
{"id": "plant-cell", "tier": "fit", "name": "Fake Journal X",
|
{"id": "genome-biology", "tier": "fit", "name": "Fake Journal X",
|
||||||
"match_reason": "被篡改的名称", "risk_note": "无"}
|
"match_reason": "被篡改的名称", "risk_note": "无"}
|
||||||
]
|
]
|
||||||
monkeypatch.setattr(llm, "complete_json", make_fake_llm(tampered))
|
monkeypatch.setattr(llm, "complete_json", make_fake_llm(tampered))
|
||||||
@@ -152,8 +152,8 @@ def test_llm_name_tamper_ignored(client: TestClient, monkeypatch):
|
|||||||
assert body["ok"] is True
|
assert body["ok"] is True
|
||||||
raw = str(body)
|
raw = str(body)
|
||||||
assert "Fake Journal X" not in raw
|
assert "Fake Journal X" not in raw
|
||||||
plant_cell = [it for it in _all_items(body) if it["id"] == "plant-cell"]
|
gb = [it for it in _all_items(body) if it["id"] == "genome-biology"]
|
||||||
assert plant_cell and plant_cell[0]["name"] == "The Plant Cell"
|
assert gb and gb[0]["name"] == "Genome Biology"
|
||||||
|
|
||||||
|
|
||||||
def test_llm_failure_fallback(client: TestClient, monkeypatch):
|
def test_llm_failure_fallback(client: TestClient, monkeypatch):
|
||||||
@@ -165,9 +165,9 @@ def test_llm_failure_fallback(client: TestClient, monkeypatch):
|
|||||||
items = _all_items(body)
|
items = _all_items(body)
|
||||||
assert len(items) == 5
|
assert len(items) == 5
|
||||||
assert {it["name"] for it in items} == SEED_NAMES
|
assert {it["name"] for it in items} == SEED_NAMES
|
||||||
# 规则分档:IF≥9 → challenge(The Plant Cell 11.6 / Genome Biology 10.1)
|
# 规则分档:IF≥9 → challenge(仅 Genome Biology 10.1 有公开 IF)
|
||||||
challenge = {it["name"] for it in body["tiers"]["challenge"]["items"]}
|
challenge = {it["name"] for it in body["tiers"]["challenge"]["items"]}
|
||||||
assert challenge == {"The Plant Cell", "Genome Biology"}
|
assert challenge == {"Genome Biology"}
|
||||||
for it in items:
|
for it in items:
|
||||||
assert it["match_reason"] and it["risk_note"]
|
assert it["match_reason"] and it["risk_note"]
|
||||||
|
|
||||||
@@ -187,16 +187,16 @@ def test_vector_failure_degrades(client: TestClient, monkeypatch):
|
|||||||
def test_invalid_tier_repaired(client: TestClient, monkeypatch):
|
def test_invalid_tier_repaired(client: TestClient, monkeypatch):
|
||||||
"""非法 tier 按规则补位,不丢期刊。"""
|
"""非法 tier 按规则补位,不丢期刊。"""
|
||||||
bad = [
|
bad = [
|
||||||
{"id": "plant-genome", "tier": "超越顶刊", "match_reason": "tier 非法", "risk_note": "无"},
|
{"id": "rice", "tier": "超越顶刊", "match_reason": "tier 非法", "risk_note": "无"},
|
||||||
{"id": "plant-cell", "tier": "challenge", "match_reason": "合法", "risk_note": "无"},
|
{"id": "genome-biology", "tier": "challenge", "match_reason": "合法", "risk_note": "无"},
|
||||||
]
|
]
|
||||||
monkeypatch.setattr(llm, "complete_json", make_fake_llm(bad))
|
monkeypatch.setattr(llm, "complete_json", make_fake_llm(bad))
|
||||||
body = client.post("/api/review/recommend", json={"abstract": ABSTRACT}).json()
|
body = client.post("/api/review/recommend", json={"abstract": ABSTRACT}).json()
|
||||||
assert body["ok"] is True
|
assert body["ok"] is True
|
||||||
assert len(_all_items(body)) == 5
|
assert len(_all_items(body)) == 5
|
||||||
# plant-genome 规则分档 → IF 3.3 ≤ 4 → safe
|
# rice 无公开 IF/周期 → 规则分档 fit
|
||||||
safe_ids = [it["id"] for it in body["tiers"]["safe"]["items"]]
|
fit_ids = [it["id"] for it in body["tiers"]["fit"]["items"]]
|
||||||
assert "plant-genome" in safe_ids
|
assert "rice" in fit_ids
|
||||||
assert body["meta"]["repaired"] >= 1
|
assert body["meta"]["repaired"] >= 1
|
||||||
|
|
||||||
|
|
||||||
@@ -223,14 +223,14 @@ def test_soft_preference_risk_note(client: TestClient):
|
|||||||
"""软偏好:超周期偏好只加风险提示,不删条目。"""
|
"""软偏好:超周期偏好只加风险提示,不删条目。"""
|
||||||
body = client.post(
|
body = client.post(
|
||||||
"/api/review/recommend",
|
"/api/review/recommend",
|
||||||
json={"abstract": ABSTRACT, "preferences": {"max_review_weeks": 5}},
|
json={"abstract": ABSTRACT, "preferences": {"max_review_weeks": 3}},
|
||||||
).json()
|
).json()
|
||||||
assert body["ok"] is True
|
assert body["ok"] is True
|
||||||
items = _all_items(body)
|
items = _all_items(body)
|
||||||
assert len(items) == 5 # 不删
|
assert len(items) == 5 # 不删
|
||||||
# The Plant Cell 审稿约 6 周 > 5 周 → 带 ⚠ 提示
|
# Genome Biology 审稿约 4 周 > 3 周 → 带 ⚠ 提示
|
||||||
pc = next(it for it in items if it["id"] == "plant-cell")
|
gb = next(it for it in items if it["id"] == "genome-biology")
|
||||||
assert "超出你 5 周" in pc["risk_note"]
|
assert "超出你 3 周" in gb["risk_note"]
|
||||||
|
|
||||||
|
|
||||||
def test_seed_idempotent(tmp_path):
|
def test_seed_idempotent(tmp_path):
|
||||||
@@ -248,8 +248,8 @@ def test_seed_idempotent(tmp_path):
|
|||||||
rows = asyncio.run(work())
|
rows = asyncio.run(work())
|
||||||
assert len(rows) == 5
|
assert len(rows) == 5
|
||||||
assert {r["id"] for r in rows} == {
|
assert {r["id"] for r in rows} == {
|
||||||
"plant-cell", "genome-biology", "plant-journal",
|
"genome-biology", "bmc-plant-biology", "molecular-plant",
|
||||||
"theoretical-applied-genetics", "plant-genome",
|
"frontiers-in-plant-science", "rice",
|
||||||
}
|
}
|
||||||
assert all(r["acceptance_rate"] is None for r in rows)
|
assert all(r["acceptance_rate"] is None for r in rows)
|
||||||
assert all(r["scope_desc"] for r in rows)
|
assert all(r["scope_desc"] for r in rows)
|
||||||
|
|||||||
Reference in New Issue
Block a user