Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
89 lines (78 loc) · 2.34 KB
/
Copy pathpyproject.toml
File metadata and controls
89 lines (78 loc) · 2.34 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
[build-system]
requires = ["setuptools>=77", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "metaedit"
version = "0.4.0"
description = "Browse a Jellyfin music library, read Last.fm metadata, keep a persistent local archive of every Last.fm response, and apply reviewed metadata edits back to Jellyfin."
readme = "README.md"
requires-python = ">=3.12"
license = "MIT"
authors = [{ name = "metaedit" }]
dependencies = [
"fastapi[standard]>=0.115",
"uvicorn[standard]>=0.32",
"sqlalchemy[asyncio]>=2.0.36",
"psycopg[binary,pool]>=3.2",
"alembic>=1.14",
"pydantic>=2.9",
"pydantic-settings>=2.6",
"httpx>=0.27",
"structlog>=24.4",
]
[project.optional-dependencies]
dev = [
"pytest>=8.3",
"pytest-asyncio>=0.24",
"pytest-cov>=6.0",
"pytest-timeout>=2.3",
"respx>=0.21",
"ruff>=0.8",
"mypy>=1.13",
]
[project.scripts]
metaedit = "metaedit.cli:main"
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
metaedit = ["py.typed"]
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
# Live suites are opt-in. Without this they would run whenever credentials happen to
# be present, which makes the default `pytest` reach real services: slow, rate-limited
# and non-deterministic. Run them explicitly with `-m live_lastfm` / `-m live_jellyfin`.
addopts = "-q --strict-markers --timeout=90 -m 'not live_lastfm and not live_jellyfin'"
timeout_method = "thread"
markers = [
"live_lastfm: requires LASTFM_API_KEY and hits the real Last.fm API",
"live_jellyfin: requires JELLYFIN_URL and JELLYFIN_API_KEY and hits a real server",
"live_postgres: requires METAEDIT_TEST_DATABASE_URL and a real Postgres 18",
]
[tool.ruff]
line-length = 100
target-version = "py312"
src = ["src", "tests"]
extend-exclude = [
".cache",
".venv",
".tools",
".pytest_cache",
".ruff_cache",
"apps/web/node_modules",
"apps/web/dist",
]
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM", "C4", "RUF", "ASYNC"]
ignore = ["B008"] # FastAPI Depends() in defaults is the documented pattern
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["E501"]
[tool.mypy]
python_version = "3.12"
strict = true
files = ["src/metaedit"]
plugins = ["pydantic.mypy"]
warn_unreachable = true
[[tool.mypy.overrides]]
module = ["alembic.*"]
ignore_missing_imports = true