@@ -7,7 +7,7 @@ maintainers = [{ name = "Litestar Developers", email = "hello@litestar.dev" }]
7
7
name = " sqlspec"
8
8
readme = " README.md"
9
9
requires-python = " >=3.9, <4.0"
10
- version = " 0.6 .0"
10
+ version = " 0.7 .0"
11
11
12
12
[project .optional-dependencies ]
13
13
adbc = [" adbc-driver-manager" , " pyarrow" ]
@@ -21,6 +21,7 @@ fastapi = ["fastapi"]
21
21
flask = [" flask" ]
22
22
litestar = [" litestar" ]
23
23
msgspec = [" msgspec" ]
24
+ nanoid = [" fastnanoid>=0.4.1" ]
24
25
oracledb = [" oracledb" ]
25
26
orjson = [" orjson" ]
26
27
performance = [" sqlglot[rs]" ]
@@ -29,20 +30,22 @@ pydantic = ["pydantic", "pydantic-extra-types"]
29
30
pymssql = [" pymssql" ]
30
31
pymysql = [" pymysql" ]
31
32
spanner = [" google-cloud-spanner" ]
33
+ uuid = [" uuid-utils>=0.6.1" ]
32
34
33
35
[dependency-groups ]
36
+ build = [" bump-my-version" ]
34
37
dev = [
35
38
" adbc-driver-sqlite" ,
36
39
" adbc-driver-postgresql" ,
37
40
" adbc-driver-flightsql" ,
38
41
{ include-group = " lint" },
39
42
{ include-group = " doc" },
40
43
{ include-group = " test" },
44
+ { include-group = " build" },
41
45
]
42
46
doc = [
43
47
" auto-pytabs[sphinx]>=0.5.0" ,
44
- " git-cliff>=2.6.1" ,
45
- " litestar-sphinx-theme @ git+https://github.com/litestar-org/litestar-sphinx-theme.git@v3" ,
48
+ " shibuya" ,
46
49
" sphinx>=7.0.0; python_version <= \" 3.9\" " ,
47
50
" sphinx>=8.0.0; python_version >= \" 3.10\" " ,
48
51
" sphinx-autobuild>=2021.3.14" ,
@@ -53,6 +56,8 @@ doc = [
53
56
" sphinx-paramlinks>=0.6.0" ,
54
57
" sphinx-togglebutton>=0.3.2" ,
55
58
" sphinx-toolbox>=3.8.1" ,
59
+ " myst-parser" ,
60
+ " sphinx-autodoc-typehints" ,
56
61
]
57
62
lint = [
58
63
" mypy>=1.13.0" ,
@@ -76,7 +81,6 @@ test = [
76
81
" pytest-xdist>=3.6.1" ,
77
82
]
78
83
79
-
80
84
[build-system ]
81
85
build-backend = " hatchling.build"
82
86
requires = [" hatchling" ]
@@ -93,6 +97,40 @@ include = ["NOTICE"]
93
97
packages = [" sqlspec" ]
94
98
95
99
100
+ [tool .bumpversion ]
101
+ allow_dirty = true
102
+ commit = false
103
+ commit_args = " --no-verify"
104
+ current_version = " 0.33.1"
105
+ ignore_missing_files = false
106
+ ignore_missing_version = false
107
+ message = " chore(release): bump to v{new_version}"
108
+ parse = " (?P<major>\\ d+)\\ .(?P<minor>\\ d+)\\ .(?P<patch>\\ d+)"
109
+ regex = false
110
+ replace = " {new_version}"
111
+ search = " {current_version}"
112
+ serialize = [" {major}.{minor}.{patch}" ]
113
+ sign_tags = false
114
+ tag = false
115
+ tag_message = " chore(release): v{new_version}"
116
+ tag_name = " v{new_version}"
117
+
118
+ [[tool .bumpversion .files ]]
119
+ filename = " pyproject.toml"
120
+ replace = ' version = "{new_version}"'
121
+ search = ' version = "{current_version}"'
122
+
123
+ [[tool .bumpversion .files ]]
124
+ filename = " uv.lock"
125
+ replace = """
126
+ name = "advanced-alchemy"
127
+ version = "{new_version}"
128
+ """
129
+ search = """
130
+ name = "advanced-alchemy"
131
+ version = "{current_version}"
132
+ """
133
+
96
134
[tool .codespell ]
97
135
ignore-words-list = " te"
98
136
skip = ' uv.lock'
@@ -104,6 +142,7 @@ disable_warnings = ["no-data-collected", "module-not-measured", "module-not-impo
104
142
omit = [" */tests/*" ]
105
143
parallel = true
106
144
plugins = [" covdefaults" ]
145
+ relative_files = true
107
146
source = [" sqlspec" ]
108
147
109
148
[tool .coverage .report ]
@@ -132,6 +171,17 @@ exclude_lines = [
132
171
addopts = " -ra -q --doctest-glob='*.md' --strict-markers --strict-config"
133
172
asyncio_default_fixture_loop_scope = " function"
134
173
asyncio_mode = " auto"
174
+ filterwarnings = [
175
+ " ignore::DeprecationWarning:pkg_resources.*" ,
176
+ " ignore:pkg_resources is deprecated as an API:DeprecationWarning" ,
177
+ " ignore::DeprecationWarning:pkg_resources" ,
178
+ " ignore::DeprecationWarning:google.rpc" ,
179
+ " ignore::DeprecationWarning:google.gcloud" ,
180
+ " ignore::DeprecationWarning:google.iam" ,
181
+ " ignore::DeprecationWarning:google" ,
182
+ " ignore::DeprecationWarning:websockets.connection" ,
183
+ " ignore::DeprecationWarning:websockets.legacy" ,
184
+ ]
135
185
testpaths = [" tests" ]
136
186
xfail_strict = true
137
187
@@ -177,46 +227,19 @@ reportUnnecessaryTypeIgnoreComments = true
177
227
strict-imports = false
178
228
179
229
[tool .ruff ]
180
- lint.select = [
181
- " A" , # flake8-builtins
182
- " B" , # flake8-bugbear
183
- " BLE" , # flake8-blind-except
184
- " C4" , # flake8-comprehensions
185
- " C90" , # mccabe
186
- " D" , # pydocstyle
187
- " DJ" , # flake8-django
188
- " DTZ" , # flake8-datetimez
189
- " E" , # pycodestyle errors
190
- " ERA" , # eradicate
191
- " EXE" , # flake8-executable
192
- " F" , # pyflakes
193
- " G" , # flake8-logging-format
194
- " I" , # isort
195
- " ICN" , # flake8-import-conventions
196
- " ISC" , # flake8-implicit-str-concat
197
- " N" , # pep8-naming
198
- " PIE" , # flake8-pie
199
- " PLC" , # pylint - convention
200
- " PLE" , # pylint - error
201
- " PLW" , # pylint - warning
202
- " PTH" , # flake8-use-pathlib
203
- " Q" , # flake8-quotes
204
- " RET" , # flake8-return
205
- " RUF" , # Ruff-specific rules
206
- " S" , # flake8-bandit
207
- " SIM" , # flake8-simplify
208
- " T10" , # flake8-debugger
209
- " T20" , # flake8-print
210
- " TC" , # flake8-type-checking
211
- " TID" , # flake8-tidy-imports
212
- " UP" , # pyupgrade
213
- " W" , # pycodestyle - warning
214
- " YTT" , # flake8-2020
230
+ exclude = [" .venv" , " node_modules" ]
231
+ line-length = 120
232
+ src = [" sqlspec" , " tests" , " docs/examples" , " tools" ]
233
+ target-version = " py39"
215
234
216
- ]
235
+ [tool .ruff .format ]
236
+ docstring-code-format = true
237
+ docstring-code-line-length = 60
217
238
218
- line-length = 120
219
- lint.ignore = [
239
+ [tool .ruff .lint ]
240
+ extend-safe-fixes = [" TC" ]
241
+ fixable = [" ALL" ]
242
+ ignore = [
220
243
" A003" , # flake8-builtins - class attribute {name} is shadowing a python builtin
221
244
" B010" , # flake8-bugbear - do not call setattr with a constant attribute value
222
245
" D100" , # pydocstyle - missing docstring in public module
@@ -236,9 +259,16 @@ lint.ignore = [
236
259
" ISC001" , # Ruff formatter incompatible
237
260
" A005" , # flake8 - Module `x` shadows a Python standard-library module
238
261
" PLC0415" , # pylint - `import` should be at the top of the file
262
+ " FA100" , # Add `from __future__ import annotations` to simplify
263
+ " ANN401" , # Dynamically typed expressions (typing.Any) are disallowed
264
+ " FBT001" , # Boolean-typed positional argument in function definition
265
+ " FBT002" , # Boolean default positional argument in function definition
266
+ " PLR0913" , # pylint - Too many arguments in function definition
267
+ " ARG002" , # Unused method argument
268
+ " ARG001" , # Unused function argument
269
+ " CPY001" , # pycodestyle - Missing Copywrite notice at the top of the file
239
270
]
240
- src = [" sqlspec" , " tests" , " docs/examples" ]
241
- target-version = " py39"
271
+ select = [" ALL" ]
242
272
243
273
[tool .ruff .lint .pydocstyle ]
244
274
convention = " google"
@@ -278,10 +308,12 @@ known-first-party = ["sqlspec", "tests"]
278
308
" SIM" ,
279
309
" TC" ,
280
310
" TRY" ,
311
+ " PT012" ,
312
+ " INP001" ,
281
313
]
282
- "tools/**/*.*" = [" D" , " ARG" , " EM" , " TRY" , " G" , " FBT" , " S603" , " F811" , " PLW0127" ]
314
+ "tools/**/*.*" = [" D" , " ARG" , " EM" , " TRY" , " G" , " FBT" , " S603" , " F811" , " PLW0127" , " PLR0911 " ]
283
315
"tools/prepare_release.py" = [" S603" , " S607" ]
284
316
285
- [tool .ruff .format ]
286
- docstring-code-format = true
287
- docstring-code-line-length = 88
317
+ [tool .ruff .lint . flake8-tidy-imports ]
318
+ # Disallow all relative imports.
319
+ ban-relative-imports = " all "
0 commit comments