-
Notifications
You must be signed in to change notification settings - Fork 5
/
.pre-commit-config.yaml
90 lines (90 loc) · 2.74 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: v5.0.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
- id: check-json
- id: check-ast
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
args: [--unsafe]
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
exclude: .+\.csv$
# Useful if you want to enforce feature branches beginning with a Jira ticket ID
# - id: no-commit-to-branch
# name: JIRA ticket ID in branch
# args: ['--pattern', '^((?![A-Z]+[-][0-9]+[-][\S]+).)*$']
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
name: isort (python)
- repo: https://github.com/ambv/black
rev: 24.10.0
hooks:
- id: black
name: Run black formatter
- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
hooks:
- id: autoflake
args: ["--in-place", "--remove-all-unused-imports"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
hooks:
- id: pyupgrade
name: Check for code that can use new Python features
- repo: local
hooks:
- id: pytest-no-deps
name: pytest-no-deps
entry: pytest ./tests/pytest -m no_deps -n 5
language: system
pass_filenames: false
always_run: true
- repo: https://github.com/tconbeer/sqlfmt
rev: v0.24.0
hooks:
- id: sqlfmt
- repo: https://github.com/dbt-checkpoint/dbt-checkpoint
rev: v2.0.6
hooks:
- id: dbt-parse
- id: dbt-docs-generate
args: ["--cmd-flags", "++threads", "64"]
- id: check-model-has-properties-file
name: Check that all models are listed in a YAML file
files: ^models/intermediate/|^models/marts/|^models/staging/
- id: check-model-name-contract
args: [--pattern, "(int_).*"]
files: models/intermediate/
- id: check-model-name-contract
args: [--pattern, "(dim_|fct_|rpt_).*"]
files: models/marts/
- id: check-model-name-contract
args: [--pattern, "(base_|stg_).*"]
files: models/staging/
- id: check-model-name-contract
args: [--pattern, "^seed_.*csv$"]
files: models/seeds/
- repo: local
hooks:
- id: pytest-catalog-json
name: pytest-catalog-json
entry: pytest ./tests/pytest -m catalog_json -n 5
language: system
pass_filenames: false
always_run: true
- repo: local
hooks:
- id: pytest-manifest-json
name: pytest-manifest-json
entry: pytest ./tests/pytest -m manifest_json -n 5
language: system
pass_filenames: false
always_run: true