-
Notifications
You must be signed in to change notification settings - Fork 256
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
176 lines (163 loc) · 5.26 KB
/
.pre-commit-config.yaml
File metadata and controls
176 lines (163 loc) · 5.26 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
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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: check-added-large-files
exclude: uv.lock
- 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.30.0
hooks:
- id: check-github-workflows
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
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.14.0
hooks:
- id: pretty-format-toml
args: [--autofix]
exclude: uv.lock
- id: pretty-format-yaml
args: [--autofix]
exclude: >-
(?x)^(
tests/.*|
environment.yml|
)$
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.8
hooks:
# Check and update the uv lockfile
- id: uv-lock
- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
hooks:
- id: nbstripout
files: \.ipynb$
- repo: local
hooks:
- id: imports
name: imports
entry: python utils/autogenerate_all_imports.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, --pretty]
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/engine/daemon/execmanager.py|
src/aiida/manage/configuration/__init__.py|
src/aiida/manage/configuration/config.py|
src/aiida/manage/external/rmq/launcher.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/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/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/models/.*|
src/aiida/storage/psql_dos/orm/.*.py|
src/aiida/storage/psql_dos/orm/querybuilder/joiner.py|
src/aiida/storage/sqlite_zip/migrations/legacy_to_main.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/transports/cli.py|
src/aiida/transports/plugins/local.py|
src/aiida/transports/plugins/ssh.py|
)$
- 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|
environment.yml|
)$
- 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|
)$