-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
150 lines (136 loc) · 3.62 KB
/
.pre-commit-config.yaml
File metadata and controls
150 lines (136 loc) · 3.62 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
# To run all pre-commit checks, use:
#
# uvx prek run -a
#
# To install pre-commit hooks that run every time you commit:
#
# uv tool install prek
# prek install
#
ci:
autoupdate_commit_msg: "⬆️🪝 update pre-commit hooks"
autoupdate_schedule: quarterly
autofix_commit_msg: "🎨 pre-commit fixes"
skip: [mypy]
repos:
## Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-merge-conflict
priority: 0
- id: end-of-file-fixer
priority: 1
- id: trailing-whitespace
priority: 2
## Check JSON schemata
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-github-workflows
priority: 0
- id: check-readthedocs
priority: 0
## Check best practices for scientific Python code
- repo: https://github.com/scientific-python/cookie
rev: 2026.04.04
hooks:
- id: sp-repo-review
additional_dependencies: ["repo-review[cli]"]
priority: 0
## Check pyproject.toml file
- repo: https://github.com/henryiii/validate-pyproject-schema-store
rev: 2026.04.11
hooks:
- id: validate-pyproject
priority: 0
## Ensure uv.lock is up to date
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.11.6
hooks:
- id: uv-lock
priority: 0
## Check for common capitalization mistakes
- repo: local
hooks:
- id: disallow-caps
name: Disallow improper capitalization
language: pygrep
entry: \b(Numpy|Github|PyTest|Mqt|Tum)\b
exclude: ^(\.pre-commit-config\.yaml)$
exclude_types: [binary]
priority: 0
## Check for typos
- repo: https://github.com/adhtruong/mirrors-typos
rev: v1.45.1
hooks:
- id: typos
priority: 3
## Check license headers
- repo: https://github.com/emzeat/mz-lictools
rev: v2.9.0
hooks:
- id: license-tools
priority: 4
## Format BibTeX files with bibtex-tidy
- repo: https://github.com/FlamingTempura/bibtex-tidy
rev: v1.14.0
hooks:
- id: bibtex-tidy
args:
[
"--align=20",
"--curly",
"--months",
"--blank-lines",
"--sort",
"--strip-enclosing-braces",
"--sort-fields",
"--trailing-commas",
"--remove-empty-fields",
]
priority: 5
## Format configuration files with prettier
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.8.3
hooks:
- id: prettier
types_or: [yaml, markdown, html, css, scss, javascript, json, json5]
priority: 5
## Format and lint Python files with ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.11
hooks:
- id: ruff-format
types_or: [python, pyi, jupyter, markdown]
priority: 6
- id: ruff-check
require_serial: true
priority: 7
## Clean Jupyter notebooks with nb-clean
- repo: https://github.com/srstevenson/nb-clean
rev: 4.0.1
hooks:
- id: nb-clean
args:
- --remove-empty-cells
- --preserve-cell-metadata
- raw_mimetype
- --
priority: 8
## Check Python types with mypy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.20.0
hooks:
- id: mypy
files: ^(src/mqt|tests|noxfile.py)
args: []
additional_dependencies:
- numpy
- nox
- pytest
- scipy-stubs
- pandas-stubs
- mqt-core
- mqt-bench>=2.0.1
priority: 9