acc419a29b
七轮人工审查的 88 条发现里,签名/导出/字段序/列数/env 键这几类是机械可 比对的,不该靠人一轮轮追。五项检查全部由源码反推,已用注入历史错误的方式 验证有效: gather_bounded(coros, limit)、source_name 排进前 11 位、列数写 成 20、EXTRA_BODY 漏文档 —— 四条全部命中。 不并入 make ci: wiki 是独立仓库,仓库里没有它时自动跳过等于静默降级(违 P5),故做成显式的 make wiki-check WIKI=<path>。
34 lines
1.1 KiB
Makefile
34 lines
1.1 KiB
Makefile
.PHONY: install test lint format check ci wiki wiki-check
|
|
|
|
ENV := PolyGateway
|
|
|
|
install:
|
|
conda run -n $(ENV) pip install -e ".[redis,postgres,structured,dev]"
|
|
|
|
test:
|
|
conda run -n $(ENV) pytest tests/ --cov=src/polygateway --cov-report=term-missing
|
|
|
|
lint:
|
|
conda run -n $(ENV) ruff check src/ tests/ --fix
|
|
conda run -n $(ENV) lint-imports
|
|
|
|
format:
|
|
conda run -n $(ENV) ruff format src/ tests/
|
|
|
|
check:
|
|
conda run -n $(ENV) ruff format --check src/ tests/
|
|
conda run -n $(ENV) ruff check src/ tests/
|
|
conda run -n $(ENV) lint-imports
|
|
|
|
ci: check test
|
|
|
|
wiki:
|
|
conda run -n $(ENV) python3 .claude/tools/research_wiki.py rebuild_index research-wiki/
|
|
|
|
# 用户文档站(Gitea Wiki)与源码的机械对齐校验。wiki 是独立仓库,须显式给路径:
|
|
# make wiki-check WIKI=~/PolyGateway.wiki
|
|
# 不并入 ci: 仓库里没有 wiki,自动跳过等于静默降级(违 P5),宁可让人显式跑。
|
|
wiki-check:
|
|
@test -n "$(WIKI)" || (echo "用法: make wiki-check WIKI=<PolyGateway.wiki 克隆路径>" && exit 1)
|
|
conda run -n $(ENV) python3 tools/check_wiki_alignment.py --wiki $(WIKI)
|