-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
139 lines (120 loc) · 3.23 KB
/
Taskfile.yml
File metadata and controls
139 lines (120 loc) · 3.23 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
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
vars:
GREETING: Hello, world!
tasks:
default:
desc: Print a greeting message
cmds:
- echo "{{.GREETING}}"
silent: true
# This replaces your manual 'uv venv' and 'pip install' steps
setup:backend:
desc: "Create venv and sync dependencies"
dir: backend
cmds:
- uv sync
sources:
- pyproject.toml
- uv.lock
generates:
- .venv/pyvenv.cfg # Tells Task the venv is now "ready"
run:backend:
desc: "Start FastAPI"
deps: [setup:backend]
dir: backend
cmds:
- uv run uvicorn main:app --reload
# Database and data tasks
db:init:
desc: "Initialize database and fetch ticker data"
deps: [setup:backend]
dir: backend
cmds:
- uv run python scripts/init_db_and_fetch.py
db:migrate:
desc: "Run database migrations"
deps: [setup:backend]
dir: backend
cmds:
- uv run alembic upgrade head
db:migrate:rollback:
desc: "Rollback last database migration"
deps: [setup:backend]
dir: backend
cmds:
- uv run alembic downgrade -1
db:migrate:create:
desc: "Create a new database migration"
deps: [setup:backend]
dir: backend
cmds:
- uv run alembic revision --autogenerate -m "{{.CLI_ARGS}}"
data:fetch:
desc: "Fetch ticker data from Yahoo Finance"
deps: [setup:backend]
dir: backend
cmds:
- uv run python scripts/fetch_ticker_data.py
# Testing tasks
test:backend:
desc: "Run backend tests"
deps: [setup:backend]
dir: backend
cmds:
- uv run pytest
test:backend:cov:
desc: "Run backend tests with coverage"
deps: [setup:backend]
dir: backend
cmds:
- uv run pytest --cov=app --cov-report=html --cov-report=term
# Code quality tasks
lint:backend:
desc: "Lint backend code with ruff"
deps: [setup:backend]
dir: backend
cmds:
- uv run ruff check app/
format:backend:
desc: "Format backend code with black"
deps: [setup:backend]
dir: backend
cmds:
- uv run black app/
# Configuration demo
config:demo:
desc: "Run configuration system demo"
deps: [setup:backend]
dir: backend
cmds:
- uv run python examples/config_usage.py
# Frontend tasks
setup:frontend:
desc: "Install frontend dependencies"
dir: frontend
cmds:
- npm install
sources:
- package.json
- package-lock.json
generates:
- node_modules/.package-lock.json
run:frontend:
desc: "Start frontend development server"
deps: [setup:frontend]
dir: frontend
cmds:
- npm run dev
# Run both backend and frontend in parallel
run:dev:
desc: "Start both backend and frontend in parallel"
deps: [setup:backend, setup:frontend]
cmds:
- task --parallel run:backend run:frontend
# Sync frontend from quant-crew-ui to quant-crew/frontend
sync:frontend:
desc: "Sync frontend from ~/workspace/quant-crew-ui to frontend/"
cmds:
- rsync -av --delete --exclude 'node_modules' --exclude '.next' --exclude '.git' --exclude 'dist' --exclude 'build' ~/workspace/quant-crew-ui/ frontend/
- echo "✓ Frontend synced from ~/workspace/quant-crew-ui to frontend/"