-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (38 loc) · 1.38 KB
/
Copy pathMakefile
File metadata and controls
50 lines (38 loc) · 1.38 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
.PHONY: install lint typecheck test test-unit test-integration test-e2e server-up server-down smoke-test clean
install:
uv sync --all-extras
lint:
uv run ruff check src/ tests/
uv run ruff format --check src/ tests/
format:
uv run ruff format src/ tests/
uv run ruff check --fix src/ tests/
typecheck:
uv run mypy src/
test-unit:
uv run pytest tests/test_tools_unit.py -v --cov=agno_opensandbox_toolkit --cov-report=term-missing
test-integration:
OPENSANDBOX_DOMAIN=localhost:8080 uv run pytest tests/test_tools_integration.py -v -m integration
test-e2e:
OPENSANDBOX_DOMAIN=localhost:8080 uv run pytest tests/test_agent_e2e.py -v -m e2e
test: test-unit
server-up:
cd infra && docker compose up -d
@echo "Waiting for server..."
@until curl -sf http://localhost:8080/health > /dev/null 2>&1; do sleep 2; done
@echo "OpenSandbox server is ready at http://localhost:8080"
server-down:
cd infra && docker compose down
smoke-test:
uv run python -c "\
from opensandbox import SandboxSync; \
from opensandbox.config import ConnectionConfigSync; \
config = ConnectionConfigSync(domain='localhost:8080'); \
sb = SandboxSync.create('ubuntu', connection_config=config); \
print(f'Created: {sb.id}'); \
r = sb.commands.run('echo OK'); \
print(f'Output: {r.logs.stdout[0].text}'); \
sb.kill(); \
print('PASSED')"
clean:
rm -rf .venv dist build *.egg-info .pytest_cache .mypy_cache .coverage htmlcov