-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
90 lines (88 loc) · 2.25 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: requirements-txt-fixer
- id: trailing-whitespace
exclude: |
(?x)^(
notebooks/
)
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
exclude: |
(?x)^(
notebooks/
)
- id: check-yaml
- id: check-symlinks
- id: check-toml
- id: check-added-large-files
args: ['--maxkb=1000']
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0
hooks:
- id: add-trailing-comma
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
exclude: |
(?x)^(
notebooks/
)
- repo: https://github.com/pycqa/isort
rev: "5.12.0"
hooks:
- id: isort
exclude: |
(?x)^(
notebooks/
)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.13
hooks:
- id: ruff # linter
# - id: ruff-format
- repo: local
hooks:
- id: update-req
name: Update requirements.txt and requirements-dev.txt
stages: [commit]
language: system
entry: make
files: poetry.lock|requirements.txt|requirements-dev.txt
pass_filenames: false
args: [gen-req]
- id: safety
name: Running safety check on requirements.txt
stages: [commit]
language: system
entry: poetry run safety
pass_filenames: false
args: [check, --full-report, -r, requirements.txt]
- id: mypy
name: Running mypy
stages: [commit]
language: system
entry: poetry run mypy
args: [--install-types, --non-interactive]
types: [python]
exclude: |
(?x)^(
scripts/|
notebooks/
)
# - id: pytest
# name: pytest
# stages: [commit]
# language: system
# entry: poetry run pytest
# types: [python]
# - id: pytest-cov
# name: pytest
# stages: [push]
# language: system
# entry: poetry run pytest --cov --cov-fail-under=100
# types: [python]
# pass_filenames: false