docs: 文档清理与重构 — 统一为 3 个核心文档
- 删除 5 个过时/残留文档(project_plan/agent_prompt/optimization_plan/report_db_design/deploy/README) - 新建 docs/architecture.md(项目架构:11 包职责+数据模型+配置+产物) - 重写 docs/user-guide.md(CLI 全量+增量/断点续跑+MCP+FAQ) - 重写 README.md(精简入口+文档索引) - 更新 continuation.md(追加本次记录) - 更新 .gitignore(排除 data/* 运行产物)
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
"""pytest 共享 fixture。"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def sample_sources_yaml(tmp_path: Path) -> Path:
|
||||
"""生成最小可用 sources.yaml 用于测试。"""
|
||||
content = """
|
||||
settings:
|
||||
concurrency: 2
|
||||
retry_max_attempts: 2
|
||||
retry_min_wait_sec: 0.01
|
||||
retry_max_wait_sec: 0.02
|
||||
headless: true
|
||||
output_root: data/raw
|
||||
|
||||
sources:
|
||||
- id: testsrc
|
||||
name: 测试源
|
||||
enabled: true
|
||||
homepage: https://example.com/list
|
||||
article_url_pattern: '^https://example\\.com/article/\\d+$'
|
||||
js_render: false
|
||||
page_timeout_ms: 5000
|
||||
max_articles_per_run: 5
|
||||
"""
|
||||
p = tmp_path / "sources.yaml"
|
||||
p.write_text(content, encoding="utf-8")
|
||||
return p
|
||||
Reference in New Issue
Block a user