-
Notifications
You must be signed in to change notification settings - Fork 121
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
123 lines (123 loc) · 4.23 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
123 lines (123 loc) · 4.23 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
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
ci:
skip:
- add-license
- generate-cli-docs
- generate-env-vars-docs
- generate-plugin-artifacts
- generate-config-schema
- validate-plugin-schemas
- test-imports
- check-agent-files-sync
- check-ergonomics
- check-ruff-baselined
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0 # Use the latest stable version
hooks:
- id: check-ast
- id: debug-statements
- id: detect-private-key
- id: check-added-large-files
args: ['--maxkb=5000']
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-json
exclude: ^\.devcontainer/devcontainer\.json$
- id: check-toml
- id: check-yaml
- id: check-shebang-scripts-are-executable
- id: end-of-file-fixer
types_or: [cuda, proto, textproto, python]
- id: mixed-line-ending
- id: no-commit-to-branch
args: [--branch, main]
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/codespell-project/codespell
rev: v2.4.2
hooks:
- id: codespell
additional_dependencies: [tomli]
args: ["--toml", "pyproject.toml"]
exclude: (?x)^(.*stemmer.*|.*stop_words.*|^CHANGELOG.md$|.*shakespeare.txt|ATTRIBUTIONS-.*\.md)
- repo: local
hooks:
- id: add-license
name: add-license
entry: make add-copyright
language: python
require_serial: true
- id: generate-cli-docs
name: generate-cli-docs
entry: make generate-cli-docs
language: python
files: (\.py$|^tools/generate_cli_docs\.py$)
pass_filenames: false
args: []
- id: generate-env-vars-docs
name: generate-env-vars-docs
entry: make generate-env-vars-docs
language: python
files: ^(src/aiperf/common/environment\.py|tools/generate_env_vars_docs\.py)$
pass_filenames: false
args: []
- id: generate-plugin-artifacts
name: generate-plugin-artifacts
entry: make generate-all-plugin-files
language: python
files: (\.py$|^src/aiperf/plugin/(categories|plugins)\.yaml|src/aiperf/plugin/schema/schemas\.py|tools/generate_plugin_artifacts\.py)$
pass_filenames: false
args: []
- id: validate-plugin-schemas
name: validate-plugin-schemas
entry: make validate-plugin-schemas
language: python
files: (\.py$|^src/aiperf/plugin/(categories|plugins)\.yaml|tools/generate_plugin_artifacts\.py)$
pass_filenames: false
args: []
- id: generate-config-schema
name: generate-config-schema
entry: make generate-config-schema
language: python
files: (^src/aiperf/config/.*\.py$|^tools/generate_config_schema\.py$)
pass_filenames: false
args: []
- id: test-imports
name: test-imports
entry: make test-imports
language: python
files: ^(src/aiperf|tests)/.*\.py$
pass_filenames: false
args: []
- id: check-agent-files-sync
name: check-agent-files-sync
entry: make check-agent-files-sync
language: python
files: ^(AGENTS\.md|CLAUDE\.md|\.github/copilot-instructions\.md|\.cursor/rules/python\.mdc|tools/check_agent_files_sync\.py)$
pass_filenames: false
args: []
- id: check-ergonomics
name: check-ergonomics
entry: make check-ergonomics
language: python
files: (\.py$|^tools/(check_ergonomics\.py|ergonomics_baseline\.json)$)
pass_filenames: false
args: []
- id: check-ruff-baselined
name: check-ruff-baselined
entry: make check-ruff-baselined
language: python
files: (\.py$|^tools/(ruff_baselined\.py|ruff_baseline\.json)$|^pyproject\.toml$)
pass_filenames: false
args: []
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.14
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
types_or: [python, pyi]
- id: ruff-format
types_or: [python, pyi]