[project] name = "label-studio" version = "1.24.0.dev0" description = "Label Studio annotation tool" authors = [{ name = "HumanSignal", email = "support@humansignal.com" }] requires-python = ">=3.11,<4" readme = "README.md" license = "Apache-2.0" classifiers = [ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", ] dependencies = [ "wheel (>=0.46.3)", "appdirs (>=1.4.3)", "attrs (>=19.2.0)", "pyyaml (>=6.0.0)", "azure-storage-blob (>=12.6.0)", "boto3 (>=1.28.58,<2.0.0)", "botocore (>=1.39.3,<2.0.0)", "bleach (>=6.4.0)", "cryptography (>=44.0.1)", "Django (>=5.2.16,<5.3.0)", "django-storages (==1.12.3)", "django-annoying (==0.10.6)", "django-debug-toolbar (==3.2.1)", "django-environ (==0.14.0)", "django-filter (==24.3)", "django-rq (>=4.1.1,<4.2)", "django-cors-headers (==4.7.0)", "django-extensions (==3.2.3)", "django-user-agents (==0.4.0)", "django-ranged-fileresponse (>=0.1.2)", "drf-dynamic-fields (==0.3.0)", "djangorestframework (==3.18.3)", "drf-flex-fields (==0.9.5)", "drf-spectacular (==0.28.0)", "drf-generators (==0.3.0)", "lxml[html-clean] (>=6.1.0)", "defusedxml (>=0.7.1)", "numpy (>=2.2.6,<3.0.0)", "ordered-set (==4.0.2)", "pandas (>=2.2.3)", "psycopg[binary] (>=3.2.0,<4.0.0)", "pyarrow (>=26.0.1,<27.0.0)", "pydantic (>=2.9.2)", "python-dateutil (>=2.8.1)", "pytz (>=2022.1,<2023.0)", "requests>=2.33.1,<2.35.0", "rq (>=2.6,<2.7)", "rules (==3.4)", "ujson (>=5.12.1)", "ijson (>=3.4.0,<4.0.0)", "xmljson (==0.2.1)", "colorama (>=0.4.4)", "pyboxen (>=1.3.0)", "redis (>=5.2.1,<5.3.0)", "sentry-sdk (>=2.69.0)", "launchdarkly-server-sdk (==8.2.1)", "python-json-logger (==2.0.4)", "google-cloud-storage (>=3.8.0,<4.0.0)", "google-cloud-logging (>=3.10.0,<4.0.0)", "django-csp (==3.7)", "openai (>=1.10.0,<2.0.0)", "django-migration-linter (>=6.0.0,<7.0.0)", "setuptools>=83.0.0", "djangorestframework-simplejwt[crypto] (>=5.4.0,<6.0.0)", "tldextract (>=5.1.3)", "uuid-utils (>=0.11.0,<1.0.0)", "label-studio-sdk", ] [tool.uv.sources] label-studio-sdk = { git = "https://github.com/HumanSignal/label-studio-sdk.git", rev = "2d99ee92f4855c00d23397e089b429f88875a88f" } [project.optional-dependencies] uwsgi = [ "pyuwsgi (==2.0.30.post1)", "uwsgitop (==0.12)", ] [project.urls] Repository = "https://github.com/HumanSignal/label-studio" [project.scripts] label-studio = "label_studio.server:main" [dependency-groups] test = [ "pytest==9.0.3", "pytest-cov==7.1.0", "pytest-django==4.12.0", "pytest-mock==3.15.1", "tavern==3.3.3", "fakeredis~=2.26.1", "pytest-env==1.6.0", "responses==0.13.0", "pytest-xdist==3.8.0", "psutil==7.0.0", "freezegun~=1.5.1", "s3transfer>=0.16.0", "mock>=5.1.0", "moto>=4.2.6", "requests-mock==1.12.1", "factory-boy>=3.3.3,<4", ] build = [ "twine>=6.1.0", "packaging>=24.2", ] [build-system] requires = ["uv_build<0.14.0"] build-backend = "uv_build" [tool.uv] required-version = ">=0.13.5" exclude-newer = "4 days" exclude-newer-package = { certifi = false } [tool.uv.build-backend] module-name = "label_studio" module-root = "" [tool.ruff] # Assume Python 3.11 at a minimum target-version = "py311" line-length = 119 # Exclude a variety of commonly ignored directories. exclude = [ ".bzr", ".direnv", ".eggs", ".git", ".github", ".git-rewrite", ".hg", ".mypy_cache", ".nox", ".pants.d", ".pytype", ".ruff_cache", ".svn", ".tox", ".venv", "__pypackages__", "__pycache__", "_build", "buck-out", "build", "dist", "node_modules", "venv", "**/migrations/*.py", "scripts", "*.md", ] [tool.ruff.lint] # Enable the pycodestyle (`E`) and Pyflakes (`F`) rules by default. # Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or # McCabe complexity (`C901`) by default. select = [ # Pyflakes "F", # Pycodestyle "E", # isort "I001" ] ignore = [ "E501", "E402", # ignores: Module level import not at top of file. (isort takes care of this and if not, there is usually a good reason) ] # Allow autofix for all enabled rules (when `--fix`) is provided. fixable = ["ALL"] unfixable = [] # Allow unused variables when underscore-prefixed. dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" [tool.ruff.lint.per-file-ignores] # Ignore deleting imports in __init__.py files as they're actually being used. "__init__.py" = ["F401"] "**/settings/label_studio.py" = ["F405"] "test*.py" = ["F811"] [tool.ruff.format] quote-style = "single" [tool.pytest.ini_options] DJANGO_SETTINGS_MODULE = "core.settings.label_studio" python_files = ["tests.py", "test_*.py", "*_tests.py"] addopts = "-p no:warnings" tavern-global-cfg = ["label_studio/tests/shared_stages.yml"] env = [ "D:SENTRY_RATE=0", "D:SENTRY_DSN=", "D:USE_ENFORCE_CSRF_CHECKS=0", "D:TEST_ENVIRONMENT=1", "COLLECT_ANALYTICS=0", ]