-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathTaskfile.yml
More file actions
85 lines (71 loc) · 1.92 KB
/
Copy pathTaskfile.yml
File metadata and controls
85 lines (71 loc) · 1.92 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
version: "3"
vars:
APP: poptimizer
TOOLS: go-task uv npm mongodb-community mongodb-compass
tasks:
default:
desc: List available tasks
cmds:
- task -l
install:
desc: Setup venv, install tools and dependencies
cmds:
- brew tap mongodb/brew
- brew reinstall {{.TOOLS}}
- uv sync --frozen
mongo:
desc: Run MongoDB server service
cmds:
- brew services start mongodb-community
mongo_stop:
desc: Run MongoDB server service
cmds:
- brew services stop mongodb-community
update_tools:
desc: Update tools
cmds:
- brew upgrade {{.TOOLS}}
update:
desc: Update tools and dependencies
deps: [ update_tools ]
cmds:
- uv sync --upgrade
- curl -o poptimizer/views/web/static/js/htmx.min.js https://cdn.jsdelivr.net/npm/htmx.org/dist/htmx.min.js
- curl -o poptimizer/views/web/static/js/idiomorph.min.js https://cdn.jsdelivr.net/npm/idiomorph/dist/idiomorph-ext.min.js
update_ver:
desc: Update POptimizer version
deps: [ update_tools ]
cmds:
- rm -rf backup
- mkdir backup
- cp -r $(ls -A | grep -vF -e .venv -e .git) backup
- git reset --hard
- git pull
reset_div:
desc: Reset dividends to reload from backup on next start
cmds:
- uv run {{.APP}} reset_div
revert_ver:
desc: Revert POptimizer to version form backup
cmds:
- rm -rf $(ls -A | grep -vF -e backup -e .venv -e .git)
- cp -r backup/. .
run:
desc: Run POptimizer
cmds:
- uv run {{.APP}} run
format:
desc: Format
cmds:
- uv run ruff format {{.APP}}
- uv run ruff check {{.APP}} --unsafe-fixes --exit-zero
lint:
desc: Lint
cmds:
- uv run ruff format {{.APP}} --check
- uv run ruff check {{.APP}} --unsafe-fixes --exit-non-zero-on-fix
- uv run pyright {{.APP}}
test:
desc: Test
cmds:
- uv run pytest {{.APP}} --cov={{.APP}}