forked from glotzerlab/hoomd-blue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
110 lines (108 loc) · 2.9 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
ci:
autoupdate_schedule: quarterly
autoupdate_branch: 'trunk-patch'
autofix_prs: false
exclude: (?x)(
^hoomd/extern/|
^sphinx-doc/tutorial/
)
repos:
- repo: local
hooks:
- id: make_workflows
name: make_workflows
language: python
entry: python3 .github/workflows/make_workflows.py
pass_filenames: false
always_run: true
additional_dependencies: [jinja2==3.1.2, pyyaml==6.0.1]
- 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: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.4.0'
hooks:
- id: end-of-file-fixer
exclude_types: [svg]
- id: trailing-whitespace
exclude_types: [svg]
- id: check-json
- id: check-yaml
exclude: (?:^.github/workflows/templates) # templates are not properly formatted yaml
- id: check-case-conflict
- id: fix-encoding-pragma
args:
- --remove
- id: mixed-line-ending
- repo: https://github.com/glotzerlab/fix-license-header
rev: v0.2.0
hooks:
- id: fix-license-header
name: Fix license headers (Python)
exclude: |
(?x)(
^hoomd/extern/|
^sphinx-doc/tutorial/|
^sphinx-doc/howto/
)
types_or: [python]
args:
- --license-file=LICENSE
- --add=Part of HOOMD-blue, released under the BSD 3-Clause License.
- --keep-before=#!
- id: fix-license-header
name: Fix license headers (C)
types_or: [c, c++, cuda, inc]
args:
- --license-file=LICENSE
- --add=Part of HOOMD-blue, released under the BSD 3-Clause License.
- --comment-prefix=//
- id: fix-license-header
name: Fix license headers (reStructuredText)
types_or: [rst]
args:
- --license-file=LICENSE
- --add=Part of HOOMD-blue, released under the BSD 3-Clause License.
- --keep-after=.. include
- --comment-prefix=..
- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
hooks:
- id: nbstripout
- repo: https://github.com/google/yapf
rev: 'v0.40.0'
hooks:
- id: yapf
- repo: https://github.com/PyCQA/flake8
rev: '6.0.0'
hooks:
- id: flake8
additional_dependencies:
- pep8-naming==0.13.3
- pydocstyle==6.3.0
- flake8-docstrings==1.7.0
- flake8-rst-docstrings==0.3.0
# Exclude components not yet ported to hoomd v3
# TODO: Remove these exclusions as components are ported
# These also need to be removed in setup.cfg
exclude: |
(?x)(
^hoomd/extern/|
^hoomd/mpcd/|
^hoomd/metal/
)
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.6
hooks:
- id: clang-format
types_or: [c, c++, cuda, inc]
exclude: |
(?x)(
^CMake/|
^hoomd/extern/|
^hoomd/hpmc/UpdaterClusters\.h|
^hoomd/hpmc/IntegratorHPMCMono\.h
)