-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
pyproject.toml
145 lines (127 loc) · 3.24 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
[project]
name = "sqlalchemy-declarative-extensions"
version = "0.15.7"
authors = [
{name = "Dan Cardin", email = "[email protected]"},
]
description = "Library to declare additional kinds of objects not natively supported by SQLAlchemy/Alembic."
license = {file = "LICENSE"}
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",
]
requires-python = ">=3.8,<4"
dependencies = [
"sqlalchemy >= 1.3",
]
[project.optional-dependencies]
alembic = ["alembic >= 1.0"]
parse = ["sqlglot"]
[tool.uv]
environments = ["python_version < '3.9'", "python_version >= '3.9' and python_version < '4'"]
dev-dependencies = [
"alembic-utils >= 0.8.1",
"coverage >= 5",
"mypy == 1.8.0",
"pymysql[rsa]",
"pytest >= 7",
"pytest-alembic",
"pytest-mock-resources[docker] >= 2.6.13",
"pytest-xdist",
"ruff >= 0.5.0",
"sqlalchemy[mypy] >= 1.4",
"psycopg",
"psycopg2-binary",
# snowflake
"fakesnow >= 0.9.21; python_version >= '3.9'",
"snowflake-connector-python >= 3.7; python_version >= '3.9'",
"snowflake-sqlalchemy >= 1.6.0; python_version >= '3.9'",
]
[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 = ["hatchling"]
build-backend = "hatchling.build"