|
8 | 8 |
|
9 | 9 | ## Coding Guidelines |
10 | 10 |
|
11 | | -* Coding style for TensorRT-LLM can be found [in this document](CODING_GUIDELINES.md). |
| 11 | +TensorRT-LLM Coding Style can be found [in this document](CODING_GUIDELINES.md). |
12 | 12 |
|
13 | | -* All contributed C++ code should be formatted following the rules in TensorRT-LLM's [clang-format](.clang-format) file. The recommended version is clang-format>=14.0. |
14 | | - |
15 | | -* Changes can be formatted with the following command: |
16 | | - |
17 | | - ```bash |
18 | | - # Commit ID is optional - if unspecified, run format on staged changes. |
19 | | - git-clang-format --style file [commit ID/reference] |
20 | | - ``` |
21 | | - |
22 | | -* All contributed Python code should be formatted using the `black` Python package. The recommended version is `black>=23.0` |
23 | | - |
24 | | -* Changes can be formatted with the following command: |
25 | | - |
26 | | - ```bash |
27 | | - git diff --name-only | grep "*.py" | xargs black -l 120 |
28 | | - ``` |
29 | | - |
30 | | -* Try to keep pull requests (PRs) as concise as possible: |
31 | | - * Avoid committing commented-out code. |
32 | | - * Wherever possible, each PR should address a single concern. If there are several otherwise-unrelated things that should be fixed to reach a desired endpoint, our recommendation is to open several PRs and indicate the dependencies in the description. The more complex the changes are in a single PR, the more time it will take to review those changes. |
33 | | - |
34 | | -## Coding Style |
35 | | - |
36 | | -We use `pre-commit` for automatic code formatting and validation. Install the `pre-commit` package in your local |
37 | | -Python environment. |
| 13 | +We use `pre-commit` for automatic code formatting and validation. Install the `pre-commit` package in your local Python environment. |
38 | 14 |
|
39 | 15 | ```bash |
40 | 16 | pip install pre-commit |
@@ -73,6 +49,9 @@ mdformat.................................................................Passed |
73 | 49 |
|
74 | 50 | If any files were modified by this hook, you will need to stage and commit them again. |
75 | 51 |
|
| 52 | +In addition, please try to keep pull requests (PRs) as concise as possible: |
| 53 | +* Avoid committing commented-out code. |
| 54 | +* Wherever possible, each PR should address a single concern. If there are several otherwise-unrelated things that should be fixed to reach a desired endpoint, our recommendation is to open several PRs and indicate the dependencies in the description. The more complex the changes are in a single PR, the more time it will take to review those changes. |
76 | 55 |
|
77 | 56 | ## Pull Requests |
78 | 57 |
|
|
0 commit comments