forked from aiidateam/aiida-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
157 lines (144 loc) · 4.71 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
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
ci:
autoupdate_schedule: monthly
autofix_prs: true
skip: [mypy, pylint, dm-generate-all, dependencies, verdi-autodocs]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: double-quote-string-fixer
- id: end-of-file-fixer
exclude: &exclude_pre_commit_hooks >
(?x)^(
tests/.*(?<!\.py)$|
docs/source/.+\.aiida/repo/.+|
)$
- id: fix-encoding-pragma
- id: mixed-line-ending
- id: trailing-whitespace
exclude: *exclude_pre_commit_hooks
- id: check-yaml
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/ikamensh/flynt/
rev: '0.76'
hooks:
- id: flynt
args: [
'--line-length=120',
'--fail-on-change',
]
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.32.0
hooks:
- id: yapf
name: yapf
types: [python]
exclude: &exclude_files >
(?x)^(
docs/.*|
)$
args: ['-i']
additional_dependencies: ['toml']
- repo: local
hooks:
- id: imports
name: imports
entry: python utils/make_all.py
language: python
types: [python]
require_serial: true
pass_filenames: false
files: aiida/.*py
- id: mypy
name: mypy
entry: mypy
args: [--config-file=pyproject.toml]
language: python
types: [python]
require_serial: true
pass_filenames: true
files: >-
(?x)^(
aiida/common/progress_reporter.py|
aiida/engine/.*py|
aiida/manage/manager.py|
aiida/manage/database/delete/nodes.py|
aiida/orm/querybuilder.py|
aiida/orm/implementation/entities.py|
aiida/orm/implementation/storage_backend.py|
aiida/orm/implementation/authinfos.py|
aiida/orm/implementation/comments.py|
aiida/orm/implementation/computers.py|
aiida/orm/implementation/groups.py|
aiida/orm/implementation/logs.py|
aiida/orm/implementation/nodes.py|
aiida/orm/implementation/users.py|
aiida/orm/implementation/querybuilder.py|
aiida/orm/entities.py|
aiida/orm/authinfos.py|
aiida/orm/comments.py|
aiida/orm/computers.py|
aiida/orm/groups.py|
aiida/orm/logs.py|
aiida/orm/users.py|
aiida/orm/nodes/data/enum.py|
aiida/orm/nodes/data/jsonable.py|
aiida/orm/nodes/attributes.py|
aiida/orm/nodes/node.py|
aiida/orm/nodes/process/.*py|
aiida/orm/nodes/repository.py|
aiida/orm/utils/links.py|
aiida/plugins/entry_point.py|
aiida/plugins/factories.py|
aiida/repository/.*py|
aiida/storage/control.py|
aiida/storage/psql_dos/backend.py|
aiida/storage/psql_dos/orm/querybuilder/.*py|
aiida/storage/psql_dos/utils.py|
aiida/storage/sqlite_zip/.*.py|
aiida/tools/graph/graph_traversers.py|
aiida/tools/groups/paths.py|
aiida/tools/archive/.*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)^(
pyproject.toml|
utils/dependency_management.py
)$
- id: dependencies
name: Validate environment.yml
entry: python ./utils/dependency_management.py validate-environment-yml
language: system
pass_filenames: false
files: >-
(?x)^(
pyproject.toml|
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|
)$