-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
60 lines (55 loc) · 1.66 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
repos:
- repo: local
hooks:
- id: poetry-install
name: Poetry Install
stages:
- post-checkout
- post-commit
language: system
entry: poetry install -q --sync
pass_filenames: false
files: ^poetry.lock$
- id: poetry-check
name: Check Poetry Config
description: run poetry check to validate config
stages: [commit]
entry: poetry check
language: python
language_version: python3
pass_filenames: false
files: ^pyproject.toml|poetry.lock|poetry.toml$
- id: poetry-lock
name: Make sure poetry dependencies are locked correctly
description: run poetry lock to update lock file
stages: [commit]
entry: poetry lock --no-update
language: python
language_version: python3
files: ^pyproject.toml|poetry.lock$
pass_filenames: false
- id: poetry-export
name: Export Poetry Packages
description: run poetry export to sync lock file with requirements.txt
stages: [commit]
entry: poetry export
language: python
language_version: python3
pass_filenames: false
files: ^poetry.lock|requirements.txt$
args: [-f, requirements.txt, -o, requirements.txt, --with, serving]
- id: poetry-export-serving
name: Export Poetry Packages for Serving
description: run poetry export to sync lock file with serving_requirements.txt
stages: [commit]
entry: poetry export
language: python
language_version: python3
pass_filenames: false
files: ^poetry.lock|serving_requirements.txt$
args: [-f, requirements.txt, -o, serving_requirements.txt, --only, "serving,tflite"]
default_install_hook_types:
- pre-commit
- commit-msg
- post-checkout
- post-commit