Repository navigation
Expand file tree
/
Copy pathTaskfile.yml
More file actions
164 lines (136 loc) · 4.13 KB
/
Copy pathTaskfile.yml
File metadata and controls
164 lines (136 loc) · 4.13 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
# 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
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 all automated app pytest categories (mirrors CI/prek)
cmds:
- rtk bash scripts/local/tests/pytest-app-ci.sh
pytest-unit:
desc: Run fast app unit + quality_metrics only
cmds:
- rtk bash scripts/local/tests/pytest-unit.sh
pytest-sdk-python:
desc: Run sdk/python binding tests
cmds:
- rtk bash scripts/local/tests/pytest-sdk-python.sh
test-gherkin:
desc: Run unit Gherkin BDD scenarios (pytest-bdd)
cmds:
- rtk uv run pytest src/tests/unit/gherkin -m gherkin
test-gherkin-integration:
desc: Run integration Gherkin scenarios (requires --run-integration)
cmds:
- rtk uv run pytest src/tests/integration/gherkin -m "integration and gherkin" --run-integration
test-cucumber:
desc: Run Rust cucumber BDD (cyt-indexer bm25 cohesion)
cmds:
- cargo test -p cyt-indexer --features testing --test cucumber_bm25_cohesion
test-mutation:
desc: Show mutation-testing scaffold docs (manual; not CI)
cmds:
- cat src/tests/mutation/README.md
- cat sdk/rust/cyt-indexer/tests/mutation/README.md
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-unit pytest-gherkin-unit pytest-quality-metrics pytest-coverage pytest-mutation pytest-sdk-python basedpyright ruff ruff-format --all-files
simulate-registry:
desc: Pre-publish wheel/npm smoke (manual prek hook)
cmds:
- uv run prek run simulate-registry --stage manual --all-files
ci:
desc: Mirror CI Python checks
cmds:
- task: sync
- task: verify-sdk
- task: ast-scan
- cmd: uv run python scripts/pre-commit-hooks/check_agent_imports.py
- cmd: uv run python scripts/pre-commit-hooks/check_cyt_client_imports.py
- task: ruff-check
- task: format-check
- task: mypy
- task: pytest
- task: pytest-sdk-python
- 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