-
Notifications
You must be signed in to change notification settings - Fork 192
/
.pre-commit-config.yaml
236 lines (222 loc) · 8 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
ci:
autofix_prs: true
autoupdate_commit_msg: 'Devops: Update pre-commit dependencies'
autoupdate_schedule: quarterly
skip: [mypy, check-uv-lock, generate-conda-environment, validate-conda-environment, verdi-autodocs]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-merge-conflict
- id: check-yaml
- 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
args: [--remove]
- id: mixed-line-ending
args: [--fix=lf]
- id: trailing-whitespace
exclude: *exclude_pre_commit_hooks
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.6
hooks:
- id: check-github-workflows
- repo: https://github.com/ikamensh/flynt/
rev: 1.0.1
hooks:
- id: flynt
args: [--line-length=120, --fail-on-change]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.0
hooks:
- id: ruff-format
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.13.0
hooks:
- id: pretty-format-toml
args: [--autofix]
- id: pretty-format-yaml
args: [--autofix]
exclude: >-
(?x)^(
tests/.*|
environment.yml|
)$
- repo: local
hooks:
- id: imports
name: imports
entry: python utils/make_all.py
language: python
types: [python]
require_serial: true
pass_filenames: false
files: src/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/.*|
.docker/.*|
docs/.*|
utils/.*|
tests/.*|
src/aiida/calculations/arithmetic/add.py|
src/aiida/calculations/diff_tutorial/calculations.py|
src/aiida/calculations/templatereplacer.py|
src/aiida/calculations/transfer.py|
src/aiida/cmdline/commands/cmd_archive.py|
src/aiida/cmdline/commands/cmd_calcjob.py|
src/aiida/cmdline/commands/cmd_code.py|
src/aiida/cmdline/commands/cmd_computer.py|
src/aiida/cmdline/commands/cmd_data/cmd_list.py|
src/aiida/cmdline/commands/cmd_data/cmd_upf.py|
src/aiida/cmdline/commands/cmd_devel.py|
src/aiida/cmdline/commands/cmd_group.py|
src/aiida/cmdline/commands/cmd_node.py|
src/aiida/cmdline/commands/cmd_shell.py|
src/aiida/cmdline/commands/cmd_storage.py|
src/aiida/cmdline/params/options/commands/setup.py|
src/aiida/cmdline/params/options/interactive.py|
src/aiida/cmdline/params/options/main.py|
src/aiida/cmdline/params/options/multivalue.py|
src/aiida/cmdline/params/types/group.py|
src/aiida/cmdline/utils/ascii_vis.py|
src/aiida/cmdline/utils/common.py|
src/aiida/cmdline/utils/echo.py|
src/aiida/common/extendeddicts.py|
src/aiida/common/utils.py|
src/aiida/engine/daemon/execmanager.py|
src/aiida/engine/processes/calcjobs/manager.py|
src/aiida/engine/processes/calcjobs/monitors.py|
src/aiida/engine/processes/calcjobs/tasks.py|
src/aiida/engine/processes/control.py|
src/aiida/engine/processes/ports.py|
src/aiida/manage/configuration/__init__.py|
src/aiida/manage/configuration/config.py|
src/aiida/manage/external/rmq/launcher.py|
src/aiida/manage/tests/main.py|
src/aiida/manage/tests/pytest_fixtures.py|
src/aiida/orm/comments.py|
src/aiida/orm/computers.py|
src/aiida/orm/implementation/storage_backend.py|
src/aiida/orm/nodes/caching.py|
src/aiida/orm/nodes/comments.py|
src/aiida/orm/nodes/data/array/bands.py|
src/aiida/orm/nodes/data/array/trajectory.py|
src/aiida/orm/nodes/data/cif.py|
src/aiida/orm/nodes/data/remote/base.py|
src/aiida/orm/nodes/data/structure.py|
src/aiida/orm/nodes/data/upf.py|
src/aiida/orm/nodes/process/calculation/calcjob.py|
src/aiida/orm/nodes/process/process.py|
src/aiida/orm/utils/builders/code.py|
src/aiida/orm/utils/builders/computer.py|
src/aiida/orm/utils/calcjob.py|
src/aiida/orm/utils/node.py|
src/aiida/repository/backend/disk_object_store.py|
src/aiida/repository/backend/sandbox.py|
src/aiida/restapi/common/utils.py|
src/aiida/restapi/resources.py|
src/aiida/restapi/run_api.py|
src/aiida/restapi/translator/base.py|
src/aiida/restapi/translator/computer.py|
src/aiida/restapi/translator/group.py|
src/aiida/restapi/translator/nodes/.*|
src/aiida/restapi/translator/user.py|
src/aiida/schedulers/plugins/direct.py|
src/aiida/schedulers/plugins/lsf.py|
src/aiida/schedulers/plugins/pbsbaseclasses.py|
src/aiida/schedulers/plugins/sge.py|
src/aiida/schedulers/plugins/slurm.py|
src/aiida/storage/psql_dos/migrations/utils/integrity.py|
src/aiida/storage/psql_dos/migrations/utils/legacy_workflows.py|
src/aiida/storage/psql_dos/migrations/utils/migrate_repository.py|
src/aiida/storage/psql_dos/migrations/utils/parity.py|
src/aiida/storage/psql_dos/migrations/utils/reflect.py|
src/aiida/storage/psql_dos/migrations/utils/utils.py|
src/aiida/storage/psql_dos/migrations/versions/1de112340b16_django_parity_1.py|
src/aiida/storage/psql_dos/migrator.py|
src/aiida/storage/psql_dos/models/.*|
src/aiida/storage/psql_dos/orm/.*|
src/aiida/storage/sqlite_temp/backend.py|
src/aiida/storage/sqlite_zip/backend.py|
src/aiida/storage/sqlite_zip/migrations/legacy_to_main.py|
src/aiida/storage/sqlite_zip/migrator.py|
src/aiida/storage/sqlite_zip/models.py|
src/aiida/storage/sqlite_zip/orm.py|
src/aiida/tools/data/array/kpoints/legacy.py|
src/aiida/tools/data/array/kpoints/seekpath.py|
src/aiida/tools/data/orbital/orbital.py|
src/aiida/tools/data/orbital/realhydrogen.py|
src/aiida/tools/dbimporters/plugins/.*|
src/aiida/tools/graph/age_entities.py|
src/aiida/tools/graph/age_rules.py|
src/aiida/tools/graph/deletions.py|
src/aiida/tools/graph/graph_traversers.py|
src/aiida/tools/groups/paths.py|
src/aiida/tools/query/calculation.py|
src/aiida/tools/query/mapping.py|
src/aiida/transports/cli.py|
src/aiida/transports/plugins/local.py|
src/aiida/transports/plugins/ssh.py|
src/aiida/workflows/arithmetic/multiply_add.py|
)$
- id: check-uv-lock
name: Check uv lockfile up to date
# NOTE: This will not automatically update the lockfile
entry: uv lock --locked
language: system
pass_filenames: false
files: >-
(?x)^(
pyproject.toml|
)$
- id: generate-conda-environment
name: Update conda environment file
entry: python ./utils/dependency_management.py generate-environment-yml
language: system
pass_filenames: false
files: >-
(?x)^(
pyproject.toml|
utils/dependency_management.py
)$
- id: validate-conda-environment
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)^(
src/aiida/cmdline/commands/.*|
src/aiida/cmdline/params/.*|
src/aiida/cmdline/params/types/.*|
utils/validate_consistency.py|
)$