forked from ag2ai/ag2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
123 lines (96 loc) · 3.06 KB
/
Copy pathjustfile
File metadata and controls
123 lines (96 loc) · 3.06 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
# Cross-platform shell configuration
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
set shell := ["sh", "-c"]
set dotenv-load := true
set dotenv-required := false
[doc("All command information")]
default:
@just --list --unsorted --list-heading $'AG2 commands\n'
# Tests
_beta_llm_filter := "not (openai or openai_realtime or gemini or gemini_realtime or anthropic or deepseek or ollama or bedrock or cerebras)"
[doc("Run beta tests")]
[group("tests")]
test-beta *params:
pytest -vv --durations=10 --durations-min=1.0 \
-m "{{ _beta_llm_filter }}" \
test/beta/ {{ params }}
[doc("Run beta tests with coverage")]
[group("tests")]
test-beta-cov *params:
pytest -vv --durations=10 --durations-min=1.0 \
--cov=autogen/beta --cov-branch --cov-report=xml \
-m "{{ _beta_llm_filter }}" \
test/beta/ {{ params }}
coverage report -m --include="autogen/beta/*"
_beta_llm_default_mark := "openai or gemini or anthropic or ollama or dashscope"
[doc("Run beta tests with LLM (e.g. just test-beta-llm openai)")]
[group("tests")]
test-beta-llm mark=_beta_llm_default_mark *params:
pytest --ff -vv --durations=10 --durations-min=1.0 \
-m "{{ mark }}" \
test/beta/ {{ params }}
[doc("Run beta tests with LLM and coverage (e.g. just test-beta-llm-cov openai)")]
[group("tests")]
test-beta-llm-cov mark=_beta_llm_default_mark *params:
pytest --ff -vv --durations=10 --durations-min=1.0 \
--cov=autogen/beta/config --cov-branch --cov-report=xml \
-m "{{ mark }}" \
test/beta/ {{ params }}
coverage report -m --include="autogen/beta/config/*"
[doc("Run all beta tests (with and without LLMs)")]
[group("tests")]
test-beta-all *params:
pytest --ff -vv --durations=10 --durations-min=1.0 \
test/beta/ {{ params }}
[doc("Run all beta tests with coverage")]
[group("tests")]
test-beta-all-cov *params:
pytest --ff -vv --durations=10 --durations-min=1.0 \
--cov=autogen/beta --cov-branch --cov-report=xml \
test/beta/ {{ params }}
coverage report -m --include="autogen/beta/*"
# Linter
[doc("Ruff check")]
[group("linter")]
ruff-check *params:
ruff check {{ params }}
[doc("Ruff format")]
[group("linter")]
ruff-format *params:
ruff format {{ params }}
[doc("Check typos (codespell + prek typos)")]
[group("linter")]
typos:
prek run --all-files codespell
prek run --all-files typos
[doc("Run ruff check + format")]
[group("linter")]
lint: ruff-check ruff-format typos
prek run --all-files check-license-headers
# Static analysis
[doc("Run mypy type check")]
[group("static analysis")]
mypy *params:
mypy {{ params }}
# Prek
[doc("Install prek hooks")]
[group("prek")]
pre-commit-install:
prek install
[doc("Run prek on modified files")]
[group("prek")]
pre-commit:
prek run
[doc("Run prek on all files")]
[group("prek")]
pre-commit-all:
prek run --all-files
# Docs
[doc("Build documentation")]
[group("docs")]
docs-build *params:
cd website/mkdocs && python docs.py build {{ params }}
[doc("Serve documentation locally")]
[group("docs")]
docs-serve *params: docs-build
cd website/mkdocs && python docs.py live {{ params }}