1[project] 2name = "backend" 3dynamic = ["version"] 4description = "decentralized music streaming platform built on ATProto" 5authors = [{ name = "zzstoatzz", email = "thrast36@gmail.com" }] 6dependencies = [ 7 "fastapi>=0.115.0", 8 "uvicorn[standard]>=0.34.0", 9 "httpx>=0.28.0", 10 "pydantic>=2.11.0", 11 "pydantic-settings>=2.7.0", 12 "python-dotenv>=1.1.0", 13 "sqlalchemy>=2.0.36", 14 "alembic>=1.14.0", 15 "asyncpg>=0.30.0", 16 "atproto @ git+https://github.com/zzstoatzz/atproto@main", 17 "boto3>=1.37.0", 18 "python-multipart>=0.0.20", 19 "python-jose[cryptography]>=3.3.0", 20 "passlib[bcrypt]>=1.7.4", 21 "psycopg[binary]>=3.2.12", 22 "greenlet>=3.2.4", 23 "logfire[fastapi,sqlalchemy]>=4.14.2", 24 "cachetools>=6.2.1", 25 "pytest-asyncio>=0.25.3", 26 "aioboto3>=15.5.0", 27 "slowapi @ git+https://github.com/zzstoatzz/slowapi.git@fix-deprecation", 28 "orjson>=3.11.4", 29 "mutagen>=1.47.0", 30 "pydocket>=0.15.2", 31] 32 33requires-python = ">=3.11" 34readme = "README.md" 35license = "Apache-2.0" 36 37keywords = ["music", "streaming", "atproto", "bluesky", "decentralized"] 38 39[dependency-groups] 40dev = [ 41 "dirty-equals>=0.9.0", 42 "ipython>=8.12.3", 43 "pdbpp>=0.10.3", 44 "prek>=0.2.13", 45 "pytest>=8.3.3", 46 "pytest-asyncio>=1.0.0", 47 "pytest-cov>=6.1.1", 48 "pytest-env>=1.1.5", 49 "pytest-timeout>=2.4.0", 50 "pytest-xdist>=3.6.1", 51 "ruff>=0.12.0", 52 "httpx>=0.28.0", 53 "ty>=0.0.1a25", 54] 55 56[build-system] 57requires = ["hatchling", "uv-dynamic-versioning>=0.7.0"] 58build-backend = "hatchling.build" 59 60[tool.hatch.version] 61source = "uv-dynamic-versioning" 62 63[tool.hatch.metadata] 64allow-direct-references = true 65 66[tool.uv-dynamic-versioning] 67vcs = "git" 68style = "pep440" 69bump = true 70fallback-version = "0.0.0" 71 72[tool.pytest.ini_options] 73asyncio_mode = "auto" 74asyncio_default_fixture_loop_scope = "function" 75timeout = 10 76env = [ 77 "RELAY_TEST_MODE=1", 78 "OAUTH_ENCRYPTION_KEY=hnSkDmgbbuK0rt7Ab3eJHAktb18gmebsdwKdTmq9mes=", 79 "LOGFIRE_IGNORE_NO_CONFIG=1", 80 # reduce connection pool for tests to avoid exhausting Neon's connection limit 81 "DATABASE_POOL_SIZE=2", 82 "DATABASE_MAX_OVERFLOW=0", 83] 84markers = [ 85 "integration: marks tests as integration tests (deselect with '-m \"not integration\"')", 86] 87pythonpath = ["."] 88testpaths = ["tests"] 89python_files = ["test_*.py", "*_test.py"] 90python_classes = ["Test*"] 91python_functions = ["test_*"] 92filterwarnings = [ 93 "ignore::pydantic.warnings.UnsupportedFieldAttributeWarning", 94] 95 96[tool.ruff.lint] 97fixable = ["ALL"] 98ignore = [ 99 "COM812", 100 "PLR0913", # Too many arguments 101 "SIM102", # Dont require combining if statements 102] 103extend-select = [ 104 "B", # flake8-bugbear 105 "C4", # flake8-comprehensions 106 "I", # isort 107 "PIE", # flake8-pie 108 "RUF", # Ruff-specific 109 "SIM", # flake8-simplify 110 "UP", # pyupgrade 111] 112 113[tool.ruff.lint.per-file-ignores] 114"__init__.py" = ["F401", "I001"] 115"tests/**/*.py" = ["S101"] # Allow assert in tests 116"src/backend/api/**/*.py" = [ 117 "B008", 118] # Allow Depends() and File() in FastAPI route defaults 119"src/backend/main.py" = ["E402"] # Need warnings filter before imports 120 121[tool.coverage.run] 122source = ["src"] 123omit = ["tests/*", "sandbox/*"] 124 125[tool.coverage.report] 126exclude_lines = [ 127 "pragma: no cover", 128 "def __repr__", 129 "raise AssertionError", 130 "raise NotImplementedError", 131 "if __name__ == .__main__.:", 132 "if TYPE_CHECKING:", 133] 134 135[tool.ty.src] 136include = ["src", "tests"] 137exclude = [ 138 "**/node_modules", 139 "**/__pycache__", 140 ".venv", 141 ".git", 142 "dist", 143 "frontend", 144] 145 146[tool.ty.environment] 147python-version = "3.11" 148 149[tool.ty.rules] 150# start with basic checks, can tighten later 151unknown-argument = "ignore" 152no-matching-overload = "ignore"