@@ -28,6 +28,7 @@ classifiers = [
2828 " Programming Language :: Python :: 3.9" ,
2929 " Programming Language :: Python :: 3.10" ,
3030 " Programming Language :: Python :: 3.11" ,
31+ " Programming Language :: Python :: 3.12" ,
3132 " Programming Language :: Python :: Implementation :: CPython" ,
3233 " Programming Language :: SQL" ,
3334 " Topic :: Database" ,
@@ -41,13 +42,18 @@ dynamic = [
4142 " version" ,
4243]
4344dependencies = [
44- " greenlet>=3.0.0a1" ,
4545 " sqlalchemy>=1.4" ,
4646 " sqlean-py>=0.21.5.1" ,
4747]
4848[project .optional-dependencies ]
49- dev = [
49+ coverage = [
50+ " coverage[toml]>=6.5" ,
51+ ]
52+ testing = [
5053 " pytest" ,
54+ ]
55+ typing = [
56+ " mypy>=1" ,
5157 ' typing-extensions; python_version < "3.10"' ,
5258]
5359[project .urls ]
@@ -67,53 +73,54 @@ dependencies = [
6773 " pytest-github-actions-annotate-failures" ,
6874 " sqlalchemy=={matrix:sqlalchemy:2}.*" ,
6975]
70- features = [" dev " ]
76+ features = [" testing " ]
7177matrix-name-format = " {variable}_{value}"
7278[tool .hatch .envs .test .env-vars ]
7379SQLALCHEMY_WARN_20 = " 1"
80+ [tool .hatch .envs .test .overrides ]
81+ env.GITHUB_ACTIONS.dev-mode = { value = false , if = [" true" ] }
82+
7483[tool .hatch .envs .test .scripts ]
7584run = " pytest {args:tests}"
7685cov = " coverage run -m pytest {args:tests}"
7786
7887[[tool .hatch .envs .test .matrix ]]
7988sqlalchemy = [" 1" , " 2" ]
80- python = [" 3.8" , " 3.9" , " 3.10" , " 3.11" , " 3.12" ]
89+ python = [" 3.8" , " 3.9" , " 3.10" , " 3.11" , " 3.12" , " 3.13 " ]
8190
8291[tool .hatch .envs .coverage ]
83- dependencies = [
84- " coverage[toml]>=6.5" ,
85- ]
92+ features = [" coverage" ]
8693[tool .hatch .envs .coverage .scripts ]
8794json = " coverage json"
8895xml = " coverage xml"
89- report = [" coverage combine" , " coverage report --show-missing" ]
96+ report = [" coverage combine --debug=pathmap " , " coverage report --show-missing" ]
9097
9198[tool .hatch .envs .typing ]
92- dependencies = [" mypy>=1.0.0" ]
93- features = [" dev" ]
99+ features = [" testing" , " typing" ]
94100[tool .hatch .envs .typing .scripts ]
95101check = " mypy --strict --install-types --non-interactive {args:src/sqlean_driver tests}"
96102
97103[tool .hatch .envs .lint ]
104+ dependencies = [" ruff>=0.1" ]
98105detached = true
99- dependencies = [" black>=23.1.0" , " mypy>=1.0.0" , " ruff>=0.0.243" ]
100106[tool .hatch .envs .lint .scripts ]
101- style = [" ruff check {args:.}" , " black --check --diff {args:.}" ]
102- style-gh = [" ruff check {args:.} --format github" , " black --check --diff {args:.}" ]
103- fmt = [" black {args:.}" , " ruff check --fix {args:.}" , " style " ]
107+ style = [" ruff check {args:.}" , " ruff format --check --diff {args:.}" ]
108+ style-gh = [" ruff check {args:.} --output- format github" , " ruff format --check --diff {args:.}" ]
109+ fmt = [" ruff --fix {args:.}" , " ruff format {args:.}" ]
104110
105- [tool .black ]
106- target-version = [" py38" ]
111+ [tool .ruff ]
107112line-length = 100
108- skip-string-normalization = true
113+ target-version = " py38 "
109114
110- [tool .ruff ]
115+ [tool .ruff . lint ]
111116ignore = [
112117 " ANN101" , # missing-type-self
113118 " ANN102" , # missing-type-cls
114119 " FIX002" , # line-contains-todo
120+ " COM812" , # missing-trailing-comma
121+ " ISC001" , # single-line-implicit-string-concatenation
115122]
116- line-length = 100
123+ preview = true
117124select = [
118125 " F" , # Pyflakes
119126 " E" , # pycodestyle (error)
@@ -207,49 +214,51 @@ select = [
207214 " FURB132" , # check-and-remove-from-set
208215 " RUF" , # Ruff-specific rules
209216]
210- target-version = " py38"
211217unfixable = [
212218 " ERA" ,
213219 " F401" ,
214220]
215221
216- [tool .ruff .isort ]
222+ [tool .ruff .lint . isort ]
217223known-first-party = [" sqlean_driver" ]
218224required-imports = [" from __future__ import annotations" ]
219225
220- [tool .ruff .flake8-annotations ]
226+ [tool .ruff .lint . flake8-annotations ]
221227allow-star-arg-any = true
222228
223- [tool .ruff .flake8-import-conventions ]
229+ [tool .ruff .lint . flake8-import-conventions ]
224230banned-from = [" typing" ]
225231
226- [tool .ruff .flake8-import-conventions .extend-aliases ]
232+ [tool .ruff .lint . flake8-import-conventions .extend-aliases ]
227233typing = " t"
228234
229- [tool .ruff .flake8-tidy-imports ]
235+ [tool .ruff .lint . flake8-tidy-imports ]
230236ban-relative-imports = " all"
231237
232- [tool .ruff .pep8-naming ]
238+ [tool .ruff .lint . pep8-naming ]
233239ignore-names = [" visit_*" ]
234240
235- [tool .ruff .per-file-ignores ]
241+ [tool .ruff .lint . per-file-ignores ]
236242# Tests can use magic values, assertions, and relative imports
237243"tests/**/*" = [" PLR2004" , " S101" , " TID252" , " ANN201" ]
238244
239- [tool .ruff .pydocstyle ]
245+ [tool .ruff .lint . pydocstyle ]
240246convention = " google"
241247
242248[tool .pytest .ini_options ]
243249addopts = [" -vv" , " -W error" ]
244250
251+ [tool .coverage .paths ]
252+ package = [
253+ " src/sqlean_driver/" ,
254+ " */site-packages/sqlean_driver/" ,
255+ ]
256+
245257[tool .coverage .run ]
246- source_pkgs = [" sqlean_driver" , " tests" ]
247258branch = true
259+ source = [" sqlean_driver" , " tests" ]
248260parallel = true
249-
250- [tool .coverage .paths ]
251- sqlean_driver = [" src/sqlean_driver" , " */sqlean-driver/src/sqlean_driver" ]
252- tests = [" tests" , " */sqlean-driver/tests" ]
261+ relative_files = true
253262
254263[tool .coverage .report ]
255264exclude_lines = [
0 commit comments