-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
95 lines (92 loc) · 2.06 KB
/
.pre-commit-config.yaml
File metadata and controls
95 lines (92 loc) · 2.06 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
repos:
# dvc state correctness checks
- repo: https://github.com/iterative/dvc
rev: 3.9.0
hooks:
- id: dvc-pre-commit
additional_dependencies:
- .[s3]
language_version: python3
stages:
- commit
- id: dvc-pre-push
additional_dependencies:
- .[s3]
language_version: python3
stages:
- push
- id: dvc-post-checkout
additional_dependencies:
- .[s3]
language_version: python3
stages:
- post-checkout
always_run: true
- repo: https://github.com/iterative/dvc
rev: 3.9.0
hooks:
- id: dvc-pre-commit
additional_dependencies:
- .[all]
language_version: python3
stages:
- commit
- id: dvc-pre-push
additional_dependencies:
- .[all]
language_version: python3
stages:
- push
- id: dvc-post-checkout
additional_dependencies:
- .[all]
language_version: python3
stages:
- post-checkout
always_run: true
# common handy checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
args: ['--maxkb=1000']
exclude: notebooks
# local code quality checks
- repo: local
hooks:
- id: style
name: format code
entry: make style COMM=1
language: system
pass_filenames: false
stages:
- commit
- id: types
name: check static types
entry: make types COMM=1
language: system
pass_filenames: false
stages:
- commit
- id: lint
name: check code quality
entry: make lint COMM=1
language: system
pass_filenames: false
stages:
- commit
- id: tests
name: run tests
entry: make tests
language: system
pass_filenames: false
stages:
- push # run tests only when pushing to remote
- id: clean
name: clean files
entry: make clean
language: system
pass_filenames: false