-
Notifications
You must be signed in to change notification settings - Fork 488
Expand file tree
/
Copy pathMakefile
More file actions
79 lines (67 loc) · 2.19 KB
/
Makefile
File metadata and controls
79 lines (67 loc) · 2.19 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
export GIT_LFS_SKIP_SMUDGE=1
### Build and Test
.PHONY: update
update:
uv python list | grep 3.12
uv sync --all-extras --all-groups
uv lock
.PHONY: format
format:
uv run ruff format
uv run ruff check
.PHONY: lint
lint:
uv run ruff format --diff
.PHONY: test
test: update generate-test-certs
uv run pytest ./packages/**/tests/
.PHONY: build
build: update format
.PHONY: audit
audit: build
#check pip-audit is installed
uv run pip-audit --version || uv pip install pip-audit
uv run pip-audit
.PHONY: basic-langchain-sample
basic-langchain-sample:
docker build . -f samples/langgraph/currency/Dockerfile --tag localhost:5001/langgraph-currency:latest --push
.PHONY: research-crew-sample
research-crew-sample:
docker build . -f samples/crewai/research-crew/Dockerfile --tag localhost:5001/research-crew:latest --push
.PHONY: poem-flow-sample
poem-flow-sample:
docker build . -f samples/crewai/poem_flow/Dockerfile --tag localhost:5001/poem-flow:latest --push
.PHONY: generate-test-certs
generate-test-certs:
@CERT_DIR=packages/kagent-adk/tests/fixtures/certs; \
if [ -f "$$CERT_DIR/ca-cert.pem" ] && [ -f "$$CERT_DIR/server-cert.pem" ] && [ -f "$$CERT_DIR/server-key.pem" ]; then \
echo "Test certificates already exist, skipping generation"; \
else \
echo "Generating test certificates..."; \
cd $$CERT_DIR && \
openssl req -x509 -newkey rsa:4096 -nodes \
-keyout ca-key.pem \
-out ca-cert.pem \
-days 365 \
-subj "/CN=Test CA/O=Kagent Test/OU=Test" \
-extensions v3_ca \
-config ca-extensions.conf && \
openssl req -newkey rsa:4096 -nodes \
-keyout server-key.pem \
-out server-req.pem \
-subj "/CN=localhost/O=Kagent Test/OU=Test Server" && \
echo "subjectAltName=DNS:localhost,IP:127.0.0.1" > server-extensions.conf && \
openssl x509 -req \
-in server-req.pem \
-CA ca-cert.pem \
-CAkey ca-key.pem \
-CAcreateserial \
-out server-cert.pem \
-days 365 \
-extfile server-extensions.conf && \
rm -f server-extensions.conf server-req.pem && \
echo "Test certificates generated successfully"; \
fi
.PHONY: basic-openai-sample
basic-openai-sample:
docker build . -f samples/openai/basic_agent/Dockerfile --tag localhost:5001/basic-openai:latest --push