Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
126 lines (90 loc) · 3.18 KB
/
Copy pathMakefile
File metadata and controls
126 lines (90 loc) · 3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
.PHONY: lint test ci-test install-hooks format lint-py lint-js typecheck complexity audit-dev catalog export export-check search ingest log coverage graph topic-diagnose anki slides fetch vectors eval-search ci-preflight ci-check pr-check sync-main bump-wiki-from-sources paper-notebook-links paper-notebook-bootstrap paper-notebook-dedupe paper-notebook-summaries rl-sim2sim-demo-links
# 与 .github/workflows/tests.yml 步骤顺序一致(不含 Wiki lint)
ci-test:
ruff check scripts tests
ruff format --check scripts tests
PYTHONPATH=scripts mypy scripts
python3 -m pip_audit -r requirements-dev.txt
npm ci
npm run lint:js
npm run lint:mermaid
npm run test:frontend
PYTHONPATH=scripts python3 -m pytest
lint:
python3 scripts/eval_search_quality.py
python3 scripts/lint_wiki.py
# 与 CI tests job 对齐:pytest(含覆盖率阈值)、ruff、mypy、pip-audit 见下方目标
test:
PYTHONPATH=scripts python3 -m pytest
install-hooks:
pre-commit install
format:
ruff format scripts tests
lint-py:
ruff check scripts tests
ruff format --check scripts tests
lint-js:
npx --yes eslint docs/main.js
typecheck:
PYTHONPATH=scripts mypy scripts
complexity:
radon cc scripts -a -nc | tail -30
audit-dev:
python3 -m pip_audit -r requirements-dev.txt
catalog:
python3 scripts/generate_page_catalog.py
export:
python3 scripts/export_minimal.py
vectors:
python3 scripts/build_vector_index.py
export-check:
python3 scripts/check_export_quality.py
eval-search:
python3 scripts/eval_search_quality.py
search:
python3 scripts/search_wiki.py $(Q)
ingest:
python3 scripts/ingest_paper.py $(NAME) --title "$(TITLE)" --desc "$(DESC)" --suggest-updates
log:
python3 scripts/append_log.py $(OP) "$(DESC)"
sync:
./scripts/sync_wiki.sh "$(DESC)"
coverage:
python3 scripts/ingest_coverage.py $(F)
graph:
python3 scripts/generate_link_graph.py
python3 scripts/generate_home_stats.py
python3 scripts/graph_exports_sync.py
topic-diagnose:
python3 scripts/diagnose_topics.py
anki:
python3 scripts/export_anki.py
slides:
python3 scripts/wiki_to_marp.py $(F)
fetch:
python3 scripts/fetch_to_source.py $(URL) --name $(NAME)
# 部署时由 pages.yml 调用:会改 docs/index.html / docs/sw.js 工作区副本,勿提交这些改动
sync-stats:
python3 scripts/sync_all_stats.py
paper-notebook-links:
python3 scripts/sync_paper_notebook_links.py
paper-notebook-bootstrap:
PYTHONPATH=scripts python3 scripts/bootstrap_paper_notebook_knowledge.py
paper-notebook-dedupe:
PYTHONPATH=scripts python3 scripts/dedupe_paper_notebook_nodes.py
paper-notebook-summaries:
python3 scripts/sync_paper_notebook_summaries.py
rl-sim2sim-demo-links:
python3 scripts/sync_rl_sim2sim_demo_links.py
bump-wiki-from-sources:
python3 scripts/bump_wiki_updated_for_sources.py
ci-preflight:
python3 scripts/ci_preflight.py
ci-check:
python3 scripts/ci_preflight.py --check-generated-clean
# PR 不得修改 catalog.md / log.md / 部署生成的统计文件(lint.yml 在 PR 上同样检查)
pr-check:
python3 scripts/pr_derived_guard.py check
# 合入 origin/main;上述文件的冲突自动以 main 为准,分支写进 log.md 的条目转存为 log.d/ 碎片
sync-main:
python3 scripts/pr_derived_guard.py sync