-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
102 lines (90 loc) · 3.12 KB
/
.pre-commit-config.yaml
File metadata and controls
102 lines (90 loc) · 3.12 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
default_language_version:
python: python3.12
default_stages: [commit, push]
repos:
- repo: https://github.com/norwoodj/helm-docs
rev: "v1.14.2"
hooks:
- id: helm-docs
args:
# Make the tool search for charts only under the `charts` directory
- --chart-search-root=./charts
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
exclude: packages/placement-client/.*|packages/application-client/.*|packages/orchestrationlib-client/.*|.*\.md|README.md
- id: end-of-file-fixer
exclude: packages/placement-client/.*|packages/application-client/.*|packages/orchestrationlib-client/.*
- id: check-yaml
exclude: ./charts
- id: check-added-large-files
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.11.0
hooks:
- id: shellcheck
- repo: local
hooks:
- id: openapi-placement-controller
name: openapi-placement-controller
files: ^src/placement_controller/api/
entry: uv run python ./tools/extract_openapi.py placement_controller.api.app:app --app-dir ./src --out ./packages/placement-api/openapi.yaml --app_version_file ./VERSION
language: system
types: [python]
pass_filenames: false
- repo: local
hooks:
- id: generate_client
name: generate client
files: ^packages/placement-api/openapi\.yaml
entry: openapi-python-client generate --overwrite --path ./packages/placement-api/openapi.yaml --meta=uv --output-path ./packages/placement-client --config=./tools/placement-client.yaml --custom-template-path=./tools/templates
language: system
pass_filenames: false
- repo: local
hooks:
- id: generate_application_client
name: generate application_client
files: ^packages/application-api/openapi\.yaml
entry: openapi-python-client generate --overwrite --path ./packages/application-api/openapi.yaml --meta=uv --output-path ./packages/application-client --config=./tools/application-client.yaml --custom-template-path=./tools/templates
language: system
pass_filenames: false
- repo: local
hooks:
- id: generate_orchestrationlib_client
name: generate orchestrationlib_client
files: ^packages/orchestrationlib-api/openapi\.json
entry: openapi-python-client generate --overwrite --path ./packages/orchestrationlib-api/openapi.json --meta=uv --output-path ./packages/orchestrationlib-client --config=./tools/orchestrationlib-client.yaml --custom-template-path=./tools/templates
language: system
pass_filenames: false
- repo: local
hooks:
- id: mypy
name: mypy
files: ^src/
entry: uv run mypy
language: system
types: [python]
- repo: local
hooks:
- id: isort
name: isort
files: ^src/
entry: uv run isort
language: system
types: [python]
- repo: local
hooks:
- id: flake8
name: flake8
files: ^src/
entry: uv run flake8 --config ./.flake8
language: system
types: [python]
- repo: local
hooks:
- id: black
name: black
files: ^src/
entry: uv run black
language: system
types: [python]