Skip to content

Commit f69c632

Browse files
chore: convert pyproject.toml to uv
1 parent e96129c commit f69c632

File tree

1 file changed

+84
-48
lines changed

1 file changed

+84
-48
lines changed

pyproject.toml

Lines changed: 84 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,95 @@
1-
[tool.poetry]
1+
[project]
22
name = "mvp"
33
version = "1.1.0"
44
description = ""
5-
authors = ["pythoninthegrass <[email protected]>"]
5+
authors = [
6+
{name = "pythoninthegrass", email = "[email protected]"}
7+
]
68
license = "Unlicense"
7-
package-mode = false
8-
9-
[tool.poetry.dependencies]
10-
python = ">=3.11,<3.13"
11-
12-
[tool.poetry.group.dev.dependencies]
13-
argcomplete = "^3.5.0"
14-
icecream = "^2.1.3"
15-
ipython = "^8.27.0"
16-
poetry-plugin-export = "^1.8.0"
17-
poetry-plugin-up = "^0.7.1"
18-
pyclean = "^3.0.0"
19-
rich = "^13.8.1"
20-
ruff = "^0.6.6"
21-
22-
[tool.poetry.group.test.dependencies]
23-
coverage = "^7.6.1"
24-
hypothesis = {extras = ["cli"], version = "^6.112.1"}
25-
pytest = "^8.3.3"
26-
pytest-asyncio = "^0.24.0"
27-
pytest-cov = "^5.0.0"
28-
pytest-datafiles = "^3.0.0"
29-
pytest-xdist = "^3.6.1"
9+
10+
requires-python = ">=3.11,<3.13"
11+
12+
dependencies = []
13+
14+
[project.optional-dependencies]
15+
dev = [
16+
"argcomplete<4.0.0,>=3.5.0",
17+
"deptry<1.0.0,>=0.23.0",
18+
"icecream<3.0.0,>=2.1.3",
19+
"ipython<9.0.0,>=8.27.0",
20+
"mypy<2.0.0,>=1.14.1",
21+
"pyclean<4.0.0,>=3.0.0",
22+
"pytest-asyncio<1.0.0,>=0.25.2",
23+
"pytest-cov<7.0.0,>=6.0.0",
24+
"pytest<9.0.0,>=8.3.4",
25+
"rich<14.0.0,>=13.8.1",
26+
"ruff>=0.9.5",
27+
]
28+
test = [
29+
"coverage<8.0.0,>=7.6.1",
30+
"hypothesis[cli]<7.0.0,>=6.112.1",
31+
"pytest<9.0.0,>=8.3.3",
32+
"pytest-asyncio<1.0.0,>=0.24.0",
33+
"pytest-cov>=6.1.1",
34+
"pytest-datafiles<4.0.0,>=3.0.0",
35+
"pytest-xdist<4.0.0,>=3.6.1",
36+
]
37+
38+
[tool.deptry]
39+
# DEP003: transitive deps
40+
ignore = [
41+
"DEP003"
42+
]
43+
44+
[tool.deptry.per_rule_ignores]
45+
# DEP002: not used in codebase (excluding dev deps)
46+
DEP002 = [
47+
"deptry",
48+
"mypy",
49+
"pytest",
50+
"pytest-asyncio",
51+
"pytest-cov",
52+
"ruff",
53+
"uvicorn"
54+
]
55+
56+
[tool.mypy]
57+
python_version = "3.11"
58+
warn_return_any = true
59+
warn_unused_configs = true
60+
disallow_untyped_defs = true
61+
check_untyped_defs = true
3062

3163
[tool.pytest.ini_options]
3264
testpaths = ["tests"]
65+
python_files = "test_*.py"
66+
python_functions = "test_*"
67+
python_classes = "Test*"
3368
asyncio_mode = "auto"
34-
asyncio_default_fixture_loop_scope = "function"
35-
norecursedirs = [
36-
".cache",
37-
".eggs",
38-
".git",
39-
".github",
40-
".gitmodules",
41-
".pytest",
42-
".pytest_cache",
43-
".venv",
44-
".vscode",
45-
"__pycache__",
46-
"build",
47-
"dist",
48-
"node_modules"
69+
markers = [
70+
"unit: marks tests as unit tests",
71+
"integration: marks tests as integration tests",
72+
"e2e: marks tests as end-to-end tests",
73+
"benchmark: marks performance benchmark tests"
4974
]
5075

51-
[tool.uv.pip]
52-
index-url = "https://pypi.org/simple"
76+
[tool.coverage.run]
77+
source = ["app"]
78+
omit = [
79+
"*/tests/*",
80+
"*/migrations/*",
81+
"*/alembic/*"
82+
]
83+
84+
[tool.coverage.report]
85+
exclude_lines = [
86+
"pragma: no cover",
87+
"def __repr__",
88+
"raise NotImplementedError",
89+
"if TYPE_CHECKING:",
90+
"pass",
91+
"..."
92+
]
5393

5494
[tool.ruff]
5595
# Fix without reporting on leftover violations
@@ -91,7 +131,7 @@ exclude = [
91131
"venv",
92132
]
93133

94-
# Assume Python 3.11.
134+
# Assume Python 3.11
95135
target-version = "py311"
96136

97137
[tool.ruff.format]
@@ -119,7 +159,7 @@ select = [
119159
# isort
120160
"I",
121161
]
122-
ignore = ["D203", "E203", "E251", "E266", "E401", "E402", "E501", "F401", "F403"]
162+
ignore = ["D203", "E203", "E251", "E266", "E401", "E402", "E501", "F401", "F403", "F841"]
123163

124164
# Allow unused variables when underscore-prefixed.
125165
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
@@ -141,7 +181,3 @@ docstring-quotes = "double"
141181
[tool.ruff.lint.mccabe]
142182
# Unlike Flake8, default to a complexity level of 10.
143183
max-complexity = 10
144-
145-
[build-system]
146-
requires = ["poetry-core"]
147-
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)