-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathTaskfile.yaml
64 lines (57 loc) · 1.23 KB
/
Taskfile.yaml
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
version: "3"
dotenv: [ .env ]
tasks:
default:
cmds:
- ruff check .
- black .
- mypy .
gen-grpc:
desc: generate grpc python files
generates:
- ./api/**/*.py
sources:
- ./proto/**/*.proto
- poetry.lock
cmds:
- >-
python -m grpc_tools.protoc
-I ./proto/
--python_out=.
--pyi_out=.
--grpc_python_out=.
./proto/api/v1/timeline.proto
gen-orm:
desc: generate dataclasses from database
dotenv:
- .env
cmds:
- >-
sqlacodegen --generator dataclasses
--outfile chii/db/models.py
--noviews
'mysql+pymysql://{{.MYSQL_USER}}:{{.MYSQL_PASS}}@{{.MYSQL_HOST}}:{{.MYSQL_PORT}}/{{.MYSQL_DB}}'
dev:
dotenv:
- .env
sources:
- '*.py'
- 'chii/**/*.py'
- 'rpc/**/*.py'
generates:
- a-file-not-exists-so-it-always-rerun
cmd: python start_grpc_server.py
graphql:
dotenv:
- .env
sources:
- '*.py'
- 'chii/**/*.py'
- 'rpc/**/*.py'
- 'gql/**/*.py'
- 'gql/**/*.graphql'
generates:
- a-file-not-exists-so-it-always-rerun
cmds:
- uvicorn gql.app:app
mypy: mypy --show-column-numbers chii rpc