-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
167 lines (165 loc) · 5.69 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
167 lines (165 loc) · 5.69 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES.
# SPDX-License-Identifier: Apache-2.0
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v20.1.8
hooks:
- id: clang-format
types_or: [c, c++, cuda]
- repo: https://github.com/sirosen/texthooks
rev: 815307a61a62d48c84412f34f3e6789a2cd9179a # frozen: 0.7.1
hooks:
- id: fix-smartquotes
- repo: local
hooks:
- id: cmake-format
name: cmake-format
entry: ./cpp/scripts/run-cmake-format.sh cmake-format
language: python
types: [cmake]
# TODO: Remove vendored FindCUDAToolkit once we require CMake 4.0
exclude: |
(?x)
^cmake/Modules/FindCUDAToolkit[.]cmake$
# Note that pre-commit autoupdate does not update the versions
# of dependencies, so we'll have to update this manually.
additional_dependencies:
- cmakelang==0.6.13
verbose: true
require_serial: true
- id: cmake-lint
name: cmake-lint
entry: ./cpp/scripts/run-cmake-format.sh cmake-lint
language: python
types: [cmake]
# TODO: Remove vendored FindCUDAToolkit once we require CMake 4.0
exclude: |
(?x)
^cmake/Modules/FindCUDAToolkit[.]cmake$
# Note that pre-commit autoupdate does not update the versions
# of dependencies, so we'll have to update this manually.
additional_dependencies:
- cmakelang==0.6.13
verbose: true
require_serial: true
- id: doxygen-check
name: doxygen-check
entry: ./ci/checks/doxygen.sh
files: ^cpp/include/
types_or: [file]
language: system
pass_filenames: false
verbose: true
- id: use-rapidsmpf-cuda-memcpy-async
name: use-rapidsmpf-cuda-memcpy-async
description: 'Enforce that rapidsmpf::cuda_memcpy_async is used instead of cudaMemcpyAsync directly (see cpp/include/rapidsmpf/memory/cuda_memcpy_async.hpp)'
entry: 'cudaMemcpyAsync'
language: pygrep
types_or: [c, c++, cuda]
files: '^cpp/'
exclude: |
(?x)^(
cpp/include/rapidsmpf/memory/cuda_memcpy_async\.hpp
)$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 9b1e9a33f1b33f6ecc2fdbb8d7cc894e951106e4 # frozen: v0.14.13
hooks:
- id: ruff-check
args: ["--fix"]
files: (python)|(ci)/.*$
- id: ruff-format
files: (python)|(ci)/.*$
- repo: https://github.com/MarcoGorelli/cython-lint
rev: eb2f695bb80387913b8cb1f91ba7ff6cb3026715 # frozen: v0.21.1
hooks:
- id: cython-lint
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'a66e98df7b4aeeb3724184b332785976d062b92e' # frozen: v1.19.1
hooks:
- id: mypy
args: ["--config-file=pyproject.toml",
"python/rapidsmpf/"]
pass_filenames: false
- repo: https://github.com/PyCQA/isort
rev: 0a09c783808cfe77bb3269250f663ff733d23302 # frozen: 7.0.0
hooks:
- id: isort
name: isort (cython)
args: ["--resolve-all-configs"]
files: python/.*
types_or: [cython]
- repo: https://github.com/codespell-project/codespell
rev: 63c8f8312b7559622c0d82815639671ae42132ac # frozen: v2.4.1
hooks:
- id: codespell
exclude: |
(?x)^(
.*test.*|
^CHANGELOG.md$
)
- repo: https://github.com/rapidsai/pre-commit-hooks
rev: 49d5f7ac8225db3ebd7d0ab3701d6336d3c208ec # frozen: v1.6.0
hooks:
- id: verify-copyright
args: [--fix, --spdx]
files: |
(?x)
[.](cmake|cpp|cu|cuh|h|hpp|sh|pxd|py|pyx|rs|java)$|
CMakeLists[.]txt$|
CMakeLists_standalone[.]txt$|
meta[.]yaml$|
pyproject[.]toml$|
setup[.]cfg$|
recipe[.]yaml$|
dependencies[.]yaml$|
Makefile$|
make[.]bat$
# TODO: Remove vendored FindCUDAToolkit once we require CMake 4.0
exclude: |
(?x)
^cmake/Modules/FindCUDAToolkit[.]cmake$
- id: verify-alpha-spec
- id: verify-codeowners
args: [--fix, --project-prefix=rapidsmpf]
- id: verify-pyproject-license
# ignore the top-level pyproject.toml, which doesn't
# have or need a [project] table
exclude: |
(?x)
^pyproject[.]toml$
- id: verify-hardcoded-version
- id: verify-hardcoded-version
name: verify-hardcoded-version-ucxx
args: [--fix, --version-file=UCXX_VERSION]
- repo: https://github.com/rapidsai/dependency-file-generator
rev: 43302d278c4215036b7fe4b4af0a85f6fad39d2c # frozen: v1.20.2
hooks:
- id: rapids-dependency-file-generator
args: ["--clean", "--warn-all", "--strict"]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: 745eface02aef23e168a8afb6b5737818efbea95 # frozen: v0.11.0.1
hooks:
- id: shellcheck
- repo: https://github.com/adrienverge/yamllint
rev: v1.38.0
hooks:
- id: yamllint
additional_dependencies: [pyyaml]
exclude: |
(?x)^(
[.]clang-tidy$|
[.]github/labeler[.]yml$|
conda/environments/.*|
cpp/[.]clang-format$
)
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: a4727cbbcd26d7098e96b9cb738169b59711ae51 # v1.24.1
hooks:
- id: zizmor
default_language_version:
python: python3