-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
156 lines (136 loc) · 4.11 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
[tool.sqlfluff.core]
verbose = 1
dialect = "postgres"
templater = "placeholder"
# Comma separated list of rules to exclude, or None
exclude_rules = [
"ambiguous.column_count",
"references.qualification",
"structure.unused_cte",
"structure.column_order",
"structure.subquery",
"references.keywords",
"references.consistent",
"references.special_chars",
"layout.cte_newline",
"structure.constant_expression", # bug in 3.3.0. See https://github.com/sqlfluff/sqlfluff/issues/6492
"structure.unused_join", # bug in 3.3.0. See https://github.com/sqlfluff/sqlfluff/issues/6496
]
# The standard max_line_length is 80 in line with the convention of
# other tools and several style guides. Many projects however prefer
# something a little longer.
# Set to zero or negative to disable checks.
max_line_length = 120
# CPU processes to use while linting.
# The default is "single threaded" to allow easy debugging, but this
# is often undesirable at scale.
# If positive, just implies number of processes.
# If negative or zero, implies number_of_cpus - specified_number.
# e.g. -1 means use all processors but one. 0 means all cpus.
processes = -1
large_file_skip_byte_limit = 40000
[tool.sqlfluff.templater.placeholder]
param_style = "colon_optional_quotes"
TABLE = "dummy_table_name"
VERSION = "2023-01-01"
VERSION_PREV = "2022-01-01"
CONDO = "true"
MAPPED = "true"
CONDITION = "WHERE a.geom IS NOT NULL"
GEOM = "geom_2263"
ccp_v = "fisa_2000"
build_schema = "public"
CAPTURE_DATE = "2024-01-01"
CAPTURE_DATE_PREV = "2023-07-01"
internal_columns = '"Job_Number","Job_Type"'
external_columns = '"Job_Number","Job_Type"'
[tool.sqlfluff.templater.jinja.context]
source_column = "bct2020"
output_column = "bct2020"
additional_column_mappings = '[("geoid", "centract2020")]'
group_by = '["boro", "bct2020", "centract2020"]'
join_table = "dcp_ct2020"
geom_join_column = "boroct2020"
years = "['2010', '2011']"
decade = "2020"
geom = "CD"
CAPTURE_DATE = "2024-01-01"
geography_type = "anything"
geography_name = "anything"
geography_id = "anything"
table_name = "anything"
[tool.sqlfluff.rules.layout.long_lines]
ignore_comment_lines = true
ignore_comment_clauses = true
[tool.sqlfluff.rules.capitalisation.keywords]
capitalisation_policy = "upper"
[tool.sqlfluff.templater.dbt]
dialect = "postgres"
[tool.pydocstyle]
ignore = ["D100", "D101", "D102", "D107", "D104", "D213", "D407", "D413"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "E402"]
"conftest.py" = ["E402"]
"setup_dev_bucket.py" = ["E402"]
[[tool.mypy.overrides]]
module = "geopandas.*,geosupport.*,cerberus.*,osgeo.*,diagrams.*,usaddress.*,plotly.*,folium.*,streamlit_folium.*,st_aggrid.*,numerize.*,moto.*,matplotlib.*,contextily,leafmap.*,shapely,socrata.*,faker.*,ruamel.*" # no stubs available
ignore_missing_imports = true
[tool.pytest.ini_options]
xfail_strict = true
addopts = "--strict-markers"
markers = ["end_to_end"]
[tool.coverage.run]
# Measure branch coverage (https://coverage.readthedocs.io/en/latest/branch.html)
branch = true
omit = ["dcpy/test/*"]
[tool.coverage.report]
include_namespace_packages = true
show_missing = true
# Regexes for lines to exclude from consideration
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain if non-runnable code isn't run:
"if __name__ == .__main__.:",
"@app.command",
]
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "dcpy"
version = "0.0.1"
description = "DCP Data Engineering's internal python package"
requires-python = ">=3.11"
dependencies = [
"beautifulsoup4",
"boto3",
"faker",
"geopandas",
"Jinja2",
"lxml",
"openpyxl",
"pandas",
"psycopg2-binary",
"pyarrow",
"pydantic",
"python-dotenv",
"pytz",
"PyYAML",
"rich",
"sqlalchemy",
"typer",
"urllib3",
"usaddress",
"xlrd",
]
[tool.setuptools.packages.find]
include = ["dcpy*"]
exclude = ["dcpy.test*"]
[project.scripts]
library = "dcpy.library.cli:run"
[tool.setuptools.package-data]
dcpy = [
"library/templates/*.yml",
"lifecycle/package/resources/**",
]