forked from aiidateam/aiida-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
124 lines (113 loc) · 3.36 KB
/
.pre-commit-config.yaml
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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
- id: double-quote-string-fixer
- id: end-of-file-fixer
- id: fix-encoding-pragma
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/ikamensh/flynt/
rev: '0.55'
hooks:
- id: flynt
args: [
'--line-length=120',
'--fail-on-change',
]
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.30.0
hooks:
- id: yapf
name: yapf
types: [python]
exclude: &exclude_files >
(?x)^(
docs/.*|
)$
args: ['-i']
- repo: local
hooks:
- id: mypy
name: mypy
entry: mypy
language: python
types: [python]
require_serial: true
pass_filenames: true
files: >-
(?x)^(
aiida/common/progress_reporter.py|
aiida/manage/manager.py|
aiida/engine/.*py|
aiida/manage/database/delete/nodes.py|
aiida/tools/graph/graph_traversers.py|
aiida/tools/groups/paths.py|
aiida/tools/importexport/archive/.*py|
aiida/tools/importexport/dbexport/__init__.py|
aiida/tools/importexport/dbimport/backends/.*.py|
)$
- id: pylint
name: pylint
entry: pylint
types: [python]
language: system
exclude: *exclude_files
- id: dm-generate-all
name: Update all requirements files
entry: python ./utils/dependency_management.py generate-all
language: system
pass_filenames: false
files: >-
(?x)^(
setup.py|
setup.json|
utils/dependency_management.py
)$
- id: pyproject
name: Validate pyproject.toml
entry: python ./utils/dependency_management.py validate-pyproject-toml
language: system
pass_filenames: false
files: >-
(?x)^(
setup.json|
setup.py|
utils/dependency_management.py|
pyproject.toml
)$
- id: dependencies
name: Validate environment.yml
entry: python ./utils/dependency_management.py validate-environment-yml
language: system
pass_filenames: false
files: >-
(?x)^(
setup.json|
setup.py|
utils/dependency_management.py|
environment.yml|
)$
- id: verdi-autodocs
name: Automatically generating verdi docs
entry: python ./utils/validate_consistency.py verdi-autodocs
language: system
pass_filenames: false
files: >-
(?x)^(
aiida/cmdline/commands/.*|
aiida/cmdline/params/.*|
aiida/cmdline/params/types/.*|
utils/validate_consistency.py|
)$
- id: version-number
name: Check version numbers
entry: python ./utils/validate_consistency.py version
language: system
pass_filenames: false
files: >-
(?x)^(
setup.json|
utils/validate_consistency.py|
aiida/__init__.py
)$