forked from aiidateam/aiida-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
241 lines (225 loc) · 9.09 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
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.4.0
hooks:
- id: double-quote-string-fixer
- id: end-of-file-fixer
exclude: &exclude_pre_commit_hooks >
(?x)^(
tests/.*(?<!\.py)$|
docs/source/.+\.aiida/repo/.+|
CHANGELOG.md|
)$
- 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.12.0
hooks:
- id: isort
- repo: https://github.com/ikamensh/flynt/
rev: '0.78'
hooks:
- id: flynt
args: [
'--line-length=120',
'--fail-on-change',
]
- repo: https://github.com/google/yapf
rev: v0.33.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
exclude: >-
(?x)^(
.github/.*|
.molecule/.*|
docs/.*|
utils/.*|
aiida/calculations/arithmetic/add.py|
aiida/calculations/diff_tutorial/calculations.py|
aiida/calculations/templatereplacer.py|
aiida/calculations/transfer.py|
aiida/cmdline/commands/cmd_archive.py|
aiida/cmdline/commands/cmd_calcjob.py|
aiida/cmdline/commands/cmd_code.py|
aiida/cmdline/commands/cmd_computer.py|
aiida/cmdline/commands/cmd_data/cmd_list.py|
aiida/cmdline/commands/cmd_data/cmd_upf.py|
aiida/cmdline/commands/cmd_devel.py|
aiida/cmdline/commands/cmd_group.py|
aiida/cmdline/commands/cmd_node.py|
aiida/cmdline/commands/cmd_shell.py|
aiida/cmdline/commands/cmd_storage.py|
aiida/cmdline/groups/dynamic.py|
aiida/cmdline/params/options/commands/setup.py|
aiida/cmdline/params/options/interactive.py|
aiida/cmdline/params/options/main.py|
aiida/cmdline/params/options/multivalue.py|
aiida/cmdline/params/types/group.py|
aiida/cmdline/params/types/plugin.py|
aiida/cmdline/utils/ascii_vis.py|
aiida/cmdline/utils/common.py|
aiida/cmdline/utils/echo.py|
aiida/common/extendeddicts.py|
aiida/common/hashing.py|
aiida/common/utils.py|
aiida/engine/daemon/execmanager.py|
aiida/engine/processes/calcjobs/manager.py|
aiida/engine/processes/calcjobs/monitors.py|
aiida/engine/processes/calcjobs/tasks.py|
aiida/engine/processes/control.py|
aiida/engine/processes/ports.py|
aiida/manage/configuration/__init__.py|
aiida/manage/configuration/config.py|
aiida/manage/configuration/profile.py|
aiida/manage/configuration/settings.py|
aiida/manage/external/rmq/launcher.py|
aiida/manage/tests/main.py|
aiida/manage/tests/pytest_fixtures.py|
aiida/orm/comments.py|
aiida/orm/computers.py|
aiida/orm/implementation/storage_backend.py|
aiida/orm/nodes/caching.py|
aiida/orm/nodes/comments.py|
aiida/orm/nodes/data/array/array.py|
aiida/orm/nodes/data/array/bands.py|
aiida/orm/nodes/data/array/trajectory.py|
aiida/orm/nodes/data/cif.py|
aiida/orm/nodes/data/remote/base.py|
aiida/orm/nodes/data/structure.py|
aiida/orm/nodes/data/upf.py|
aiida/orm/nodes/process/calculation/calcjob.py|
aiida/orm/nodes/process/process.py|
aiida/orm/utils/builders/code.py|
aiida/orm/utils/builders/computer.py|
aiida/orm/utils/calcjob.py|
aiida/orm/utils/node.py|
aiida/orm/utils/remote.py|
aiida/repository/backend/disk_object_store.py|
aiida/repository/backend/sandbox.py|
aiida/restapi/common/utils.py|
aiida/restapi/resources.py|
aiida/restapi/run_api.py|
aiida/restapi/translator/base.py|
aiida/restapi/translator/computer.py|
aiida/restapi/translator/group.py|
aiida/restapi/translator/nodes/.*|
aiida/restapi/translator/user.py|
aiida/schedulers/plugins/direct.py|
aiida/schedulers/plugins/lsf.py|
aiida/schedulers/plugins/pbsbaseclasses.py|
aiida/schedulers/plugins/sge.py|
aiida/schedulers/plugins/slurm.py|
aiida/storage/psql_dos/migrations/utils/integrity.py|
aiida/storage/psql_dos/migrations/utils/legacy_workflows.py|
aiida/storage/psql_dos/migrations/utils/migrate_repository.py|
aiida/storage/psql_dos/migrations/utils/parity.py|
aiida/storage/psql_dos/migrations/utils/reflect.py|
aiida/storage/psql_dos/migrations/utils/utils.py|
aiida/storage/psql_dos/migrations/versions/1de112340b16_django_parity_1.py|
aiida/storage/psql_dos/migrator.py|
aiida/storage/psql_dos/models/.*|
aiida/storage/psql_dos/orm/.*|
aiida/storage/sqlite_temp/backend.py|
aiida/storage/sqlite_zip/backend.py|
aiida/storage/sqlite_zip/migrations/legacy_to_main.py|
aiida/storage/sqlite_zip/migrator.py|
aiida/storage/sqlite_zip/models.py|
aiida/storage/sqlite_zip/orm.py|
aiida/tools/data/array/kpoints/legacy.py|
aiida/tools/data/array/kpoints/seekpath.py|
aiida/tools/data/orbital/orbital.py|
aiida/tools/data/orbital/realhydrogen.py|
aiida/tools/dbimporters/plugins/.*|
aiida/tools/graph/age_entities.py|
aiida/tools/graph/age_rules.py|
aiida/tools/graph/deletions.py|
aiida/tools/graph/graph_traversers.py|
aiida/tools/groups/paths.py|
aiida/tools/query/calculation.py|
aiida/tools/query/mapping.py|
aiida/transports/cli.py|
aiida/transports/plugins/local.py|
aiida/transports/plugins/ssh.py|
aiida/workflows/arithmetic/multiply_add.py|
tests/conftest.py|
tests/repository/conftest.py|
tests/repository/test_repository.py|
tests/sphinxext/sources/workchain/conf.py|
tests/sphinxext/sources/workchain_broken/conf.py|
tests/storage/psql_dos/migrations/conftest.py|
tests/storage/psql_dos/migrations/django_branch/test_0026_0027_traj_data.py|
tests/test_calculation_node.py|
tests/test_nodes.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|
)$