-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
139 lines (126 loc) · 4.36 KB
/
pyproject.toml
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
131
132
133
134
135
136
137
138
139
[tool.poetry]
name = "dbt-audit-helper-ext"
version = "0.0.0"
description = "Extended audit helper 💪"
authors = ["Infinite Lambda <[email protected]>"]
readme = "README.md"
license = "Apache-2.0"
repository = "https://github.com/infinitelambda/dbt-audit-helper-ext"
homepage = "https://infinitelambda.com"
keywords = ["packaging", "dbt", "data-quality", "audit-helper", "markdown", "lint", "migration", "data-diff"]
classifiers = [
"Topic :: dbt Package Development :: Documentation",
"Topic :: dbt Package Development :: Testing",
"Topic :: dbt Package :: Validation",
"Topic :: dbt Package :: Migration",
]
[tool.poetry.dependencies]
python = ">=3.9,<3.13"
dbt-core = "^1.7.0"
dbt-snowflake = "^1.7.0"
dbt-bigquery = "^1.7.0"
[tool.poetry.dev-dependencies]
pre-commit = "^2.17.0"
poethepoet = "^0.16.4"
sqlfluff = "^2.3.5"
sqlfluff-templater-dbt = "^2.3.5"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.sqlfluff.core]
templater = "dbt"
dialect = "snowflake"
sql_file_exts = ".sql,.sql.j2,.dml,.ddl"
max_line_length = 120
[tool.sqlfluff.templater.dbt]
profile = "audit_helper_ext"
[tool.sqlfluff.rules]
allow_scalar = true
single_table_references = "consistent"
unquoted_identifiers_policy = "all"
[tool.sqlfluff.layout.type.comma]
line_position = "leading"
[tool.sqlfluff.indentation]
tab_space_size = 2
indent_unit = "space"
[toolsqlfluff.rules.capitalisation.keywords]
capitalisation_policy = "lower"
[toolsqlfluff.rules.capitalisation.functions]
capitalisation_policy = "lower"
[tool.sqlfluff.templater]
unwrap_wrapped_queries = true
[tool.sqlfluff.templater.jinja]
apply_dbt_builtins = true
[tool.poe.tasks]
git-hooks = { shell = "pre-commit install --install-hooks && pre-commit install --hook-type commit-msg" }
format = [
{cmd = "dbt clean"},
{cmd = "dbt deps"},
{cmd = "sqlfluff format . --dialect snowflake"},
]
lint = [
{cmd = "dbt clean"},
{cmd = "dbt deps"},
{cmd = "sqlfluff lint . --dialect snowflake"},
]
verify = [
{cmd = "dbt deps --project-dir integration_tests"},
{cmd = "dbt debug --project-dir integration_tests"},
]
init = [
{cmd = "dbt deps --project-dir integration_tests"},
{cmd = "dbt run -s audit_helper_ext --project-dir integration_tests"},
{cmd = "dbt seed --project-dir integration_tests"},
]
build = [
{cmd = "dbt build --exclude audit_helper_ext --project-dir integration_tests"},
]
gen = [
{shell = "cd integration_tests && python dbt_packages/audit_helper_ext/scripts/create_validation_macros.py models/03_mart"},
{shell = "cd integration_tests && python dbt_packages/audit_helper_ext/scripts/create_dbt_jobs_as_code.py models/03_mart"}
]
validate-sample-1 = [
{shell = "cd integration_tests && dbt_packages/audit_helper_ext/scripts/validation__model.sh -m sample_1"}
]
validate-customers = [
{shell = "cd integration_tests && dbt_packages/audit_helper_ext/scripts/validation__model.sh -m customers"}
]
validate-items = [
{shell = "cd integration_tests && dbt_packages/audit_helper_ext/scripts/validation__model.sh -m items"}
]
validate-orders = [
{shell = "cd integration_tests && dbt_packages/audit_helper_ext/scripts/validation__model.sh -m orders"}
]
validate-products = [
{shell = "cd integration_tests && dbt_packages/audit_helper_ext/scripts/validation__model.sh -m products"}
]
validate-stores = [
{shell = "cd integration_tests && dbt_packages/audit_helper_ext/scripts/validation__model.sh -m stores"}
]
validate-supplies = [
{shell = "cd integration_tests && dbt_packages/audit_helper_ext/scripts/validation__model.sh -m supplies"}
]
validate = [
{cmd = "poe validate-sample-1"},
{cmd = "poe validate-customers"},
{cmd = "poe validate-items"},
{cmd = "poe validate-orders"},
{cmd = "poe validate-products"},
{cmd = "poe validate-stores"},
{cmd = "poe validate-supplies"},
]
all = [
{cmd = "poe init"},
{cmd = "poe validate"},
]
git-push-github = [
{cmd = "git remote set-url origin https://github.com/infinitelambda/dbt-audit-helper-ext.git"},
{cmd = "git push"},
{cmd = "git remote set-url origin [email protected]:infinitelambda/bi-chapter/dbt-audit-helper-ext.git"}
]
git-pull-github = [
{cmd = "git remote set-url origin https://github.com/infinitelambda/dbt-audit-helper-ext.git"},
{cmd = "git pull"},
{cmd = "git remote set-url origin [email protected]:infinitelambda/bi-chapter/dbt-audit-helper-ext.git"},
{cmd = "git push"}
]