Skip to content

Commit 576edae

Browse files
committed
ci: align pre-commit hooks and GitHub templates
Adopt the shared pre-commit baseline: two-line SPDX header, conventional commit message validation (commit-msg stage), and the centralized add-license / add-spdx-license hooks from developer_tools v0.2.0. Run pre-commit CI only on files modified by the PR, and roll out the standard issue templates and the simplified single PR template. TRI-1100
1 parent f9088ff commit 576edae

5 files changed

Lines changed: 88 additions & 51 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Description**
11+
A clear and concise description of what the bug is.
12+
13+
**Triton Information**
14+
What version of Triton are you using?
15+
16+
Are you using the Triton container or did you build it yourself?
17+
18+
**To Reproduce**
19+
Steps to reproduce the behavior.
20+
21+
Describe the models (framework, inputs, outputs), ideally include the model configuration file (if using an ensemble include the model configuration file for that as well).
22+
23+
**Expected behavior**
24+
A clear and concise description of what you expected to happen.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/pull_request_template.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!--
2+
SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
SPDX-License-Identifier: BSD-3-Clause
4+
-->
5+
6+
#### What does the PR do?
7+
<!-- Describe the change and the motivation behind it. -->
8+
9+
#### Related Issues / PRs
10+
<!-- Use "Closes #xxx" / "Fixes #xxx" / "Resolves #xxx" for issues.
11+
Link related PRs from other triton-inference-server repositories. -->
12+
13+
#### Test plan
14+
<!-- How was this change verified? List steps, tests added, or CI evidence. -->
15+
16+
#### Caveats
17+
<!-- Optional: known limitations or follow-ups. -->
18+
19+
#### Checklist
20+
- [ ] PR title follows `<commit_type>: <Title>` (conventional commit — enforced by the `conventional-pre-commit` hook)
21+
- [ ] I ran `pre-commit install && pre-commit run --all-files` locally and it passes
22+
- [ ] Copyright header is correct on all changed files
23+
- [ ] External contributors: I have read the [Contribution guidelines](../CONTRIBUTING.md) and signed the [Contributor License Agreement](https://github.com/NVIDIA/triton-inference-server/blob/master/Triton-CCLA-v1.pdf)

.github/workflows/pre-commit.yml

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,5 @@
1-
# Copyright 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2-
#
3-
# Redistribution and use in source and binary forms, with or without
4-
# modification, are permitted provided that the following conditions
5-
# are met:
6-
# * Redistributions of source code must retain the above copyright
7-
# notice, this list of conditions and the following disclaimer.
8-
# * Redistributions in binary form must reproduce the above copyright
9-
# notice, this list of conditions and the following disclaimer in the
10-
# documentation and/or other materials provided with the distribution.
11-
# * Neither the name of NVIDIA CORPORATION nor the names of its
12-
# contributors may be used to endorse or promote products derived
13-
# from this software without specific prior written permission.
14-
#
15-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
16-
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17-
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18-
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
19-
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20-
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21-
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
23-
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24-
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25-
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1+
# SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: BSD-3-Clause
263

274
name: pre-commit
285

.pre-commit-config.yaml

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,7 @@
1-
# Copyright 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2-
#
3-
# Redistribution and use in source and binary forms, with or without
4-
# modification, are permitted provided that the following conditions
5-
# are met:
6-
# * Redistributions of source code must retain the above copyright
7-
# notice, this list of conditions and the following disclaimer.
8-
# * Redistributions in binary form must reproduce the above copyright
9-
# notice, this list of conditions and the following disclaimer in the
10-
# documentation and/or other materials provided with the distribution.
11-
# * Neither the name of NVIDIA CORPORATION nor the names of its
12-
# contributors may be used to endorse or promote products derived
13-
# from this software without specific prior written permission.
14-
#
15-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
16-
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17-
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18-
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
19-
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20-
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21-
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
23-
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24-
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25-
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1+
# SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: BSD-3-Clause
3+
4+
default_install_hook_types: [pre-commit, commit-msg]
265

276
repos:
287
- repo: https://github.com/PyCQA/isort
@@ -54,6 +33,15 @@ repos:
5433
additional_dependencies: [tomli]
5534
args: ["--toml", "pyproject.toml"]
5635
exclude: (?x)^(.*stemmer.*|.*stop_words.*|^CHANGELOG.md$)
36+
# Validates commit messages against the Conventional Commits format
37+
# (<commit_type>: <title>). Replaces the manual commit-type checklist that
38+
# used to live in the PR template.
39+
- repo: https://github.com/compilerla/conventional-pre-commit
40+
rev: v4.4.0
41+
hooks:
42+
- id: conventional-pre-commit
43+
stages: [commit-msg]
44+
args: [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test]
5745
# More details about these pre-commit hooks here:
5846
# https://pre-commit.com/hooks.html
5947
- repo: https://github.com/pre-commit/pre-commit-hooks
@@ -73,6 +61,11 @@ repos:
7361
- id: trailing-whitespace
7462

7563
- repo: https://github.com/triton-inference-server/developer_tools
76-
rev: v0.1.0
64+
rev: v0.2.0
7765
hooks:
7866
- id: add-license
67+
# Incremental SPDX-header adoption: migrates each source file to the
68+
# two-line SPDX header the first time it is touched. pre-commit runs hooks
69+
# only on the files staged in a commit, so this rolls SPDX out gradually
70+
# as files change.
71+
- id: add-spdx-license

0 commit comments

Comments
 (0)