build: add Makefile with test/lint/build-tree/train targets

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-06 11:37:47 -04:00
parent dceec0d93c
commit 91e7746a89
+32
View File
@@ -0,0 +1,32 @@
.PHONY: test lint format wiki build-tree train infer generate-questions
ENV := Video-Tree-TRM
# ── 代码质量 ──
test:
conda run -n $(ENV) pytest tests/ --cov=core --cov=app --cov=adapters --cov-report=term-missing --cov-fail-under=80
lint:
conda run -n $(ENV) ruff check core/ app/ adapters/ --fix
format:
conda run -n $(ENV) ruff format core/ app/ adapters/
# ── 建树 ──
build-tree:
conda run -n $(ENV) python main.py build-tree $(ARGS)
# ── 训练 ──
train:
CUDA_VISIBLE_DEVICES=0 conda run -n $(ENV) python main.py train $(ARGS)
infer:
CUDA_VISIBLE_DEVICES=0 conda run -n $(ENV) python main.py infer $(ARGS)
# ── 新题构建 ──
generate-questions:
conda run -n $(ENV) python main.py generate-questions $(ARGS)
# ── 知识库 ──
wiki:
conda run -n $(ENV) python3 .claude/tools/research_wiki.py rebuild_index research-wiki/