forked from ComPWA/ampform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
159 lines (146 loc) · 3.86 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
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
ci:
autoupdate_commit_msg: "MAINT: update pip constraints and pre-commit"
autoupdate_schedule: quarterly # already done by requirements-cron.yml
skip:
- check-jsonschema
- mypy
- pyright
repos:
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: https://github.com/ComPWA/policy
rev: 0.4.0
hooks:
- id: check-dev-files
args:
- --doc-apt-packages=graphviz
- --dev-python-version=3.11
- --no-prettierrc
- --pin-requirements=monthly
- --repo-name=ampform
- --repo-title=AmpForm
- id: colab-toc-visible
- id: fix-nbformat-version
- id: remove-empty-tags
- id: set-nb-cells
args:
- --add-install-cell
- --additional-packages=IPython
- --extras-require=doc,viz
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
args:
- --drop-empty-cells
- --extra-keys
- |
cell.attachments
cell.metadata.code_folding
cell.metadata.editable
cell.metadata.id
cell.metadata.pycharm
cell.metadata.slideshow
cell.metadata.user_expressions
metadata.celltoolbar
metadata.colab.name
metadata.colab.provenance
metadata.interpreter
metadata.notify_time
metadata.toc
metadata.toc-autonumbering
metadata.toc-showcode
metadata.toc-showmarkdowntxt
metadata.toc-showtags
metadata.varInspector
metadata.vscode
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
hooks:
- id: ruff
args: [--fix]
types_or: [python, pyi, jupyter]
- id: ruff-format
types_or: [python, pyi, jupyter]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-ast
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
exclude: >
(?x)^(
.*\.bib|
.*\.svg|
\.cspell\.json
)$
- id: mixed-line-ending
- id: name-tests-test
name: Tests should start with test_
args: ["--django"]
exclude: >
(?x)^(
benchmarks/.*
)$
- id: trailing-whitespace
- repo: https://github.com/ComPWA/prettier-pre-commit
rev: v3.3.3
hooks:
- id: prettier
- repo: https://github.com/ComPWA/taplo-pre-commit
rev: v0.9.3
hooks:
- id: taplo-format
- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
- id: toml-sort
args:
- --in-place
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.2
hooks:
- id: check-jsonschema
name: Check CITATION.cff
args:
- --default-filetype
- yaml
- --schemafile
- https://citation-file-format.github.io/1.2.0/schema.json
- CITATION.cff
pass_filenames: false
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.13.3
hooks:
- id: cspell
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 3.0.3
hooks:
- id: editorconfig-checker
name: editorconfig
alias: ec
exclude: >-
(?x)^(
.*\.py
)$
- repo: local
hooks:
- id: mypy
name: mypy
entry: mypy
language: system
require_serial: true
types:
- python
- repo: https://github.com/ComPWA/mirrors-pyright
rev: v1.1.379
hooks:
- id: pyright