-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
130 lines (122 loc) · 3.86 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
119
120
121
122
123
124
125
126
127
128
129
130
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: end-of-file-fixer
name: "[py - check] validate yaml"
- id: trailing-whitespace
name: "[file - format] trim trailing whitespace"
args: [ --markdown-linebreak-ext=md ]
- id: check-added-large-files
name: "[file - check] large file"
args: [ --maxkb=5000 ]
- id: check-docstring-first
name: "[py - check] docstring first"
files: /examples
types : [file, python ]
- id: check-json
name: "[json - check] validate json"
- id: check-merge-conflict
name: "[git - check] merge conflict"
- id: debug-statements
name: "[py - check] debug statements"
- id: detect-private-key
name: "[cred - check] private keys"
- id: fix-encoding-pragma
name: "[file - format] coding pragma"
args: [ --remove ]
- id: mixed-line-ending
name: "[file - format] mixed line ending"
args: [ --fix=auto ]
- id: pretty-format-json
name: "[json - format] pretty json"
args: [ --autofix,
--indent=4,
--no-sort-keys ]
- id: requirements-txt-fixer
name: "[reqs - format] fix requirements.txt"
- id: check-yaml
name: "[yaml - check] validate yaml"
# - repo: https://github.com/pre-commit/mirrors-isort
# rev: v5.10.1
# hooks:
# - id: isort
# name: "[py - format] isort"
# - repo: https://github.com/PyCQA/docformatter
# rev: v1.4
# hooks:
# - id: docformatter
# name: "[py - format] docformatter"
# args: [ -i, --wrap-summaries, "0" ]
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
name: "[py - check] pydocstyle"
files: ^pyramids/
- repo: https://github.com/pycqa/flake8
rev: 7.1.0
hooks:
- id: flake8
name: "[py - check] flake8"
# language_version: python3.9
exclude: ^(examples/|tests/)
#- repo: https://github.com/psf/black
# rev: 22.8.0
# hooks:
# - id: black
- repo: https://github.com/ambv/black
rev: 24.4.2
hooks:
- id: black
name: "[py - format] black"
# language_version: python3.9
- repo: https://github.com/lovesegfault/beautysh
rev: v6.2.1
hooks:
- id: beautysh
name: "[bash - format] beautysh"
# pre-commit-shell: Checks shell scripts against shellcheck.
- repo: https://github.com/detailyang/pre-commit-shell
rev: 1.0.5
hooks:
- id: shell-lint
name: "[bash - lint] shell-lint"
- repo: https://github.com/rlindsgaard/pre-commit-commit-msg-hooks
rev: 0.1.0
hooks:
- id: check-description-max-length
name: "[bash - format] check-description-max-length"
- id: check-second-line-empty
name: "[bash - format] check-second-line-empty"
- id: check-summary-capitalized
name: "[bash - format] check-summary-capitalized"
- id: check-summary-imperative
name: "[bash - format] check-summary-imperative"
- id: check-summary-max-length
name: "[bash - format] check-summary-max-length"
- id: check-summary-punctuation
name: "[bash - format] check-summary-punctuation"
- repo: local
hooks:
- id: pytest-check
name: pytest-check
entry: pytest -v --cov=pyramids --cov-report term-missing
language: system
pass_filenames: false
always_run: true
- repo: local
hooks:
- id: examples-notebook-check
name: nbval
entry: pytest --nbval
language: system
files: \.ipynb$
- repo: local
hooks:
- id: doctest
name: doctest
entry: pytest --doctest-modules #pyramids/dataset.py
language: system
files: \.py$