Add a public numbering module and route fragmenting, validation, and scaffold preparation through the canonical numbering entry. Rewrite the repository entry docs around the fixed numbering contract, add MkDocs landing pages, and document the mirror mapping used for medicinal-chemistry comparisons. Also refresh the validation analysis reports to explain the canonical-versus-mirrored numbering relationship.
35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
PROJECT_ROOT = Path(__file__).resolve().parents[1]
|
|
|
|
|
|
def test_root_readme_documents_canonical_numbering() -> None:
|
|
readme = (PROJECT_ROOT / "README.md").read_text(encoding="utf-8")
|
|
|
|
assert "1 = 内酯羰基碳" in readme
|
|
assert "2 = 相邻酯氧" in readme
|
|
assert "3..N = 从 2 位出发沿环唯一图遍历顺序继续编号" in readme
|
|
assert "6 → 13" in readme
|
|
assert "7 → 12" in readme
|
|
|
|
|
|
def test_root_agents_exists_and_documents_numbering_invariants() -> None:
|
|
agents_path = PROJECT_ROOT / "AGENTS.md"
|
|
|
|
assert agents_path.exists()
|
|
agents = agents_path.read_text(encoding="utf-8")
|
|
assert "canonical numbering" in agents
|
|
assert "不是视觉顺时针" in agents
|
|
assert "bridge / fused multi-anchor" in agents
|
|
|
|
|
|
def test_mkdocs_ring_numbering_page_documents_mirror_mapping() -> None:
|
|
ring_doc = (PROJECT_ROOT / "docs" / "user-guide" / "ring-numbering.md").read_text(encoding="utf-8")
|
|
|
|
assert "p_mirror = ring_size - p + 3" in ring_doc
|
|
assert "6 → 13" in ring_doc
|
|
assert "15 → 4" in ring_doc
|