Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
139 lines (120 loc) · 4.26 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
139 lines (120 loc) · 4.26 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
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: a9a8a861f30ed207ead7d5a3b7e8032283ba5da7 # frozen: v23.1.2
hooks:
- id: clang-format
types_or: [file]
files: \.(cpp|hpp|ipp|cu|cuh|hip|sycl)$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
hooks:
- id: trailing-whitespace
exclude: \.(diff|patch)$
- id: end-of-file-fixer
exclude: \.(diff|patch)$
- id: check-yaml
exclude: \.gitlab-ci.yml$
- id: check-added-large-files
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
- repo: https://github.com/psf/black-pre-commit-mirror
rev: a5439e9af2ff9371297bb1a76a01b8ad17989b88 # frozen: 26.10.1
hooks:
- id: black-jupyter
- repo: https://github.com/BlankSpruce/gersemi-pre-commit
rev: 28010ddd6016e1a0f7bd232acb6536ef996ae897 # frozen: 0.29.2
hooks:
- id: gersemi
args: ["-i", "--no-warn-about-unknown-commands"]
- repo: https://github.com/codespell-project/codespell
rev: 57b21406f092110c18776e39b0bda50d37c945c8 # frozen: v2.4.3
hooks:
- id: codespell
args: [
"-S", "*.ipynb,*.onnx,_build,*.svg",
"-I", "./CI/codespell_ignore.txt",
"-w"
]
exclude: ^CI/.*|^docs/old|docs/tex-mml-chtml.js$
- repo: local
hooks:
- id: material-schema
name: Validate material schema and examples
language: python
entry: python CI/check_material_schema.py
additional_dependencies: ["jsonschema>=4.18,<5"]
files: ^(Plugins/Json/schema/|docs/examples/material-map-v1/|CI/check_material_schema\.py$)
pass_filenames: false
- id: license
name: license
language: system
entry: CI/check_license.py --fix
files: \.(cpp|hpp|ipp|cu|cuh|hip|sycl)$
- id: include_guards
name: include_guards
language: system
entry: CI/check_include_guards.py --fail-global
files: \.hpp$
exclude: ^Detray/core/include/detray/utils/logging.hpp$
- id: pragma_once
name: pragma_once
language: system
entry: CI/check_pragma_once.sh
files: \.(hpp|ipp)$
exclude: "Detray/core/include/detray/utils/quiet_log_start.hpp|Detray/core/include/detray/utils/quiet_log_end.hpp"
- id: type_t
name: type_t
language: system
entry: CI/check_type_t.py --fix
files: \.(cpp|hpp|ipp|cu|cuh|hip|sycl)$
- id: boost_test
name: boost_test
language: system
entry: CI/check_boost_test_macro.sh
files: ^Tests\/.*\.(cpp|hpp|ipp|cu|cuh|hip|sycl)$
- id: cmake_options
name: cmake_options
language: system
entry: docs/parse_cmake_options.py --write docs/pages/contributing/building_acts.md
files: ^CMakeLists.txt$
- id: leftover_conflict_markers
name: Leftover conflict markers
language: system
entry: git --no-pager diff --staged --check
exclude: \.(diff|patch)$
- id: math_macros
name: math_macros
language: system
entry: CI/check_math_macros.py
files: \.(cpp|hpp|ipp|cu|cuh|hip|sycl)$
- id: codegen_dependencies
name: codegen_dependencies
language: python
entry: CI/check_codegen_dependencies.sh
additional_dependencies: ["uv"]
files: pyproject.toml$
- id: format-json
name: Format JSON files (Python)
entry: CI/format_json.py
language: python
types: [json]
require_serial: true
args: [--indent=4]
exclude: ^.zenodo.json$
- id: sync_citation_metadata
name: sync citation metadata
entry: CI/sync_citation_metadata.py
language: python
files: ^(CITATION\.cff|\.zenodo\.json|AUTHORS)$
additional_dependencies: ["typer", "rich", "pyyaml"]
pass_filenames: false
- id: dependency_versions
name: dependency versions consistent
entry: CI/bump_versions.py check
language: python
files: ^(\.github/(workflows|actions)/.*\.ya?ml|\.devcontainer/Dockerfile|CI/.*\.(sh|env|py)|docs/.*\.md)$
additional_dependencies: ["typer", "rich"]
pass_filenames: false
- repo: https://github.com/woodruffw/zizmor-pre-commit
rev: 451b56af716f9f0d0c2b816503a3fd0cf8b036fa # frozen: v1.29.0
hooks:
- id: zizmor