-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
185 lines (150 loc) · 3.67 KB
/
Taskfile.yaml
File metadata and controls
185 lines (150 loc) · 3.67 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
182
183
184
185
# Taskfile.yaml - Task runner configuration
# Install Task: https://taskfile.dev/installation/
# Usage: task <task-name>
version: "3"
vars:
PYTHON: uv run python
UV: uv
tasks:
# Development setup
install:
desc: Install project dependencies
cmds:
- "{{.PYTHON}} -m duty install"
install-dev:
desc: Install project dependencies (including development extras)
cmds:
- "{{.PYTHON}} -m duty install_dev"
init:
desc: Initialize project for development
cmds:
- task: install-dev
- "{{.PYTHON}} -m duty init_project"
# Code quality
format:
desc: Format code with ruff
cmds:
- "{{.PYTHON}} -m duty format"
lint:
desc: Run linting with ruff
cmds:
- "{{.PYTHON}} -m duty lint"
lint-fix:
desc: Run linting with ruff and fix issues
cmds:
- "{{.PYTHON}} -m duty lint_fix"
type-check:
desc: Run type checking with mypy
cmds:
- "{{.PYTHON}} -m duty type_check"
# Testing
test:
desc: Run tests with pytest
cmds:
- "{{.PYTHON}} -m duty test"
test-cov:
desc: Run tests with coverage
cmds:
- "{{.PYTHON}} -m duty test_cov"
test-watch:
desc: Run tests in watch mode
cmds:
- "{{.PYTHON}} -m duty test_watch"
test-versions:
desc: Test package across supported Python versions
cmds:
- "{{.PYTHON}} -m duty test_versions"
# Security
security:
desc: Run security checks with bandit
cmds:
- "{{.PYTHON}} -m duty security"
deps-check:
desc: Check dependencies for vulnerabilities
cmds:
- "{{.PYTHON}} -m duty deps_check"
# Build and packaging
build:
desc: Build the package
cmds:
- "{{.PYTHON}} -m duty build"
clean:
desc: Clean up build artifacts and cache files
cmds:
- "{{.PYTHON}} -m duty clean"
# Documentation
docs-build:
desc: Build documentation
cmds:
- "{{.PYTHON}} -m duty docs_build"
docs-serve:
desc: Serve documentation locally
cmds:
- "{{.PYTHON}} -m duty docs_serve"
# Development workflows
check:
desc: Run all checks (format, lint, type-check, test)
cmds:
- "{{.PYTHON}} -m duty check_all"
pre-commit:
desc: Run pre-commit checks
cmds:
- "{{.PYTHON}} -m duty pre_commit"
pre-commit-install:
desc: Install pre-commit hooks
cmds:
- "{{.PYTHON}} -m duty pre_commit_install"
profile:
desc: Profile the code
cmds:
- "{{.PYTHON}} -m duty profile"
benchmark:
desc: Run benchmarks
cmds:
- "{{.PYTHON}} -m duty benchmark"
# Dependency management
update:
desc: Update dependencies
cmds:
- "{{.PYTHON}} -m duty update_deps"
# Utility tasks
help:
desc: Show available tasks
cmds:
- task --list
# Composite tasks for common workflows
ci:
desc: Run CI checks (format, lint, type-check, test, security)
cmds:
- task: format
- task: lint
- task: type-check
- task: test
- task: security
dev-setup:
desc: Complete development environment setup
cmds:
- task: install-dev
- task: pre-commit-install
- echo "Development environment ready!"
release-check:
desc: Run all checks before release
cmds:
- task: clean
- task: check
- task: security
- task: build
- echo "Release checks passed!"
# Version management with bump-my-version
release-patch:
desc: "Release mit Patch-Bump"
cmds:
- uv run duty release part=patch
release-minor:
desc: "Release mit Minor-Bump"
cmds:
- uv run duty release part=minor
release-major:
desc: "Release mit Major-Bump"
cmds:
- uv run duty release part=major