11# To run all pre-commit checks, use:
22#
3- # pre-commit run -a
3+ # uvx prek run -a
44#
55# To install pre-commit hooks that run every time you commit:
66#
7- # pre-commit install
7+ # uv tool install prek
8+ # prek install
89#
910
1011ci :
1112 autoupdate_commit_msg : " ⬆️🪝 update pre-commit hooks"
12- autofix_commit_msg : " 🎨 pre-commit fixes"
1313 autoupdate_schedule : quarterly
14+ autofix_commit_msg : " 🎨 pre-commit fixes"
1415 skip : [mypy]
1516
1617repos :
17- # Standard hooks
18+ # Priority 0: Fast validation and independent fixers
19+
20+ # # Standard hooks
1821 - repo : https://github.com/pre-commit/pre-commit-hooks
1922 rev : v6.0.0
2023 hooks :
21- - id : check-added-large-files
22- args : ["--maxkb=2048"]
23- - id : check-case-conflict
24- - id : check-vcs-permalinks
2524 - id : check-merge-conflict
26- - id : check-symlinks
27- - id : check-json
28- - id : check-toml
29- - id : check-yaml
30- - id : debug-statements
25+ priority : 0
3126 - id : end-of-file-fixer
32- - id : mixed-line-ending
27+ priority : 1
3328 - id : trailing-whitespace
29+ priority : 1
3430
35- # Clean jupyter notebooks
36- - repo : https://github.com/srstevenson/nb-clean
37- rev : 4.0.1
31+ # # Check the pyproject.toml file
32+ - repo : https://github.com/henryiii/validate-pyproject-schema-store
33+ rev : 2026.01.22
3834 hooks :
39- - id : nb-clean
40- args :
41- - --remove-empty-cells
42- - --preserve-cell-metadata
43- - raw_mimetype
44- - --
35+ - id : validate-pyproject
36+ priority : 0
4537
46- # Handling unwanted unicode characters
47- - repo : https://github.com/sirosen/texthooks
48- rev : 0.7 .1
38+ # # Check JSON schemata
39+ - repo : https://github.com/python-jsonschema/check-jsonschema
40+ rev : 0.36 .1
4941 hooks :
50- - id : fix-ligatures
51- - id : fix-smartquotes
42+ - id : check-github-workflows
43+ priority : 0
44+ - id : check-readthedocs
45+ priority : 0
5246
53- # Check for common mistakes
54- - repo : https://github.com/pre-commit/pygrep-hooks
55- rev : v1.10.0
47+ # # Catch common capitalization mistakes
48+ - repo : local
5649 hooks :
57- - id : rst-backticks
58- - id : rst-directive-colons
59- - id : rst-inline-touching-normal
50+ - id : disallow-caps
51+ name : Disallow improper capitalization
52+ language : pygrep
53+ entry : ' \b(?:Numpy|Github|PyTest|Mqt|Tum)\b'
54+ exclude : ^(.pre-commit-config.yaml|webpage/package-lock.json|.*\.zip)
55+ priority : 0
6056
61- # Check for license headers
57+ # # Check for spelling
58+ - repo : https://github.com/adhtruong/mirrors-typos
59+ rev : v1.42.3
60+ hooks :
61+ - id : typos
62+ priority : 0
63+
64+ # # Check best practices for scientific Python code
65+ - repo : https://github.com/scientific-python/cookie
66+ rev : 2025.11.21
67+ hooks :
68+ - id : sp-repo-review
69+ additional_dependencies : ["repo-review[cli]"]
70+ priority : 0
71+
72+ # # Check for license headers
6273 - repo : https://github.com/emzeat/mz-lictools
6374 rev : v2.9.0
6475 hooks :
6576 - id : license-tools
77+ priority : 0
6678
67- # Ensure uv lock file is up-to-date
79+ # # Ensure uv lock file is up-to-date
6880 - repo : https://github.com/astral-sh/uv-pre-commit
6981 rev : 0.9.28
7082 hooks :
7183 - id : uv-lock
84+ priority : 0
85+
86+ # # Tidy up BibTeX files
87+ - repo : https://github.com/FlamingTempura/bibtex-tidy
88+ rev : v1.14.0
89+ hooks :
90+ - id : bibtex-tidy
91+ args :
92+ [
93+ " --align=20" ,
94+ " --curly" ,
95+ " --months" ,
96+ " --blank-lines" ,
97+ " --sort" ,
98+ " --strip-enclosing-braces" ,
99+ " --sort-fields" ,
100+ " --trailing-commas" ,
101+ " --remove-empty-fields" ,
102+ ]
103+ priority : 0
72104
73- # Python linting and formatting using ruff
105+ # Priority 1: Second-pass fixers
106+
107+ # # Format configuration files with prettier
108+ - repo : https://github.com/rbubley/mirrors-prettier
109+ rev : v3.8.1
110+ hooks :
111+ - id : prettier
112+ types_or : [yaml, markdown, html, css, scss, javascript, json]
113+ priority : 1
114+
115+ # # Python linting using ruff
74116 - repo : https://github.com/astral-sh/ruff-pre-commit
75117 rev : v0.14.14
76118 hooks :
77- - id : ruff-check
78119 - id : ruff-format
120+ priority : 1
121+ - id : ruff-check
122+ require_serial : true
123+ priority : 2
124+
125+ # Priority 2+: Final checks and fixers
79126
80- # Also run Black on examples in the documentation
127+ # # Clean Jupyter notebooks
128+ - repo : https://github.com/srstevenson/nb-clean
129+ rev : 4.0.1
130+ hooks :
131+ - id : nb-clean
132+ args :
133+ - --remove-empty-cells
134+ - --preserve-cell-metadata
135+ - raw_mimetype
136+ - --
137+ priority : 2
138+
139+ # # Also run Black on examples in the documentation (needs to run after ruff format)
81140 - repo : https://github.com/adamchainz/blacken-docs
82141 rev : 1.20.0
83142 hooks :
84143 - id : blacken-docs
85- additional_dependencies : [black==25.*]
86-
87- # Format configuration files with prettier
88- - repo : https://github.com/rbubley/mirrors-prettier
89- rev : v3.8.1
90- hooks :
91- - id : prettier
92- types_or : [yaml, markdown, html, css, scss, javascript, json]
144+ language : python
145+ additional_dependencies : [black==26.*]
146+ priority : 2
93147
94- # Check static types with mypy
148+ # # Static type checking using mypy (needs to run after lockfile update/ruff format, and ruff lint)
95149 - repo : https://github.com/pre-commit/mirrors-mypy
96150 rev : v1.19.1
97151 hooks :
@@ -106,57 +160,4 @@ repos:
106160 - pandas-stubs
107161 - mqt-core
108162 - mqt-bench>=2.0.1
109-
110- # Check for spelling
111- - repo : https://github.com/adhtruong/mirrors-typos
112- rev : v1.42.3
113- hooks :
114- - id : typos
115-
116- # Catch common capitalization mistakes
117- - repo : local
118- hooks :
119- - id : disallow-caps
120- name : Disallow improper capitalization
121- language : pygrep
122- entry : PyBind|Numpy|Cmake|CCache|Github|PyTest|Mqt|Tum
123- exclude : .pre-commit-config.yaml|\.pkl$|\.zip$|\.json$
124-
125- # Check best practices for scientific Python code
126- - repo : https://github.com/scientific-python/cookie
127- rev : 2025.11.21
128- hooks :
129- - id : sp-repo-review
130- additional_dependencies : ["repo-review[cli]"]
131-
132- # Check JSON schemata
133- - repo : https://github.com/python-jsonschema/check-jsonschema
134- rev : 0.36.1
135- hooks :
136- - id : check-dependabot
137- - id : check-github-workflows
138- - id : check-readthedocs
139-
140- # Check the pyproject.toml file
141- - repo : https://github.com/henryiii/validate-pyproject-schema-store
142- rev : 2026.01.22
143- hooks :
144- - id : validate-pyproject
145-
146- # Tidy up BibTeX files
147- - repo : https://github.com/FlamingTempura/bibtex-tidy
148- rev : v1.14.0
149- hooks :
150- - id : bibtex-tidy
151- args :
152- [
153- " --align=20" ,
154- " --curly" ,
155- " --months" ,
156- " --blank-lines" ,
157- " --sort" ,
158- " --strip-enclosing-braces" ,
159- " --sort-fields" ,
160- " --trailing-commas" ,
161- " --remove-empty-fields" ,
162- ]
163+ priority : 3
0 commit comments