Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
90 lines (75 loc) · 2.29 KB
/
Copy pathMakefile
File metadata and controls
90 lines (75 loc) · 2.29 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
# Default target
.PHONY: all
all: help
## Clean up generated files and virtual environment
.PHONY: clean
clean:
rm -rf .venv
rm -rf __pycache__
rm -rf *.egg-info
rm -rf .pytest_cache
rm -rf dist
rm -rf build
## Run core tests (requires: uv sync --extra dev)
.PHONY: test
test:
uv run pytest tests/ --ignore=tests/test_voice --ignore=tests/test_streaming --ignore=tests/test_gym --ignore=tests/test_domains/test_banking_knowledge
## Run voice and streaming tests (requires: uv sync --extra dev --extra voice)
.PHONY: test-voice
test-voice:
uv run pytest tests/test_voice tests/test_streaming -m "not full_duplex_integration"
## Run knowledge/banking tests (requires: uv sync --extra dev --extra knowledge)
.PHONY: test-knowledge
test-knowledge:
uv run pytest tests/test_domains/test_banking_knowledge
## Run gymnasium tests (requires: uv sync --extra dev --extra gym)
.PHONY: test-gym
test-gym:
uv run pytest tests/test_gym
## Run all tests (requires: uv sync --all-extras)
.PHONY: test-all
test-all:
uv run pytest tests/
## Start the Environment CLI for interacting with domain environments
.PHONY: env-cli
env-cli:
uv run python -m tau2.environment.utils.interface_agent
## Lint code with ruff
.PHONY: lint
lint:
uv run ruff check .
## Format code with ruff
.PHONY: format
format:
uv run ruff format .
## Lint and fix issues automatically
.PHONY: lint-fix
lint-fix:
uv run ruff check --fix .
## Run both linting and formatting
.PHONY: check-all
check-all: lint format
## Generate leaderboard submission JSON schema from Pydantic models
.PHONY: generate-schema
generate-schema:
uv run python -m tau2.scripts.leaderboard.generate_schema
## Check that leaderboard submission JSON schema is up-to-date
.PHONY: check-schema
check-schema:
uv run python -m tau2.scripts.leaderboard.generate_schema --check
## Install pre-commit hooks
.PHONY: setup-hooks
setup-hooks:
uv run pre-commit install
## Display online help for commonly used targets in this Makefile
.PHONY: help
help:
@awk '/^[a-zA-Z_\/\.0-9-]+:/ { \
nb = sub( /^## /, "", helpMsg ); \
if (nb) \
print $$1 "\t" helpMsg; \
} \
{ helpMsg = $$0 }' $(MAKEFILE_LIST) | \
column -ts $$'\t' | \
expand -t 1 | \
grep --color '^[^ ]*'