[project]
name = "suno_api"
version = "0.1.0"
description = ""
authors = [{ name = "Suno", email = "code@suno.ai" }]
dependencies = [
    "anthropic==0.49.0",
    "boto3==1.37.7",
    "cryptography>=42.0.0",
    "discord-py==2.5.2",
    "dj-database-url==2.3.0",
    "django-authlib==0.17.2",
    "django-cors-headers==4.7.0",
    "django-debug-toolbar==5.0.1",
    "django-environ==0.12.0",
    "django-extensions==3.2.3",
    "django-ninja==1.4.3",
    "django-ratelimit==4.1.0",
    "django>=5.1.7",
    "gunicorn",
    "hikari-tanjun==2.17.6",
    "hikari-yuyo[tanjun]==1.21.1",
    "hikari[server]==2.0.0.dev126",
    "openai==2.7.2",
    "psycopg2-binary==2.9.10",
    "pydantic>=2.11.7",
    "pyjwt[crypto]>=2.8.0",
    "redis==5.2.1",
    "requests-oauthlib==2.0.0",
    "sentry-sdk>=2.39.0",
    "setuptools==75.8.2",
    "stripe==13.1.2b1",
    "tweepy==4.15.0",
    "unidecode==1.3.8",
    "uvloop==0.21.0",
    "pyarrow==21.0.0",
    "uvicorn[standard]==0.30.1",
    "whitenoise==6.9.0",
    "yt-dlp==2025.2.19",
    "celery==5.4.0",
    "flower==2.0.1",
    "datadog==0.51.0",
    "sqids==0.5.1",
    "statsig==0.57.1",
    "pytest-env==1.1.5",
    "langid==1.1.6",
    "turbopuffer>=0.1.40", # Upgraded for Python 3.13 compatibility
    "pandas>=2.2.3", # Has Python 3.13 wheels, required by turbopuffer
    "elasticsearch==8.17.2",
    "klaviyo-api==18.0.0",
    "modal==1.1.4",
    "snowflake==1.0.5",
    "pillow==11.1.0",
    "phonenumbers==9.0.0",
    "SQLAlchemy==2.0.38",
    "langdetect==1.0.9",
    "pillow-heif==0.21.0",
    "snowflake-snowpark-python[modin]>=1.26.0", # Upgraded for Python 3.13 support
    "ipinfo==5.1.1",
    "alt-profanity-check==1.6.1",
    "geoip2>=5.0.1",
    "ably>=2.0.11",
    "django-linear-migrations>=2.17.0",
    "editdistance>=0.8.1",
    "svix==1.61.2",
    "numpy==1.26.4",
    "scikit-learn>=1.6.1",
    "gspread>=6.2.0",
    "watchtower>=3.4.0",
    "honeypot-py==0.2.18",
    "pytest-testmon>=2.1.3",
    "ddtrace==3.16.2",
    "jinja2>=3.1.4",
    "django-oauth-toolkit==3.0.1",
    "orjson>=3.10.12",
    "moviepy>=1.0.3",
    "django-redis>=5.4.0",
    "json5>=0.9.25",
    "valkey-glide>=1.3.4",
    "setproctitle>=1.3.6", # not explicitly used, but required for gunicorn to set process name
    "statsig-python-core>=0.5.0",
    "structlog>=25.4.0",
    "py-moneyed>=3.0",
    "pretty-midi==0.2.10",
    "social-auth-app-django>=5.5.1",
    "werkzeug>=3.1.3",
    "shortuuid>=1.0.13",
    "theine>=2.0.0",
    "prelude-python-sdk>=0.7.0",
    "memray>=1.18.0",
    "clerk-backend-api>=3.3.1", # used for backfilling clerk users, remove afterwards
]
requires-python = "==3.13.7"
license = { text = "PRIVATE" }

[project.optional-dependencies]
worker = ["gradio>=5.20.0"]


[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "studio_api.settings"
python_files = "tests.py test_*.py *_tests.py"
norecursedirs = "venv __pypackages__ .venv"
markers = ["slow: marks tests as slow (deselect with '-m \"not slow\"')"]
addopts = ["--reuse-db"]

[tool.ruff]
line-length = 105
exclude = ["migrations"]
lint.select = [
    "E", # pycodestyle errors
    "F", # pyflakes
    "I", # import sorting
    "T201", # ban print
    "T203", # ban pprint
    "LOG", # logging linting
    "PLE1205",
    "PLE1206",
]
# temporarily...
lint.ignore = ["E501"]

[tool.ruff.lint.per-file-ignores]
"scripts/**" = ["T201"]

[tool.black]
line-length = 105
exclude = "migrations"

[tool.pytest_env]
ENV = "testing"
IS_TESTING = "true"

[tool.pyright]
include = ["studio_api"]
exclude = ["studio_api/**/migrations"]
pythonVersion = "3.13.7"
venvPath = "."
venv = ".venv"
useLibraryCodeForTypes = true
typeCheckingMode = "basic"

[tool.uv]
python-preference = "only-managed"
dev-dependencies = [
    "jupyterlab==4.3.5",
    "pytest==8.3.5",
    "pytest-django==4.10.0",
    "pytest-mock==3.14.0",
    "pytest-asyncio==0.25.3",
    "ruff>=0.9.9",
    "pyright>=1.1.406",
    "django-stubs>=5.1.3",
    "boto3-stubs[essential]==1.34.144",
    "freezegun>=1.5.1",
    "pytest-cov==6.0.0",
    "fastapi[standard]>=0.115.11",
    "playwright>=1.51.0",
    "pytest-timeout>=2.4.0",
    "types-redis>=4.6.0.20241004",
    "types-stripe>=3.5.2.20240106",
    "pip-licenses>=5.0.0",
    "lefthook>=2.0.0",
]

[tool.uv.sources]
gunicorn = { git = "https://github.com/benoitc/gunicorn", rev = "a86ea1e4e6c271d1cd1823c7e14490123f9238fe" }
