-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
266 lines (245 loc) · 8.6 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
[build-system]
requires = [
"setuptools == 69.2.0",
"wheel == 0.43.0",
"build == 1.1.1",
]
build-backend = "setuptools.build_meta"
[project]
name = "dataops-testgen"
version = "2.15.3"
description = "DataKitchen's Data Quality DataOps TestGen"
authors = [
{ "name" = "DataKitchen, Inc.", "email" = "info@datakitchen.io" },
]
maintainers = [
{ "name" = "DataKitchen, Inc.", "email" = "info@datakitchen.io" },
]
readme = "README.md"
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Development Status :: 5 - Production/Stable",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: System :: Monitoring",
]
keywords = [ "dataops", "data", "quality", "testing", "database", "profiling" ]
requires-python = ">=3.10"
dependencies = [
"PyYAML==6.0.1",
"click==8.1.3",
"sqlalchemy==1.4.46",
"snowflake-sqlalchemy==1.4.7",
"pyodbc==5.0.0",
"psycopg2-binary==2.9.9",
"pycryptodome==3.17",
"prettytable==3.7.0",
"requests_extensions==1.1.3",
"bz2file==0.98",
"trogon==0.4.0",
"numpy==1.26.4",
"pandas==2.1.4",
"streamlit==1.38.0",
"streamlit-extras==0.3.0",
"streamlit-aggrid==0.3.4.post3",
"streamlit-antd-components==0.2.2",
"streamlit-plotly-events==0.0.6",
"plotly_express==0.4.1",
"streamlit-option-menu==0.3.6",
"streamlit-authenticator==0.2.3",
"streamlit-javascript==0.1.5",
"progress==1.6",
"beautifulsoup4==4.12.3",
"trino==0.327.0",
"xlsxwriter==3.2.0",
"psutil==5.9.8",
"concurrent_log_handler==0.9.25",
"cryptography==42.0.8",
"validators==0.33.0",
]
[project.optional-dependencies]
dev = [
"invoke==2.2.0",
"ruff==0.4.1",
"mypy==1.9.0",
"pre-commit==3.6.2",
"types-PyYAML==6.0.12.20240311",
"types-setuptools==69.2.0.20240317",
"semver==3.0.2",
"pytest==8.1.1",
"pytest-cov==4.1.0",
"tomli==2.0.1",
]
release = [
"build==1.2.1",
"bumpver==2023.1129",
"twine==5.1.1",
]
[project.entry-points.console_scripts]
testgen = "testgen.__main__:cli"
[project.urls]
"Source Code" = "https://github.com/DataKitchen/dataops-testgen"
"Bug Tracker" = "https://github.com/DataKitchen/dataops-testgen/issues"
"Documentation" = "https://docs.datakitchen.io/articles/#!dataops-testgen-help/dataops-testgen-help"
"Release Notes" = "https://docs.datakitchen.io/articles/#!dataops-testgen-help/testgen-release-notes"
"Slack" = "https://data-observability-slack.datakitchen.io/join"
"Homepage" = "https://example.com"
[tool.setuptools]
include-package-data = true
[tool.setuptools.package-data]
"*" = ["*.toml", "*.sql", "*.yaml"]
"testgen.template" = ["*.sql", "*.yaml", "**/*.sql", "**/*.yaml"]
"testgen.ui.assets" = ["*.svg", "*.png", "*.js", "*.css"]
"testgen.ui.components.frontend" = ["*.html", "**/*.js", "**/*.css", "**/*.woff2", "**/*.svg"]
[tool.setuptools.packages.find]
# see the important note for why we glob. TL;DR: Otherwise you don't get submodules
# https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#finding-simple-packages
include = [
"testgen*",
]
exclude = [ "*.tests", "tests*", "deploy*", "invocations*", "testlib*"]
[tool.pytest.ini_options]
minversion = "7.0"
# --strict-markers means the markers have to be defined in this file before use, which prevents mispellings.
# --strict-config means that any warnings encountered while parsing the `pytest`configuration file will raise errors.
# -ra: show extra test data.
addopts = "-ra --strict-markers --strict-config"
python_files = "test_*.py"
python_classes = "Test_"
python_functions = "test_*"
# Look up "Testing Pyramid" for more insight into these markers.
markers = [
"unit: The test is a unit test and is thus expected to be fast with little setup",
"integration: The test is an integration test and is thus expected to be somewhat slower with a little more setup",
"functional: The test is a functional test and is thus expected to be slower with greater setup",
]
filterwarnings = [
# remove when resolved: https://github.com/marshmallow-code/apispec/issues/739
'ignore:distutils Version classes are deprecated:DeprecationWarning:apispec'
]
# see: https://mypy.readthedocs.io/en/stable/config_file.html#using-a-pyproject-toml-file
# for settings that do not have a comment,
# see: https://mypy.readthedocs.io/en/stable/config_file.html
# for an explanation of their functionality.
# WARNING: When changing mypy configurations, be sure to test them after removing your .mypy_cache
[tool.mypy]
python_version = "3.10"
check_untyped_defs = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
# This warns if any returns get cast to 'Any' due to type uncertainty by mypy. Since 'Any' is a valid return type
# for any function, returning any from a str function would be valid. This causes it to raise a warning instead.
warn_return_any = true
# This shows an error-code on failure, which is useful on debugging and possibly ignoring those particular
# lines if need-be.
show_error_codes = true
# This warns us if we're using '# type ignore' on a function which mypy knows it has definitions for.
# Hopefully this allows us to phase in type-checks on more libraries.
warn_unused_ignores = true
# Enables PEP 420 style namespace packages. This is a complex topic,
# but my reading suggests this is a generally 'good' idea.
# so see: https://mypy.readthedocs.io/en/stable/config_file.html#confval-namespace_packages
namespace_packages = true
warn_redundant_casts = true
# Remember that time you forgot to put a return in the function? This warns us of that.
# i.e.,
#
# def foo() -> str:
# x = 'a' + 'x'
# will return an error for not having the return it promised.
warn_no_return = true
# This attempts to warn us when we encounter code that is currently unreachable.
warn_unreachable = true
# Now for some configurations to improve our error messages Attempts to make the output prettier for us mere mortals.
pretty = true
# This tries to show some additional context around where the error is occuring
show_error_context = true
# Mypy appears smart enough to ignore hidden directories. But it needs to scan __pycache__ for .pyc and pyi files,
# so it cannot honor gitignore.
exclude = [
'conftest.py',
'venv/',
'build/',
'tests/',
]
[tool.ruff]
target-version = "py310"
line-length = 120
indent-width = 4
include = [
"invocations/**/*.py",
"testgen/**/*.py",
"tests/**/*.py",
]
exclude = [
".eggs",
".git",
".mypy_cache",
".tox",
".venv",
"env",
"venv",
"_build",
"build",
"dist",
]
[tool.ruff.lint]
# see: https://beta.ruff.rs/docs/rules.
# Enable the following checks
# S - Bandit
# F - Pyflakes
# T10 - Debugger statements
# I - isort
# G - Flake8 Logging Format
# A - Flake8 builtins
# B - Flake8 bugbear - common bug-causes
# UP - Use up-to-date syntax
# ISC - Implicit String Concatonation check.
# T20 - Don't allow print statements. use Logger.
# RSE - Raise checks. Don't use extra parantheses.
# Q - Add lints for quoting.
# ARG - Check for unused arguments. __main__ excluded.
# TRY - Catch try/except anti-patterns.
# C4 - Lint list comprehensions
# RUF - Ruff specific checks.
select = ["A", "F", "S", "I", "T10", "B", "UP", "ISC", "T20", "RSE", "Q", "ARG", "TRY", "C4", "RUF"]
# globally ignore the following error codes
# * TRY003: Avoid specifying long messages outside the exception class
# * S608: Hardcoded SQL
# # F841: Unused local variable (it is instable)
ignore = ["TRY003", "S608", "S404", "F841"]
# Ignore the following errors in files:
# F403 - in __init__.py: We use __all__ in our module files so this behavior is acceptable in __init__.py
# ARG001 - unused arguments in __main__: Here until we finish our skeleton.
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F403"]
"testgen/__main__.py" = ["ARG001", "S603"]
"tasks.py" = ["F403"]
"tests*" = ["S101", "T201"]
"invocations/**" = ["ARG001", "T201"]
"testgen/common/encrypt.py" = ["S413"]
# See: https://coverage.readthedocs.io/en/latest/config.html
[tool.coverage.run]
branch=true
# Every time there is a new top-level module, this will need to be expanded.
source = [
"testgen"
]
[tool.coverage.report]
# We don't need to report the coverage lines on tests or templates.
omit = ["tests/*", "templates/*"]
# This skips __init__.py and other empty files.
skip_empty=true
[tool.bumpver]
current_version = "2.2.0"
version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"
commit_message = "release: {old_version} -> {new_version}"
commit = true
tag = true
push = false
[tool.bumpver.file_patterns]
"pyproject.toml" = [
'version = "{version}"',
]