-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile.yml
More file actions
181 lines (177 loc) · 4.82 KB
/
Copy pathTaskfile.yml
File metadata and controls
181 lines (177 loc) · 4.82 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
version: '1'
name: toonic
description: Minimal Taskfile
variables:
APP_NAME: toonic
environments:
local:
container_runtime: docker
compose_command: docker compose
pipeline:
python_version: "3.12"
runner_image: ubuntu-latest
branches: [main]
cache: [~/.cache/pip]
artifacts: [dist/]
stages:
- name: lint
tasks: [lint]
- name: test
tasks: [test]
- name: build
tasks: [build]
when: "branch:main"
tasks:
install:
desc: Install Python dependencies (editable)
cmds:
- pip install -e .[dev]
test:
desc: Run pytest suite
cmds:
- pytest -q
build:
desc: Build wheel + sdist
cmds:
- python -m build
clean:
desc: Remove build artefacts
cmds:
- rm -rf build/ dist/ *.egg-info
help:
desc: '[imported from Makefile] help'
cmds:
- echo "toonic — available tasks:"
- echo ""
- taskfile list
venv:
desc: '[imported from Makefile] venv'
cmds:
- python3 -m venv .venv
- $(PIP) install --upgrade pip
install-dev:
desc: '[imported from Makefile] install-dev'
cmds:
- $(PIP) install -e ".[dev,server]"
install-all:
desc: '[imported from Makefile] install-all'
cmds:
- $(PIP) install -e ".[all]"
install-llm:
desc: '[imported from Makefile] install-llm'
cmds:
- $(PIP) install litellm
test-server:
desc: '[imported from Makefile] test-server'
cmds:
- $(PYTEST) tests/test_server.py -v
test-cov:
desc: '[imported from Makefile] test-cov'
cmds:
- $(PYTEST) tests/ -v --cov=toonic --cov-report=html
server:
desc: '[imported from Makefile] server'
cmds:
- $(PYTHON) -m toonic.server --port $(PORT)
server-code:
desc: '[imported from Makefile] server-code'
cmds:
- $(PYTHON) -m toonic.server \
- --source file:./examples/code-analysis/sample-project/ \
- --port $(PORT) \
- --goal "find bugs, security issues, suggest improvements" \
- --interval 0
server-logs:
desc: '[imported from Makefile] server-logs'
cmds:
- $(PYTHON) -m toonic.server \
- --source log:./docker/test-data/sample.logfile \
- --port $(PORT) \
- --goal "monitor logs, detect errors" \
- --interval 10
server-camera:
desc: '[imported from Makefile] server-camera'
cmds:
- $(PYTHON) -m toonic.server \
- --source "rtsp://admin:123456@192.168.188.146:554/h264Preview_01_main" \
- --port $(PORT) \
- --goal "monitor video stream, detect changes" \
- --interval 15
server-multi:
desc: '[imported from Makefile] server-multi'
cmds:
- $(PYTHON) -m toonic.server \
- --source file:./examples/code-analysis/sample-project/ \
- --source log:./docker/test-data/sample.logfile \
- --source "rtsp://admin:123456@192.168.188.146:554/h264Preview_01_main" \
- --port $(PORT) \
- '--goal "comprehensive analysis: code + logs + video" \'
- --interval 30
client:
desc: '[imported from Makefile] client'
cmds:
- $(PYTHON) -m toonic.server.client
status:
desc: '[imported from Makefile] status'
cmds:
- $(PYTHON) -m toonic.server.client --status
docker-build:
desc: '[imported from Makefile] docker-build'
cmds:
- docker compose -f docker/docker-compose.yml build
docker-up:
desc: '[imported from Makefile] docker-up'
cmds:
- docker compose -f docker/docker-compose.yml up -d
docker-down:
desc: '[imported from Makefile] docker-down'
cmds:
- docker compose -f docker/docker-compose.yml down
docker-logs:
desc: '[imported from Makefile] docker-logs'
cmds:
- docker compose -f docker/docker-compose.yml logs -f toonic-server
docker-streams:
desc: '[imported from Makefile] docker-streams'
cmds:
- docker compose -f docker/docker-compose.yml up -d rtsp-server test-stream-video
test-stream-cam2 test-stream-audio
convert:
desc: '[imported from Makefile] convert'
cmds:
- $(PYTHON) -m toonic spec $(FILE) --format $(FMT)
batch:
desc: '[imported from Makefile] batch'
cmds:
- $(PYTHON) -m toonic batch $(DIR)
clean-docker:
desc: '[imported from Makefile] clean-docker'
cmds:
- docker compose -f docker/docker-compose.yml down -v --rmi local
health:
desc: '[from doql] workflow: health'
cmds:
- docker compose ps
- docker compose exec app echo "Health check passed"
import-makefile-hint:
desc: '[from doql] workflow: import-makefile-hint'
cmds:
- 'echo ''Run: taskfile import Makefile to import existing targets.'''
all:
desc: Run install, lint, test
cmds:
- taskfile run install
- taskfile run lint
- taskfile run test
fmt:
desc: Auto-format with ruff
cmds:
- ruff format .
lint:
desc: Run ruff lint check
cmds:
- ruff check .
format:
desc: Auto-format with ruff (alias of fmt)
cmds:
- ruff format .