-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
107 lines (94 loc) · 2.2 KB
/
Copy pathpyproject.toml
File metadata and controls
107 lines (94 loc) · 2.2 KB
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
[project]
name = "playlist-porter"
version = "0.1.0"
description = "Modern playlist transfer service"
requires-python = ">=3.10"
dependencies = [
"fastapi>=0.104.0",
"uvicorn[standard]>=0.24.0",
"pydantic>=2.5.0",
"pydantic-settings>=2.1.0",
"httpx>=0.25.0",
"yarl>=1.9.0",
# Web client dependencies
"jinja2>=3.1.0",
"python-multipart>=0.0.6",
# Authentication
"supabase>=2.0.0",
"pyjwt>=2.8.0",
"passlib[bcrypt]>=1.7.4",
# "redis>=5.0.0",
"ruff>=0.12.1",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src"]
[dependency-groups]
dev = [
"mypy>=1.16.1",
"poethepoet>=0.35.0",
]
test = [
"pytest>=8.0.0",
"pytest-asyncio>=0.23.0",
"pytest-mock>=3.14.0",
"httpx>=0.25.0",
"respx>=0.21.0",
]
[tool.poe.tasks]
# Linting & Formatting
format = "ruff format src/"
lint = "ruff check --fix src/"
check = "ruff check src/"
# Type checking
type-check = "mypy src"
type-check-strict = "mypy src --strict"
# Development
dev = "python run_dev.py"
dev-reload = "uvicorn src.main:app --reload --host 0.0.0.0 --port 8000"
# Production
run = "uvicorn src.main:app --host 0.0.0.0 --port 8000"
# CI pipeline
ci = ["check", "type-check"]
quality = ["format", "lint", "type-check"]
[tool.ruff]
target-version = "py311"
line-length = 88
src = ["src"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # function calls in argument defaults
"B904", # raise ... from err (can be ignored for now)
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"--strict-markers",
"--disable-warnings",
"--tb=short"
]
markers = [
"unit: Unit tests",
"integration: Integration tests",
"spotify: Tests that require Spotify API",
]
asyncio_mode = "auto"