-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
153 lines (132 loc) · 3.49 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
[tool.poetry]
name = "sqlalchemy-declarative-extensions"
version = "0.11.4"
authors = ["Dan Cardin <ddcardin@gmail.com>"]
description = "Library to declare additional kinds of objects not natively supported by SQLAlchemy/Alembic."
license = "Apache-2.0"
repository = "https://github.com/dancardin/sqlalchemy-declarative-extensions"
readme = 'README.md'
keywords = [
"sqlalchemy",
"alembic",
"declarative",
"mysql",
"postgresql",
"snowflake",
"sqlite",
"schema",
"role",
"grant",
"view",
"function",
"trigger",
]
classifiers = [
"Topic :: Software Development :: Libraries :: Python Modules",
]
include = [
"py.typed",
"*.md",
]
packages = [
{ include = "sqlalchemy_declarative_extensions", from = "src" },
]
[tool.poetry.dependencies]
python = ">=3.8,<4"
sqlalchemy = ">=1.3"
sqlglot = {version = "*", optional = true}
alembic = { version = ">=1.0", optional = true }
[tool.poetry.group.dev.dependencies]
alembic-utils = "0.8.1"
coverage = ">=5"
mypy = "1.8.0"
pymysql = {version = "*", extras = ["rsa"]}
pytest = ">=7"
pytest-alembic = "*"
pytest-mock-resources = { version = ">=2.6.13", extras = ["docker"] }
pytest-xdist = "*"
ruff = "^0.5.0"
sqlalchemy = {version = ">=1.4", extras = ["mypy"]}
psycopg = "*"
psycopg2-binary = "*"
# snowflake
fakesnow = {version = "~0.9.21", python = ">=3.9"}
snowflake-connector-python = {version = ">=3.7", python = ">=3.9"}
snowflake-sqlalchemy = {version = ">=1.6.0", python = ">=3.9"}
filelock = {version = "*", python = ">=3.9"}
numpy = {version = ">=1.26", python = ">=3.9"}
[tool.poetry.extras]
alembic = ["alembic"]
parse = ["sqlglot"]
[tool.mypy]
strict_optional = true
ignore_missing_imports = true
warn_unused_ignores = false
implicit_reexport = true
incremental = true
plugins = ['sqlalchemy.ext.mypy.plugin']
exclude = "tests/examples"
[tool.coverage.report]
show_missing = true
skip_covered = true
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
]
[tool.coverage.run]
include = ["src/*"]
branch = true
parallel = true
[tool.pytest.ini_options]
doctest_optionflags = "NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL ELLIPSIS"
addopts = "--doctest-modules -vv --ff --strict-markers"
norecursedirs = ".* build dist *.egg bin tests/examples --junitxml=junit.xml"
filterwarnings = [
'error',
'ignore:invalid escape sequence.*',
'ignore:distutils Version classes are deprecated. Use packaging.version instead.:DeprecationWarning',
'ignore:_SixMetaPathImporter.find_spec.*:ImportWarning',
'ignore:`ignore_views` is deprecated, use `ignore` instead:DeprecationWarning',
'ignore:The GenericFunction.*:sqlalchemy.exc.SAWarning',
'ignore:Did not recognize type.*:sqlalchemy.exc.SAWarning',
]
pytester_example_dir = "tests/examples"
markers = [
'grant',
'schema',
'role',
'row',
'alembic',
]
pmr_multiprocess_safe = true
log_level = 'WARNING'
log_cli_level = 'WARNING'
[tool.ruff]
src = ["src", "tests"]
target-version = "py37"
[tool.ruff.lint]
select = ["C", "D", "E", "F", "I", "N", "Q", "RET", "RUF", "S", "T", "UP", "YTT"]
ignore = ["C901", "E501", "S101"]
extend-select = ["D"]
extend-ignore = [
"D1",
"D203",
"D204",
"D213",
"D215",
"D400",
"D404",
"D406",
"D407",
"D408",
"D409",
"D413",
]
[tool.ruff.lint.isort]
known-first-party = ["sqlalchemy_declarative_extensions", "tests"]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["D", "S", 'RUF012']
[build-system]
requires = ["poetry_core>=1.0.8"]
build-backend = "poetry.core.masonry.api"