-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
99 lines (85 loc) · 2.88 KB
/
Copy pathjustfile
File metadata and controls
99 lines (85 loc) · 2.88 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
set shell := ["bash", "-c"]
# デフォルトは利用可能なレシピ一覧を表示
default:
just --list
# 依存関係とブラウザスタブをまとめて初期化
setup:
set -euo pipefail
if [ "${OS:-}" = "Windows_NT" ]; then
if command -v pwsh >/dev/null 2>&1; then
pwsh -NoProfile -File scripts/bootstrap.ps1
else
powershell.exe -NoProfile -File scripts/bootstrap.ps1
fi
else
bash scripts/bootstrap.sh
fi
node-test:
set -euo pipefail
npm run spec:validate
npm run e2e:gen
bash scripts/run-node-suite.sh
npm run ci:analyze
npm run ci:issue
node --test tests/e2e-shadow.test.mjs
python-test:
set -euo pipefail
PYTHONPATH=projects/04-llm-adapter \
./.venv/bin/pytest -q projects/04-llm-adapter/tests
# Node と Python のテストスイートを一括実行
test: node-test python-test
# JS 構文チェックと Python バイトコード検証
lint:
set -euo pipefail
JS_FILES=$(find . -type f \( -name '*.mjs' -o -name '*.js' \))
if [ -n "${JS_FILES}" ]; then
for file in ${JS_FILES}; do
node --check "${file}"
done
else
echo "No JavaScript modules found"
fi
PYTHONPATH=projects/04-llm-adapter \
./.venv/bin/python -m compileall projects/04-llm-adapter/adapter
# 週次サマリ生成
weekly-summary:
set -euo pipefail
PYTHONPATH=projects/04-llm-adapter \
./.venv/bin/python - <<'PY'
from pathlib import Path
from tools.report.metrics.data import (
build_failure_summary,
build_openrouter_http_failures,
load_metrics,
)
from tools.report.metrics.weekly_summary import update_weekly_summary
metrics_path = Path("artifacts/runs-metrics.jsonl")
weekly_path = Path("docs/weekly-summary.md")
if metrics_path.exists():
metrics = load_metrics(metrics_path)
else:
metrics = []
failure_total, failure_summary = build_failure_summary(metrics)
_, openrouter_http_failures = build_openrouter_http_failures(metrics)
update_weekly_summary(
weekly_path,
failure_total,
failure_summary,
openrouter_http_failures=openrouter_http_failures,
)
PY
# Python プロジェクトのカバレッジ付きレポート生成
report:
set -euo pipefail
just test
PYTHONPATH=projects/04-llm-adapter \
./.venv/bin/pytest --cov=adapter --cov-report=xml --cov-report=term-missing projects/04-llm-adapter/tests
just weekly-summary
openrouter-stream-probe *args:
set -euo pipefail
PYTHONPATH=projects/04-llm-adapter \
./.venv/bin/python -m tools.openrouter.stream_probe "$@"
openrouter-stats *args:
set -euo pipefail
PYTHONPATH=projects/04-llm-adapter \
./.venv/bin/python -m tools.report.metrics.openrouter_stats --metrics artifacts/runs-metrics.jsonl --out artifacts/openrouter "$@"