forked from yazmolod/pynspd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
80 lines (68 loc) · 1.49 KB
/
Taskfile.yml
File metadata and controls
80 lines (68 loc) · 1.49 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
# https://taskfile.dev
version: "3"
tasks:
default:
cmds:
- task: help
help:
desc: "Show this help"
cmds:
- task --list
install:
desc: Install all packages in venv using uv
cmds:
- uv sync --all-groups --all-extras --frozen
- uv run pre-commit install
lint:
desc: Format and lint code
cmds:
- uv run ruff check --fix
- uv run ruff check --select I --fix
- uv run ruff format
unasync:
desc: Generate sync version
cmds:
- uv run scripts/unasync.py
- task: lint
autogen:
desc: Sync layer models with current site state
cmds:
- uv run scripts/autogeneration.py
- task: lint
test:
desc: Run tests
cmds:
- uv run coverage run -m pytest tests
coverage:
desc: Show (and optionally update) code coverage
vars:
COVERALLS: "{{ .COVERALLS | default false }}"
cmds:
- uv run coverage html
- pwsh -c "Invoke-Expression "./htmlcov/index.html""
- |
if [ {{.COVERALLS}} = true ]; then
uv run coveralls;
fi
silent: true
publish:
desc: Publish to PyPI
dotenv:
- .env
cmds:
- rm -rf dist
- uv build
- uv publish
docs:
desc: Run mkdocs server
cmds:
- uv run mkdocs serve
release:
desc: Rolling up new release
vars:
GIT_TAG:
sh: uv run hatch version
cmds:
- git tag v{{ .GIT_TAG }}
- git push origin main --tags
- task: publish