-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (52 loc) · 1.51 KB
/
Copy pathMakefile
File metadata and controls
61 lines (52 loc) · 1.51 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
.PHONY: checks
checks: ruff mypy
.PHONY: ruff
ruff:
@if command -v uv >/dev/null 2>&1; then \
uv run ruff check .; \
else \
ruff check .; \
fi
.PHONY: mypy
mypy:
@if command -v uv >/dev/null 2>&1; then \
uv run mypy .; \
else \
mypy .; \
fi
.PHONY: coverage
coverage:
@if command -v uv >/dev/null 2>&1; then \
uv run coverage run -m pytest; \
else \
coverage run -m pytest; \
fi
.PHONY: coverage-report
coverage-report:
@if command -v uv >/dev/null 2>&1; then \
uv run coverage report; \
else \
coverage report; \
fi
.PHONY: coverage-html
coverage-html: coverage
@if command -v uv >/dev/null 2>&1; then \
uv run coverage html; \
else \
coverage html; \
fi
open htmlcov/index.html || echo "Open htmlcov/index.html in your browser to view the coverage report."
.PHONY: container-local
DOCKER_TAG := $(shell git branch --show-current | tr -c '[:alnum:]._-' '-')
container-local:
docker buildx build -t ghcr.io/cisco-talos/peak-assistant:$(DOCKER_TAG) --load .
.PHONY: container-run
container-run: container-local
docker run --rm -it \
--mount "type=bind,src=$(PWD)/cert.pem,target=/certs/cert.pem" \
--mount "type=bind,src=$(PWD)/key.pem,target=/certs/key.pem" \
--mount "type=bind,src=$(PWD)/context.txt,target=/home/peakassistant/context.txt" \
--mount "type=bind,src=$(PWD)/.env,target=/home/peakassistant/.env" \
--mount "type=bind,src=$(PWD)/mcp_servers.json,target=/home/peakassistant/mcp_servers.json" \
-p "127.0.0.1:8501:8501" \
ghcr.io/cisco-talos/peak-assistant:$(DOCKER_TAG)