-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.pre-commit-config.yaml
83 lines (80 loc) · 2.41 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
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
# This one has been added to fail fast on syntax errors
# before running expensive pylint
- id: check-ast
types_or:
- python
- pyi
- id: check-json
exclude: "^graphql_tests"
- id: check-yaml
types: [file]
files: \.(yaml|yml)$
- repo: https://github.com/camptocamp/jsonschema-gentypes.git
rev: "2.3.0"
hooks:
- id: jsonschema-gentypes
stages: [manual]
files: |
(?x)^(
\.jsonschema-gentypes\.yaml|
oeb_level2/schemas/.*\.json
)$
args: ["--config", ".jsonschema-gentypes.yaml"]
- repo: local
hooks:
- id: pylint
name: Local PyLint
language: system
require_serial: true
types:
- python
exclude: "^[^/]*env/|dev-[^/]*/"
entry: pylint -j 0
- id: mypy
name: Local MyPy
language: system
types:
- python
# files: \.py$
exclude: "^[^/]*env/|dev-[^/]*/"
require_serial: true
entry: mypy --strict --show-error-codes --no-warn-unused-ignores
- repo: https://github.com/inab/python-extended-json-schema-validator.git
rev: v0.15.3
hooks:
# - id: identity
- id: jsonschema_dir_validate
name: Check jsonschema
types:
- json
files: ^oeb_level2/schemas/.*\.(json|yaml)$
require_serial: true
pass_filenames: false
args: [ oeb_level2/schemas ]
- id: json_validation
name: Validate prototype minimal datasets data
types:
- json
files: ^(oeb_level2/schemas|minimal_dataset_examples)/.*\.(json|yaml)$
require_serial: true
pass_filenames: false
args: [ "--guess-schema", "-c", "oeb_level2/schemas", "minimal_dataset_examples" ]
- id: json_validation
name: Validate prototype aggregations data
types:
- json
files: ^(oeb_level2/schemas|aggregation_examples)/.*\.(json|yaml)$
require_serial: true
pass_filenames: false
args: [ "--guess-schema", "-c", "oeb_level2/schemas", "aggregation_examples" ]
# - repo: https://github.com/ambv/black
# rev: 22.6.0
# hooks:
# - id: black
# exclude: "^[^/]*env/|dev-[^/]*/"
# args: [--diff, --check]