forked from bentoml/OpenLLM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
118 lines (117 loc) · 3.55 KB
/
.pre-commit-config.yaml
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
# Copyright 2023 BentoML Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ci:
autoupdate_schedule: weekly
skip: [check-models-table-update, check-models-table-update, changelog-dry-run, pyright, mypy]
autofix_commit_msg: "ci: auto fixes from pre-commit.ci\n\nFor more information, see https://pre-commit.ci"
autoupdate_commit_msg: 'ci: pre-commit autoupdate [pre-commit.ci]'
autofix_prs: false
exclude: '.*\.(css|js|svg)$'
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.0.281'
hooks:
- id: ruff
args: [--exit-non-zero-on-fix, --show-fixes]
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: '2.7.2'
hooks:
- id: editorconfig-checker
- repo: https://github.com/econchick/interrogate
rev: 1.5.0
hooks:
- id: interrogate
types: [python]
exclude: ^(docs|tools|tests)
args: [--config=pyproject.toml]
- repo: https://github.com/google/yapf
rev: v0.40.0
hooks:
- id: yapf
types: [python]
args: [--parallel, --recursive]
- repo: local
hooks:
- id: mypy
name: mypy
entry: ./tools/mypy
types: [python]
language: python
pass_filenames: false
verbose: true
exclude: |
(?x)^(
examples/.*|
tools/.*|
tests/.*|
src/openllm/playground/.*|
.github/.*
)$
additional_dependencies:
- mypy==1.4.1
- click>=8.1.6
- peft
- git+https://github.com/bentoml/BentoML.git@main
- git+https://github.com/huggingface/transformers.git@main
- types-psutil
- types-tabulate
- types-PyYAML
- types-protobuf
- id: pyright
name: pyright
entry: ./tools/pyright
types: [python]
language: node
pass_filenames: false
additional_dependencies: ['[email protected]']
verbose: true
- id: check-license-header
name: check for license headers
entry: ./tools/assert-license-headers
language: script
exclude_types:
- 'markdown'
- 'toml'
- 'json'
- 'text'
exclude: |
(?x)^(
tools/.*|
assets/.*|
changelog.d/.*|
typings/.*|
.github/.*
)$
- id: check-models-table-update
name: check if table in README.md is up-to-date
entry: ./tools/assert-model-table-latest
language: script
files: README.md
- id: changelog-dry-run
name: Running changelog dry-run
entry: hatch run changelog
language: system
files: CHANGELOG.md
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: |
(?x)^(
tests/models/.*
)$
- id: check-yaml
args: ['--unsafe']
- id: check-toml