From 91e7746a89d5172dbdf176ef976b58aa9ff4712c Mon Sep 17 00:00:00 2001 From: iomgaa Date: Mon, 6 Jul 2026 11:37:47 -0400 Subject: [PATCH] build: add Makefile with test/lint/build-tree/train targets Co-Authored-By: Claude Opus 4.6 (1M context) --- Makefile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6a32ab6 --- /dev/null +++ b/Makefile @@ -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/