forked from openai/openai-agents-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
148 lines (114 loc) · 3.94 KB
/
Copy pathMakefile
File metadata and controls
148 lines (114 loc) · 3.94 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
.PHONY: sync
sync:
uv sync --all-extras --all-packages --group dev
.PHONY: update-rclone-pin
update-rclone-pin:
uv run python .github/scripts/update_rclone_pin.py --cooldown-days $(or $(RCLONE_COOLDOWN_DAYS),7) $(if $(RCLONE_VERSION),--version $(RCLONE_VERSION))
.PHONY: format
format:
uv run ruff format
uv run ruff check --fix
.PHONY: format-check
format-check:
uv run ruff format --check
.PHONY: lint
lint:
uv run ruff check
.PHONY: mypy
mypy:
uv run mypy . --exclude site
.PHONY: pyright
pyright:
uv run pyright --project pyrightconfig.json
.PHONY: typecheck
typecheck:
@set -eu; \
mypy_pid=''; \
pyright_pid=''; \
trap 'test -n "$$mypy_pid" && kill $$mypy_pid 2>/dev/null || true; test -n "$$pyright_pid" && kill $$pyright_pid 2>/dev/null || true' EXIT INT TERM; \
echo "Running make mypy and make pyright in parallel..."; \
$(MAKE) mypy & mypy_pid=$$!; \
$(MAKE) pyright & pyright_pid=$$!; \
wait $$mypy_pid; \
wait $$pyright_pid; \
trap - EXIT
.PHONY: tests
tests: tests-parallel tests-serial
.PHONY: tests-asyncio-stability
tests-asyncio-stability:
bash .github/scripts/run-asyncio-teardown-stability.sh
.PHONY: tests-parallel
tests-parallel:
uv run pytest -n auto --dist loadfile -m "not serial"
.PHONY: tests-serial
tests-serial:
uv run pytest -m serial
.PHONY: integration-tests
integration-tests:
uv run python .github/scripts/run_integration_tests.py --profile full $(filter --all,$(MAKECMDGOALS))
.PHONY: integration-tests-release
integration-tests-release:
uv run python .github/scripts/run_integration_tests.py --profile release $(filter --all,$(MAKECMDGOALS))
.PHONY: integration-tests-nightly
integration-tests-nightly:
uv run python .github/scripts/run_integration_tests.py --profile nightly $(filter --all,$(MAKECMDGOALS))
.PHONY: integration-tests-manual
integration-tests-manual:
uv run python .github/scripts/run_integration_tests.py --profile manual $(filter --all,$(MAKECMDGOALS))
.PHONY: integration-tests-packaging
integration-tests-packaging:
uv run python .github/scripts/run_integration_tests.py --profile packaging
.PHONY: integration-tests-core
integration-tests-core:
uv run python .github/scripts/run_integration_tests.py --profile core
.PHONY: integration-tests-providers
integration-tests-providers:
uv run python .github/scripts/run_integration_tests.py --profile providers $(filter --all,$(MAKECMDGOALS))
.PHONY: integration-tests-providers-external
integration-tests-providers-external:
OPENAI_AGENTS_INTEGRATION_EXTERNAL_PROVIDERS=1 uv run python .github/scripts/run_integration_tests.py --profile providers $(filter --all,$(MAKECMDGOALS))
.PHONY: integration-tests-providers-all
integration-tests-providers-all:
uv run python .github/scripts/run_integration_tests.py --profile providers --all
.PHONY: --all
--all:
@:
.PHONY: integration-tests-realtime
integration-tests-realtime:
uv run python .github/scripts/run_integration_tests.py --profile realtime
.PHONY: integration-tests-voice
integration-tests-voice:
uv run python .github/scripts/run_integration_tests.py --profile voice
.PHONY: integration-tests-hosted
integration-tests-hosted:
uv run python .github/scripts/run_integration_tests.py --profile hosted
.PHONY: integration-tests-extras
integration-tests-extras:
uv run python .github/scripts/run_integration_tests.py --profile extras
.PHONY: coverage
coverage:
uv run coverage run -m pytest
uv run coverage xml -o coverage.xml
uv run coverage report -m --fail-under=85
.PHONY: snapshots-fix
snapshots-fix:
uv run pytest --inline-snapshot=fix
.PHONY: snapshots-create
snapshots-create:
uv run pytest --inline-snapshot=create
.PHONY: build-docs
build-docs:
uv run docs/scripts/generate_ref_files.py
uv run mkdocs build
.PHONY: build-full-docs
build-full-docs:
uv run docs/scripts/translate_docs.py
uv run mkdocs build
.PHONY: serve-docs
serve-docs:
uv run mkdocs serve
.PHONY: deploy-docs
deploy-docs:
uv run mkdocs gh-deploy --force --verbose
.PHONY: check
check: format-check lint typecheck tests