-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTaskfile.yml
More file actions
124 lines (103 loc) · 2.67 KB
/
Copy pathTaskfile.yml
File metadata and controls
124 lines (103 loc) · 2.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
# yaml-language-server: $schema=https://taskfile.dev/schema.json
# All:
# task sync ruff-check format-check build verify-sdk prek ci all-tests
version: "3"
dir: "{{.TASKFILE_DIR}}"
vars:
PYTHON_VERSION: "3.13"
env:
PATH: "{{.ROOT_DIR}}/.venv/bin:{{.PATH}}"
tasks:
sync:
desc: Install/sync Python dependencies with uv
cmds:
- rtk uv sync --all-extras --group dev --group test --locked
check:
desc: Run ty type checker
cmds:
- rtk uv run ty check src/ --project . --output-format=concise
ruff:
desc: Lint with auto-fix
cmds:
- rtk uv run ruff check --fix src/cyt src/tests sdk/python
ruff-check:
desc: Lint without auto-fix (CI mode)
cmds:
- rtk uv run ruff check src/cyt src/tests sdk/python
format:
desc: Format code
cmds:
- rtk uv run ruff format src/cyt src/tests sdk/python
format-check:
desc: Check formatting (CI mode)
cmds:
- rtk uv run ruff format --check src/cyt src/tests sdk/python
mypy:
desc: Run mypy static analysis
cmds:
- rtk uv run mypy -p cyt
pytest:
desc: Run tests
cmds:
- rtk uv run pytest src/tests
ast-test:
desc: Test ast-grep lint rules
cmds:
- rtk ast-grep test --skip-snapshot-tests
ast-scan:
desc: Pattern-based security/quality scan
cmds:
- rtk ast-grep scan src/ sdk/
right:
desc: Run BasedPyright static analysis
cmds:
- rtk basedpyright src sdk/python/src
build:
desc: Build Python package wheel/sdist
cmds:
- rtk uv build
verify-sdk:
desc: Verify cyt-indexer-sdk native import
cmds:
- rtk uv run python -c "from cyt_indexer._native import build_catalog_index; assert callable(build_catalog_index)"
prek:
desc: Run Python pre-commit hooks
cmds:
- rtk uv run prek run ty-check mypy pytest basedpyright ruff ruff-format --all-files
ci:
desc: Mirror CI Python checks
cmds:
- task: sync
- task: verify-sdk
- task: ruff-check
- task: format-check
- task: mypy
- task: pytest
- task: build
all-tests:
desc: Run all checks, continue on failure
cmds:
- task: check
ignore_error: true
- task: ruff
ignore_error: true
- task: format
ignore_error: true
- task: mypy
ignore_error: true
- task: pytest
ignore_error: true
- task: ast-scan
ignore_error: true
- task: right
ignore_error: true
all-seq:
desc: Run all checks sequentially, stop on failure
cmds:
- task: check
- task: ruff
- task: format
- task: mypy
- task: pytest
- task: ast-scan
- task: right