/
pyproject.toml
95 lines (77 loc) · 2.71 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
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "billiam-database"
version = "0.0.0"
description = "OLAP database project for life admin (feat. dbt)."
authors = ["Bilbottom"]
readme = "README.md"
keywords = ["sql", "dbt", "duckdb"]
repository = "https://github.com/Bilbottom/billiam-database"
documentation = "https://bilbottom.github.io/billiam-database/#!/overview"
package-mode = false
[tool.poetry.dependencies]
python = "^3.11"
dbt-core = "^1.7.13"
dbt-duckdb = "^1.7.0"
duckdb = "0.9.2"
python-dotenv = {extras = ["cli"], version = "^1.0.0"}
[tool.poetry.group]
dev.optional = true
ide.optional = true
[tool.poetry.group.dev.dependencies]
pre-commit = "^3"
python-dotenv = {extras = ["cli"], version = "^1.0.0"}
db-query-profiler = "^0.0.6"
[tool.poetry.group.ide.dependencies]
black = "*"
# https://docs.sqlfluff.com/en/stable/configuration.html#default-configuration
[tool.sqlfluff.core]
dialect = "duckdb"
templater = "dbt"
max_line_length = 120 # ...but try to stay under 80
exclude_rules = [
"LT08", # Blank line expected but not found after CTE closing bracket
"ST06", # Select wildcards then simple targets before calculations and aggregates
"ST07", # Prefer specifying join keys instead of using USING
"CV03", # Trailing comma in select statement forbidden (this is okay in DuckDB)
]
[tool.sqlfluff.templater.dbt]
project_dir = "billiam_database/"
profiles_dir = "billiam_database/"
target = "sqlfluff"
[tool.sqlfluff.indentation]
indented_joins = true
indented_using_on = true
indented_on_contents = true
template_blocks_indent = false
###
# Capitalisation bundle
# https://docs.sqlfluff.com/en/stable/rules.html#capitalisation-bundle
###
# https://docs.sqlfluff.com/en/stable/rules.html#rule-capitalisation.keywords
[tool.sqlfluff.rules.capitalisation.keywords] # CP01
capitalisation_policy = "lower"
# https://docs.sqlfluff.com/en/stable/rules.html#rule-capitalisation.identifiers
[tool.sqlfluff.rules.capitalisation.identifiers] # CP02
extended_capitalisation_policy = "lower"
###
# Layout bundle
# https://docs.sqlfluff.com/en/stable/rules.html#layout-bundle
###
# https://docs.sqlfluff.com/en/stable/rules.html#rule-layout.indent
[tool.sqlfluff.layout.type.indent] # LT02
line_position = "trailing"
# https://docs.sqlfluff.com/en/stable/rules.html#rule-layout.commas
[tool.sqlfluff.layout.type.comma] # LT04
line_position = "trailing"
###
# References bundle
# https://docs.sqlfluff.com/en/stable/rules.html#references-bundle
###
# https://docs.sqlfluff.com/en/stable/rules.html#rule-references.quoting
[tool.sqlfluff.rules.references.quoting] # RF06
prefer_quoted_identifiers = false
prefer_quoted_keywords = true
ignore_words = ["transaction", "date"]