|
2 | 2 | # SPDX-License-Identifier: Apache-2.0 |
3 | 3 |
|
4 | 4 | repos: |
5 | | - - repo: https://github.com/pre-commit/pre-commit-hooks |
6 | | - rev: v6.0.0 |
7 | | - hooks: |
8 | | - - id: trailing-whitespace |
9 | | - - id: end-of-file-fixer |
10 | | - - id: check-json |
11 | | - - repo: https://github.com/astral-sh/ruff-pre-commit |
12 | | - rev: v0.14.1 |
13 | | - hooks: |
14 | | - - id: ruff-check |
15 | | - args: [--fix] |
16 | | - - id: ruff-format |
17 | | - - repo: https://github.com/pre-commit/mirrors-mypy |
18 | | - rev: 'v1.3.0' |
19 | | - hooks: |
20 | | - - id: mypy |
21 | | - additional_dependencies: [types-cachetools] |
22 | | - args: ["--config-file=pyproject.toml", |
23 | | - "python/pylibraft/pylibraft", |
24 | | - "python/raft-dask/raft_dask"] |
25 | | - pass_filenames: false |
26 | | - - repo: https://github.com/PyCQA/pydocstyle |
27 | | - rev: 6.1.1 |
28 | | - hooks: |
29 | | - - id: pydocstyle |
30 | | - # https://github.com/PyCQA/pydocstyle/issues/603 |
31 | | - additional_dependencies: [toml] |
32 | | - args: ["--config=pyproject.toml"] |
33 | | - - repo: https://github.com/pre-commit/mirrors-clang-format |
34 | | - rev: v20.1.8 |
35 | | - hooks: |
36 | | - - id: clang-format |
37 | | - types_or: [c, c++, cuda] |
38 | | - args: ["-fallback-style=none", "-style=file", "-i"] |
39 | | - exclude: cpp/include/raft/thirdparty/.* |
40 | | - - repo: local |
41 | | - hooks: |
42 | | - - id: no-deprecationwarning |
43 | | - name: no-deprecationwarning |
44 | | - description: 'Enforce that DeprecationWarning is not introduced (use FutureWarning instead)' |
45 | | - entry: '(category=|\s)DeprecationWarning[,)]' |
46 | | - language: pygrep |
47 | | - types_or: [python, cython] |
48 | | - - id: cmake-format |
49 | | - name: cmake-format |
50 | | - entry: ./cpp/scripts/run-cmake-format.sh cmake-format |
51 | | - language: python |
52 | | - types: [cmake] |
53 | | - exclude: .*/thirdparty/.* |
54 | | - # Note that pre-commit autoupdate does not update the versions |
55 | | - # of dependencies, so we'll have to update this manually. |
56 | | - additional_dependencies: |
57 | | - - cmakelang==0.6.13 |
58 | | - verbose: true |
59 | | - require_serial: true |
60 | | - - id: cmake-lint |
61 | | - name: cmake-lint |
62 | | - entry: ./cpp/scripts/run-cmake-format.sh cmake-lint |
63 | | - language: python |
64 | | - types: [cmake] |
65 | | - # Note that pre-commit autoupdate does not update the versions |
66 | | - # of dependencies, so we'll have to update this manually. |
67 | | - additional_dependencies: |
68 | | - - cmakelang==0.6.13 |
69 | | - verbose: true |
70 | | - require_serial: true |
71 | | - exclude: .*/thirdparty/.* |
72 | | - - id: include-check |
73 | | - name: include-check |
74 | | - entry: python ./cpp/scripts/include_checker.py cpp/bench cpp/include cpp/tests |
75 | | - pass_filenames: false |
76 | | - language: python |
77 | | - additional_dependencies: [gitpython] |
78 | | - - repo: https://github.com/codespell-project/codespell |
79 | | - rev: v2.4.1 |
80 | | - hooks: |
81 | | - - id: codespell |
82 | | - additional_dependencies: [tomli] |
83 | | - args: ["--toml", "pyproject.toml"] |
84 | | - exclude: | |
85 | | - (?x) |
86 | | - ^CHANGELOG[.]md$| |
87 | | - - repo: https://github.com/rapidsai/pre-commit-hooks |
88 | | - rev: v1.6.1 |
89 | | - hooks: |
90 | | - - id: verify-copyright |
91 | | - name: verify-copyright-raft |
92 | | - args: [--fix, --spdx] |
93 | | - files: | |
94 | | - (?x) |
95 | | - [.](cmake|cpp|cu|cuh|h|hpp|sh|pxd|py|pyx|bat)$| |
96 | | - CMakeLists[.]txt$| |
97 | | - CMakeLists_standalone[.]txt$| |
98 | | - meta[.]yaml$| |
99 | | - ^[.]pre-commit-config[.]yaml$| |
100 | | - pyproject[.]toml$| |
101 | | - recipe[.]yaml$| |
102 | | - dependencies[.]yaml$| |
103 | | - Makefile$| |
104 | | - pytest[.]ini$| |
105 | | - [.]flake8$ |
106 | | - exclude: | |
107 | | - (?x)^( |
108 | | - cpp/include/raft/neighbors/detail/faiss_select/| |
109 | | - cpp/include/raft/thirdparty/| |
110 | | - docs/source/sphinxext/github_link[.]py$| |
111 | | - cpp/include/raft/core/detail/mdspan_numpy_serializer[.]hpp$| |
112 | | - cpp/include/raft/core/mdarray[.]hpp$| |
113 | | - cpp/include/raft/core/device_container_policy[.]hpp$| |
114 | | - cpp/include/raft/core/host_container_policy[.]hpp$ |
115 | | - ) |
116 | | - - id: verify-copyright |
117 | | - name: verify-copyright-scikit-learn |
118 | | - args: [--fix, --spdx, "--spdx-license-identifier=Apache-2.0 AND BSD-3-Clause"] |
119 | | - files: | |
120 | | - (?x)^( |
121 | | - docs/source/sphinxext/github_link[.]py$ |
122 | | - ) |
123 | | - - id: verify-copyright |
124 | | - name: verify-copyright-sandia |
125 | | - args: [--fix, --spdx, "--spdx-license-identifier=Apache-2.0 AND BSD-3-Clause"] |
126 | | - files: | |
127 | | - (?x)^( |
128 | | - cpp/include/raft/core/mdarray[.]hpp$| |
129 | | - cpp/include/raft/core/device_container_policy[.]hpp$| |
130 | | - cpp/include/raft/core/host_container_policy[.]hpp$ |
131 | | - ) |
132 | | - - id: verify-copyright |
133 | | - name: verify-copyright-faiss |
134 | | - args: [--fix, --spdx, "--spdx-license-identifier=Apache-2.0 AND MIT"] |
135 | | - files: | |
136 | | - (?x)^( |
137 | | - cpp/include/raft/neighbors/detail/faiss_select/ |
138 | | - ) |
139 | | - - id: verify-copyright |
140 | | - name: verify-copyright-numpy |
141 | | - args: [--fix, --spdx, "--spdx-license-identifier=Apache-2.0 AND MIT"] |
142 | | - files: | |
143 | | - (?x)^( |
144 | | - cpp/include/raft/core/detail/mdspan_numpy_serializer[.]hpp$ |
145 | | - ) |
146 | | - - id: verify-alpha-spec |
147 | | - - id: verify-codeowners |
148 | | - args: [--fix, --org=NVIDIA, --project-prefix=raft] |
149 | | - - id: verify-hardcoded-version |
150 | | - exclude: | |
151 | | - (?x) |
152 | | - (^|/)devcontainer[.]json$| |
153 | | - (^|/)dependencies[.]yaml$| |
154 | | - ^[.]github/(workflows|ISSUE_TEMPLATE)/| |
155 | | - (^|/)pom[.]xml$| |
156 | | - ^[.]pre-commit-config[.]yaml$| |
157 | | - ^conda/environments/| |
158 | | - (^|/)UCXX_BRANCH$| |
159 | | - (^|/)RAPIDS_BRANCH$| |
160 | | - [.](md|rst|svg)$ |
161 | | - - id: verify-hardcoded-version |
162 | | - name: verify-hardcoded-version-ucxx |
163 | | - args: [--fix, --version-file=UCXX_VERSION, --version-scheme=semver] |
164 | | - exclude: | |
165 | | - (?x) |
166 | | - (^|/)devcontainer[.]json$| |
167 | | - (^|/)dependencies[.]yaml$| |
168 | | - ^[.]github/(workflows|ISSUE_TEMPLATE)/| |
169 | | - (^|/)pom[.]xml$| |
170 | | - ^[.]pre-commit-config[.]yaml$| |
171 | | - ^conda/environments/| |
172 | | - (^|/)UCXX_BRANCH$| |
173 | | - (^|/)RAPIDS_BRANCH$| |
174 | | - [.](md|rst|svg)$ |
175 | | - - id: verify-pyproject-license |
176 | | - # ignore the top-level pyproject.toml, which doesn't |
177 | | - # have or need a [project] table |
178 | | - exclude: | |
179 | | - (?x) |
180 | | - ^pyproject[.]toml$ |
181 | | - - repo: https://github.com/rapidsai/dependency-file-generator |
182 | | - rev: v1.20.2 |
183 | | - hooks: |
184 | | - - id: rapids-dependency-file-generator |
185 | | - args: ["--clean", "--warn-all", "--strict"] |
186 | | - - repo: https://github.com/shellcheck-py/shellcheck-py |
187 | | - rev: v0.10.0.1 |
188 | | - hooks: |
189 | | - - id: shellcheck |
190 | | - - repo: https://github.com/zizmorcore/zizmor-pre-commit |
191 | | - rev: v1.24.1 |
192 | | - hooks: |
193 | | - - id: zizmor |
194 | | - |
| 5 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 6 | + rev: v6.0.0 |
| 7 | + hooks: |
| 8 | + - id: trailing-whitespace |
| 9 | + - id: end-of-file-fixer |
| 10 | + - id: check-json |
| 11 | + - repo: https://github.com/astral-sh/ruff-pre-commit |
| 12 | + rev: v0.14.1 |
| 13 | + hooks: |
| 14 | + - id: ruff-check |
| 15 | + args: [--fix] |
| 16 | + - id: ruff-format |
| 17 | + - repo: https://github.com/pre-commit/mirrors-mypy |
| 18 | + rev: 'v1.3.0' |
| 19 | + hooks: |
| 20 | + - id: mypy |
| 21 | + additional_dependencies: [types-cachetools] |
| 22 | + args: ["--config-file=pyproject.toml", "python/pylibraft/pylibraft", "python/raft-dask/raft_dask"] |
| 23 | + pass_filenames: false |
| 24 | + - repo: https://github.com/PyCQA/pydocstyle |
| 25 | + rev: 6.1.1 |
| 26 | + hooks: |
| 27 | + - id: pydocstyle |
| 28 | + # https://github.com/PyCQA/pydocstyle/issues/603 |
| 29 | + additional_dependencies: [toml] |
| 30 | + args: ["--config=pyproject.toml"] |
| 31 | + - repo: https://github.com/pre-commit/mirrors-clang-format |
| 32 | + rev: v20.1.8 |
| 33 | + hooks: |
| 34 | + - id: clang-format |
| 35 | + types_or: [c, c++, cuda] |
| 36 | + args: ["-fallback-style=none", "-style=file", "-i"] |
| 37 | + exclude: cpp/include/raft/thirdparty/.* |
| 38 | + - repo: local |
| 39 | + hooks: |
| 40 | + - id: no-deprecationwarning |
| 41 | + name: no-deprecationwarning |
| 42 | + description: 'Enforce that DeprecationWarning is not introduced (use FutureWarning instead)' |
| 43 | + entry: '(category=|\s)DeprecationWarning[,)]' |
| 44 | + language: pygrep |
| 45 | + types_or: [python, cython] |
| 46 | + - id: cmake-format |
| 47 | + name: cmake-format |
| 48 | + entry: ./cpp/scripts/run-cmake-format.sh cmake-format |
| 49 | + language: python |
| 50 | + types: [cmake] |
| 51 | + exclude: .*/thirdparty/.* |
| 52 | + # Note that pre-commit autoupdate does not update the versions |
| 53 | + # of dependencies, so we'll have to update this manually. |
| 54 | + additional_dependencies: |
| 55 | + - cmakelang==0.6.13 |
| 56 | + verbose: true |
| 57 | + require_serial: true |
| 58 | + - id: cmake-lint |
| 59 | + name: cmake-lint |
| 60 | + entry: ./cpp/scripts/run-cmake-format.sh cmake-lint |
| 61 | + language: python |
| 62 | + types: [cmake] |
| 63 | + # Note that pre-commit autoupdate does not update the versions |
| 64 | + # of dependencies, so we'll have to update this manually. |
| 65 | + additional_dependencies: |
| 66 | + - cmakelang==0.6.13 |
| 67 | + verbose: true |
| 68 | + require_serial: true |
| 69 | + exclude: .*/thirdparty/.* |
| 70 | + - id: include-check |
| 71 | + name: include-check |
| 72 | + entry: python ./cpp/scripts/include_checker.py cpp/bench cpp/include cpp/tests |
| 73 | + pass_filenames: false |
| 74 | + language: python |
| 75 | + additional_dependencies: [gitpython] |
| 76 | + - repo: https://github.com/codespell-project/codespell |
| 77 | + rev: v2.4.1 |
| 78 | + hooks: |
| 79 | + - id: codespell |
| 80 | + additional_dependencies: [tomli] |
| 81 | + args: ["--toml", "pyproject.toml"] |
| 82 | + exclude: | |
| 83 | + (?x) |
| 84 | + ^CHANGELOG[.]md$| |
| 85 | + - repo: https://github.com/rapidsai/pre-commit-hooks |
| 86 | + rev: v1.6.1 |
| 87 | + hooks: |
| 88 | + - id: verify-copyright |
| 89 | + name: verify-copyright-raft |
| 90 | + args: [--fix, --spdx] |
| 91 | + files: | |
| 92 | + (?x) |
| 93 | + [.](cmake|cpp|cu|cuh|h|hpp|sh|pxd|py|pyx|bat)$| |
| 94 | + CMakeLists[.]txt$| |
| 95 | + CMakeLists_standalone[.]txt$| |
| 96 | + meta[.]yaml$| |
| 97 | + ^[.]pre-commit-config[.]yaml$| |
| 98 | + pyproject[.]toml$| |
| 99 | + recipe[.]yaml$| |
| 100 | + dependencies[.]yaml$| |
| 101 | + Makefile$| |
| 102 | + pytest[.]ini$| |
| 103 | + [.]flake8$ |
| 104 | + exclude: | |
| 105 | + (?x)^( |
| 106 | + cpp/include/raft/neighbors/detail/faiss_select/| |
| 107 | + cpp/include/raft/thirdparty/| |
| 108 | + docs/source/sphinxext/github_link[.]py$| |
| 109 | + cpp/include/raft/core/detail/mdspan_numpy_serializer[.]hpp$| |
| 110 | + cpp/include/raft/core/mdarray[.]hpp$| |
| 111 | + cpp/include/raft/core/device_container_policy[.]hpp$| |
| 112 | + cpp/include/raft/core/host_container_policy[.]hpp$ |
| 113 | + ) |
| 114 | + - id: verify-copyright |
| 115 | + name: verify-copyright-scikit-learn |
| 116 | + args: [--fix, --spdx, "--spdx-license-identifier=Apache-2.0 AND BSD-3-Clause"] |
| 117 | + files: | |
| 118 | + (?x)^( |
| 119 | + docs/source/sphinxext/github_link[.]py$ |
| 120 | + ) |
| 121 | + - id: verify-copyright |
| 122 | + name: verify-copyright-sandia |
| 123 | + args: [--fix, --spdx, "--spdx-license-identifier=Apache-2.0 AND BSD-3-Clause"] |
| 124 | + files: | |
| 125 | + (?x)^( |
| 126 | + cpp/include/raft/core/mdarray[.]hpp$| |
| 127 | + cpp/include/raft/core/device_container_policy[.]hpp$| |
| 128 | + cpp/include/raft/core/host_container_policy[.]hpp$ |
| 129 | + ) |
| 130 | + - id: verify-copyright |
| 131 | + name: verify-copyright-faiss |
| 132 | + args: [--fix, --spdx, "--spdx-license-identifier=Apache-2.0 AND MIT"] |
| 133 | + files: | |
| 134 | + (?x)^( |
| 135 | + cpp/include/raft/neighbors/detail/faiss_select/ |
| 136 | + ) |
| 137 | + - id: verify-copyright |
| 138 | + name: verify-copyright-numpy |
| 139 | + args: [--fix, --spdx, "--spdx-license-identifier=Apache-2.0 AND MIT"] |
| 140 | + files: | |
| 141 | + (?x)^( |
| 142 | + cpp/include/raft/core/detail/mdspan_numpy_serializer[.]hpp$ |
| 143 | + ) |
| 144 | + - id: verify-alpha-spec |
| 145 | + args: |
| 146 | + - --fix |
| 147 | + - --mode |
| 148 | + - release |
| 149 | + - id: verify-codeowners |
| 150 | + args: [--fix, --org=NVIDIA, --project-prefix=raft] |
| 151 | + - id: verify-hardcoded-version |
| 152 | + exclude: | |
| 153 | + (?x) |
| 154 | + (^|/)devcontainer[.]json$| |
| 155 | + (^|/)dependencies[.]yaml$| |
| 156 | + ^[.]github/(workflows|ISSUE_TEMPLATE)/| |
| 157 | + (^|/)pom[.]xml$| |
| 158 | + ^[.]pre-commit-config[.]yaml$| |
| 159 | + ^conda/environments/| |
| 160 | + (^|/)UCXX_BRANCH$| |
| 161 | + (^|/)RAPIDS_BRANCH$| |
| 162 | + [.](md|rst|svg)$ |
| 163 | + - id: verify-hardcoded-version |
| 164 | + name: verify-hardcoded-version-ucxx |
| 165 | + args: [--fix, --version-file=UCXX_VERSION, --version-scheme=semver] |
| 166 | + exclude: | |
| 167 | + (?x) |
| 168 | + (^|/)devcontainer[.]json$| |
| 169 | + (^|/)dependencies[.]yaml$| |
| 170 | + ^[.]github/(workflows|ISSUE_TEMPLATE)/| |
| 171 | + (^|/)pom[.]xml$| |
| 172 | + ^[.]pre-commit-config[.]yaml$| |
| 173 | + ^conda/environments/| |
| 174 | + (^|/)UCXX_BRANCH$| |
| 175 | + (^|/)RAPIDS_BRANCH$| |
| 176 | + [.](md|rst|svg)$ |
| 177 | + - id: verify-pyproject-license |
| 178 | + # ignore the top-level pyproject.toml, which doesn't |
| 179 | + # have or need a [project] table |
| 180 | + exclude: | |
| 181 | + (?x) |
| 182 | + ^pyproject[.]toml$ |
| 183 | + - repo: https://github.com/rapidsai/dependency-file-generator |
| 184 | + rev: v1.20.2 |
| 185 | + hooks: |
| 186 | + - id: rapids-dependency-file-generator |
| 187 | + args: ["--clean", "--warn-all", "--strict"] |
| 188 | + - repo: https://github.com/shellcheck-py/shellcheck-py |
| 189 | + rev: v0.10.0.1 |
| 190 | + hooks: |
| 191 | + - id: shellcheck |
| 192 | + - repo: https://github.com/zizmorcore/zizmor-pre-commit |
| 193 | + rev: v1.24.1 |
| 194 | + hooks: |
| 195 | + - id: zizmor |
195 | 196 | default_language_version: |
196 | | - python: python3 |
| 197 | + python: python3 |
0 commit comments