-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
114 lines (99 loc) · 2.47 KB
/
Taskfile.yml
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
version: "3"
vars:
lib: heart-failure-prediction
python_version: 3.12
python_interpreter: python
tasks:
setup:
desc: Set up Anaconda environment
cmds:
- conda env create --name {{.lib}}
install:
desc: Install dependencies
cmds:
- conda env update --name {{.lib}} --prune
clean:
desc: Clean up artifacts
summary: Delete all build, test, coverage, and Python artifacts.
cmds:
- find . -type f -name "*.py[co]" -delete
- find . -type d -name "__pycache__" -delete
pre-commit:
desc: Run pre-commit hooks
summary: |
Run pre-commit hooks.
Runs all pre-commit hooks.
cmds:
- pre-commit run
pre-commit-all:
desc: Run pre-commit hooks on all files
summary: |
Run pre-commit hooks on all files.
Runs all pre-commit hooks on all files in the repository.
cmds:
- pre-commit run --all-files
lint:
desc: Run linter
summary: |
Run linting checks.
Lints all files using the Ruff linter.
cmds:
- ruff check
lint-fix:
desc: Run linter with auto-fix
summary: |
Run linting checks with auto-fix.
Lints all files using the Ruff linter, and fixes any fixable errors.
cmds:
- ruff check --fix --show-fixes
format:
desc: Run formatter
summary: |
Run formatting.
Formats source code using the Ruff formatter.
cmds:
- ruff format
format-check:
desc: Run format checker
summary: |
Run formatting checks.
Checks source code formatting using the Ruff formatter.
cmds:
- ruff format --check
typecheck:
desc: Run type-checker
summary: |
Run static type checks.
Type-checks using Pyright.
cmds:
- pyright
typecheck-stats:
desc: Run type-checker with stats
summary: |
Run static type checks with stats.
Type-checks using Pyright, and shows stats.
cmds:
- pyright --stats
test:
desc: Run tests
summary: |
Run all test cases.
Tests using pytest.
cmds:
- pytest
check-all:
desc: Run all checks and tests
summary: Run lint, typecheck, format-check and test tasks.
cmds:
- task: lint
- task: typecheck
- task: format-check
- task: test
check-all-fix:
desc: Run all checks and tests with auto-fix
summary: Run lint-fix, typecheck, format and test tasks.
cmds:
- task: lint-fix
- task: typecheck
- task: format
- task: test