-
Notifications
You must be signed in to change notification settings - Fork 224
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
158 lines (154 loc) · 5.21 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
158 lines (154 loc) · 5.21 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
# SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
exclude: |
(?x)^(
skills/.*/skill\.oms\.sig|
skills/.*/skill-card\.md|
skills/.*/BENCHMARK\.md
)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v6.0.0'
hooks:
- id: end-of-file-fixer
exclude: ^(datasets|helmchart)/.*\.(mps|json|yaml|yml|txt)$
- id: trailing-whitespace
exclude: ^datasets/.*\.(mps|json|yaml|yml|txt)$
- id: check-builtin-literals
- id: check-executables-have-shebangs
- id: check-json
- id: check-yaml
files: \.(yaml)$
exclude: ^(helmchart)/.*\.(yaml)$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.3
hooks:
- id: ruff-check
args: [--fix, --config, pyproject.toml]
- id: ruff-format
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.1.1
hooks:
- id: pydocstyle
# https://github.com/PyCQA/pydocstyle/issues/603
additional_dependencies: [toml]
args: ["--config=pyproject.toml"]
exclude: |
(?x)^(
ci|
cpp|
conda|
docs|
notebooks
)
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v20.1.8
hooks:
- id: clang-format
files: \.(cu|cuh|h|hpp|cpp|inl)$
types_or: [file]
args: ['-fallback-style=none', '-style=file', '-i']
- repo: https://github.com/rapidsai/dependency-file-generator
rev: v1.20.0
hooks:
- id: rapids-dependency-file-generator
args: ["--clean", "--warn-all", "--strict"]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
args: ["--severity=warning"]
- repo: https://github.com/adrienverge/yamllint
rev: v1.38.0
hooks:
- id: yamllint
additional_dependencies: [pyyaml]
exclude: |
(?x)^(
[.]clang-format$|
conda/environments/.*|
^helmchart/cuopt-server/templates
)
- repo: https://github.com/rapidsai/pre-commit-hooks
rev: v1.6.0
hooks:
- id: verify-copyright
args: [--fix, --spdx]
files: |
(?x)
[.](cmake|c|cpp|cu|cuh|h|hpp|sh|pxd|py|pyx|pdx|hpp[.]in|bat)$|
CMakeLists[.]txt$|
recipe[.]yaml$|
^[.]github/workflows/|
^[.]coderabbit[.]yaml$|
^[.]pre-commit-config[.]yaml$|
Dockerfile$|
dependencies[.]yaml$|
Makefile$|
setup[.]cfg$|
pyproject[.]toml$
exclude: |
(?x)^(
^cpp/tests/utilities/cxxopts.hpp
)
- 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
exclude: |
(?x)
(^|/)devcontainer[.]json$|
(^|/)dependencies[.]yaml$|
^[.]github/(workflows|ISSUE_TEMPLATE)/|
(^|/)pom[.]xml$|
^[.]pre-commit-config[.]yaml$|
^conda/environments/|
^docs/cuopt/source/cuopt-server/nim-operator/guide/|
(^|/)VERSION$|
(^|/)RAPIDS_BRANCH$|
[.](md|rst|avro|parquet|png|orc|gz|pkl|sas7bdat|msgpack|pickle|jpg|bz2|zlib)$|
^docs/cuopt/source/cuopt-python/routing/routing-example[.]ipynb$|
^docs/cuopt/source/versions1[.]json$|
^helmchart/cuopt-server/(Chart[.]yaml|values[.]yaml)$|
^[.]cursor-plugin/plugin[.]json$|
^[.]claude-plugin/marketplace[.]json$|
^gemini-extension[.]json$
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.24.1
hooks:
- id: zizmor
- repo: local
hooks:
- id: update-versions
name: Update versions1.json
entry: python ci/utils/update_doc_versions.py
language: system
files: docs/cuopt/source/versions1.json
- id: sync-skills-version
name: Sync skills version from VERSION
entry: ci/utils/sync_skills_version.sh
language: system
pass_filenames: false
files: ^(VERSION|\.claude-plugin/marketplace\.json|\.cursor-plugin/plugin\.json|gemini-extension\.json)$
- id: vale
name: Vale docs prose lint
entry: ci/run-vale.sh
verbose: true
language: system
# 'pass_filenames: false' prevents pre-commit from invoking 'vale' once per file,
# (instead passes all files at once to 1 invocation)
pass_filenames: false
args: [--output=line, --minAlertLevel=warning, docs/cuopt/source]
# needs to be kept in sync with vale.ini
files: ^docs/cuopt/source/.*\.(rst|md)$
- id: validate-skills
name: Validate agent skills
entry: ci/utils/validate_skills.sh
language: system
pass_filenames: false
files: ^(VERSION|skills/|\.claude-plugin/|\.cursor-plugin/|agents/|ci/utils/validate_skills\.sh|ci/utils/sync_skills_version\.sh|gemini-extension\.json)$
default_language_version:
python: python3