-
Notifications
You must be signed in to change notification settings - Fork 132
/
.pre-commit-config.yaml
86 lines (84 loc) · 2.06 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
ci:
autoupdate_schedule: quarterly
autoupdate_branch: 'trunk-patch'
autofix_prs: false
# these exclusions must be synced with ruff-format agove and the file ruff.toml.
exclude: |
(?x)(
^hoomd/_hoomd.py|
^hoomd/version_config.py|
^hoomd/md/_md.py|
^hoomd/hpmc/_hpmc.py|
^hoomd/mpcd/_mpcd.py|
^hoomd/extern/|
^sphinx-doc/tutorial/
^hoomd/metal/
)
repos:
- repo: local
hooks:
- id: check-maintainer
name: Check for maintainer comments
description: 'Enforce that `maintainer` comments are removed.'
entry: '(# Maintainer:|\/\/ Maintainer:)'
language: pygrep
types_or: [python, c, c++, cuda, inc]
- repo: local
hooks:
- id: generate_toctree
name: Generate Sphinx toctree
language: python
entry: python3 sphinx-doc/generate-toctree.py
pass_filenames: false
always_run: true
additional_dependencies:
- numpy==2.1.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v5.0.0'
hooks:
- id: end-of-file-fixer
exclude_types: [svg]
- id: trailing-whitespace
exclude_types: [svg]
- id: check-json
- id: check-yaml
- id: check-case-conflict
- id: mixed-line-ending
- repo: https://github.com/glotzerlab/fix-license-header
rev: v0.4.1
hooks:
- id: fix-license-header
name: Fix license headers
exclude: |
(?x)(
^hoomd/extern/|
^sphinx-doc/tutorial/|
^sphinx-doc/howto/
)
types_or: [python, c, c++, cuda, inc]
args:
- --license-file=LICENSE
- --add=Part of HOOMD-blue, released under the BSD 3-Clause License.
- --keep-before=#!
- --keep-after=.. include
- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
hooks:
- id: nbstripout
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.8.0'
hooks:
- id: ruff-format
types_or: [python]
- id: ruff
types_or: [python]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.4
hooks:
- id: clang-format
types_or: [c, c++, cuda, inc]
exclude: |
(?x)(
^CMake/|
^hoomd/extern/
)