@@ -7,7 +7,7 @@ maintainers = [{ name = "Litestar Developers", email = "
[email protected] " }]
77name = " sqlspec"
88readme = " README.md"
99requires-python = " >=3.9, <4.0"
10- version = " 0.6 .0"
10+ version = " 0.7 .0"
1111
1212[project .optional-dependencies ]
1313adbc = [" adbc-driver-manager" , " pyarrow" ]
@@ -21,6 +21,7 @@ fastapi = ["fastapi"]
2121flask = [" flask" ]
2222litestar = [" litestar" ]
2323msgspec = [" msgspec" ]
24+ nanoid = [" fastnanoid>=0.4.1" ]
2425oracledb = [" oracledb" ]
2526orjson = [" orjson" ]
2627performance = [" sqlglot[rs]" ]
@@ -29,20 +30,22 @@ pydantic = ["pydantic", "pydantic-extra-types"]
2930pymssql = [" pymssql" ]
3031pymysql = [" pymysql" ]
3132spanner = [" google-cloud-spanner" ]
33+ uuid = [" uuid-utils>=0.6.1" ]
3234
3335[dependency-groups ]
36+ build = [" bump-my-version" ]
3437dev = [
3538 " adbc-driver-sqlite" ,
3639 " adbc-driver-postgresql" ,
3740 " adbc-driver-flightsql" ,
3841 { include-group = " lint" },
3942 { include-group = " doc" },
4043 { include-group = " test" },
44+ { include-group = " build" },
4145]
4246doc = [
4347 " 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" ,
4649 " sphinx>=7.0.0; python_version <= \" 3.9\" " ,
4750 " sphinx>=8.0.0; python_version >= \" 3.10\" " ,
4851 " sphinx-autobuild>=2021.3.14" ,
@@ -53,6 +56,8 @@ doc = [
5356 " sphinx-paramlinks>=0.6.0" ,
5457 " sphinx-togglebutton>=0.3.2" ,
5558 " sphinx-toolbox>=3.8.1" ,
59+ " myst-parser" ,
60+ " sphinx-autodoc-typehints" ,
5661]
5762lint = [
5863 " mypy>=1.13.0" ,
@@ -76,7 +81,6 @@ test = [
7681 " pytest-xdist>=3.6.1" ,
7782]
7883
79-
8084[build-system ]
8185build-backend = " hatchling.build"
8286requires = [" hatchling" ]
@@ -93,6 +97,40 @@ include = ["NOTICE"]
9397packages = [" sqlspec" ]
9498
9599
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+
96134[tool .codespell ]
97135ignore-words-list = " te"
98136skip = ' uv.lock'
@@ -104,6 +142,7 @@ disable_warnings = ["no-data-collected", "module-not-measured", "module-not-impo
104142omit = [" */tests/*" ]
105143parallel = true
106144plugins = [" covdefaults" ]
145+ relative_files = true
107146source = [" sqlspec" ]
108147
109148[tool .coverage .report ]
@@ -132,6 +171,17 @@ exclude_lines = [
132171addopts = " -ra -q --doctest-glob='*.md' --strict-markers --strict-config"
133172asyncio_default_fixture_loop_scope = " function"
134173asyncio_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+ ]
135185testpaths = [" tests" ]
136186xfail_strict = true
137187
@@ -177,46 +227,19 @@ reportUnnecessaryTypeIgnoreComments = true
177227strict-imports = false
178228
179229[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"
215234
216- ]
235+ [tool .ruff .format ]
236+ docstring-code-format = true
237+ docstring-code-line-length = 60
217238
218- line-length = 120
219- lint.ignore = [
239+ [tool .ruff .lint ]
240+ extend-safe-fixes = [" TC" ]
241+ fixable = [" ALL" ]
242+ ignore = [
220243 " A003" , # flake8-builtins - class attribute {name} is shadowing a python builtin
221244 " B010" , # flake8-bugbear - do not call setattr with a constant attribute value
222245 " D100" , # pydocstyle - missing docstring in public module
@@ -236,9 +259,16 @@ lint.ignore = [
236259 " ISC001" , # Ruff formatter incompatible
237260 " A005" , # flake8 - Module `x` shadows a Python standard-library module
238261 " 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
239270]
240- src = [" sqlspec" , " tests" , " docs/examples" ]
241- target-version = " py39"
271+ select = [" ALL" ]
242272
243273[tool .ruff .lint .pydocstyle ]
244274convention = " google"
@@ -278,10 +308,12 @@ known-first-party = ["sqlspec", "tests"]
278308 " SIM" ,
279309 " TC" ,
280310 " TRY" ,
311+ " PT012" ,
312+ " INP001" ,
281313]
282- "tools/**/*.*" = [" D" , " ARG" , " EM" , " TRY" , " G" , " FBT" , " S603" , " F811" , " PLW0127" ]
314+ "tools/**/*.*" = [" D" , " ARG" , " EM" , " TRY" , " G" , " FBT" , " S603" , " F811" , " PLW0127" , " PLR0911 " ]
283315"tools/prepare_release.py" = [" S603" , " S607" ]
284316
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