pyproject.toml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. [project]
  2. name = "label-studio"
  3. version = "1.23.0.dev0"
  4. description = "Label Studio annotation tool"
  5. authors = [
  6. { name = "HumanSignal", email = "support@humansignal.com" },
  7. ]
  8. readme = "README.md"
  9. license = "Apache-2.0"
  10. classifiers = [
  11. "License :: OSI Approved :: Apache Software License",
  12. "Operating System :: OS Independent",
  13. "Programming Language :: Python :: 3",
  14. ]
  15. requires-python = ">=3.10,<4"
  16. dependencies = [
  17. "wheel (>=0.38.1,<=0.40.0)",
  18. "appdirs (>=1.4.3)",
  19. "attr (==0.3.1)",
  20. "attrs (>=19.2.0)",
  21. "pyyaml (>=6.0.0)",
  22. "azure-storage-blob (>=12.6.0)",
  23. "boto3 (>=1.28.58,<2.0.0)",
  24. "botocore (>=1.39.3,<2.0.0)",
  25. "bleach (>=5.0.0,<5.1.0)",
  26. "cryptography (>=44.0.1)",
  27. "Django (>=5.1.8,<5.2.0)",
  28. "django-storages (==1.12.3)",
  29. "django-annoying (==0.10.6)",
  30. "django-debug-toolbar (==3.2.1)",
  31. "django-environ (==0.10.0)",
  32. "django-filter (==24.3)",
  33. "django-model-utils (==4.1.1)",
  34. "django-rq (>=3.1,<3.2)",
  35. "django-cors-headers (==4.7.0)",
  36. "django-extensions (==3.2.3)",
  37. "django-user-agents (==0.4.0)",
  38. "django-ranged-fileresponse (>=0.1.2)",
  39. "drf-dynamic-fields (==0.3.0)",
  40. "djangorestframework (==3.15.2)",
  41. "drf-flex-fields (==0.9.5)",
  42. "drf-spectacular (==0.28.0)",
  43. "drf-generators (==0.3.0)",
  44. "lockfile (>=0.12.0)",
  45. "lxml[html-clean] (>=4.9.4)",
  46. "defusedxml (>=0.7.1)",
  47. "numpy (>=2.2.6,<3.0.0)",
  48. "ordered-set (==4.0.2)",
  49. "pandas (>=2.2.3)",
  50. "psycopg[binary] (>=3.2.0,<4.0.0)",
  51. "pyarrow (>=22.0.0,<23.0.0)",
  52. "pydantic (>=2.9.2)",
  53. "python-dateutil (>=2.8.1)",
  54. "pytz (>=2022.1,<2023.0)",
  55. "requests (>=2.32.3,<2.33.0)",
  56. "rq (>=2.6,<2.7)",
  57. "rules (==3.4)",
  58. "ujson (>=3.0.0)",
  59. "ijson (>=3.4.0,<4.0.0)",
  60. "xmljson (==0.2.1)",
  61. "colorama (>=0.4.4)",
  62. "pyboxen (>=1.3.0)",
  63. "redis (>=5.2.1,<5.3.0)",
  64. "sentry-sdk (>=2.16.0)",
  65. "launchdarkly-server-sdk (==8.2.1)",
  66. "python-json-logger (==2.0.4)",
  67. "google-cloud-storage (>=2.13.0,<3.0.0)",
  68. "google-cloud-logging (>=3.10.0,<4.0.0)",
  69. "django-csp (==3.7)",
  70. "openai (>=1.10.0,<2.0.0)",
  71. "django-migration-linter (>=5.1.0,<6.0.0)",
  72. "setuptools (>=75.4.0)",
  73. "djangorestframework-simplejwt[crypto] (>=5.4.0,<6.0.0)",
  74. "tldextract (>=5.1.3)",
  75. "uuid-utils (>=0.11.0,<1.0.0)",
  76. ## HumanSignal repo dependencies :start
  77. "label-studio-sdk @ https://github.com/HumanSignal/label-studio-sdk/archive/b2c86a0694ec387c3b0ce64298d3a793363a805a.zip",
  78. ## HumanSignal repo dependencies :end
  79. ]
  80. [project.urls]
  81. Repository = "https://github.com/HumanSignal/label-studio"
  82. [project.scripts]
  83. label-studio = "label_studio.server:main"
  84. [project.optional-dependencies]
  85. uwsgi = ['pyuwsgi (==2.0.28.post1)', 'uwsgitop (==0.12)']
  86. [tool.ruff]
  87. # Assume Python 3.10 at a minimum
  88. target-version = "py310"
  89. # Same as Blue.
  90. line-length = 119
  91. [tool.ruff.lint]
  92. # Enable the pycodestyle (`E`) and Pyflakes (`F`) rules by default.
  93. # Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
  94. # McCabe complexity (`C901`) by default.
  95. select = [
  96. # Pyflakes
  97. "F",
  98. # Pycodestyle
  99. "E",
  100. # isort
  101. "I001"
  102. ]
  103. ignore = [
  104. "E501",
  105. "E402", # ignores: Module level import not at top of file. (isort takes care of this and if not, there is usually a good reason)
  106. ]
  107. # Allow autofix for all enabled rules (when `--fix`) is provided.
  108. fixable = ["ALL"]
  109. unfixable = []
  110. # Exclude a variety of commonly ignored directories.
  111. exclude = [
  112. ".bzr",
  113. ".direnv",
  114. ".eggs",
  115. ".git",
  116. ".git-rewrite",
  117. ".hg",
  118. ".mypy_cache",
  119. ".nox",
  120. ".pants.d",
  121. ".pytype",
  122. ".ruff_cache",
  123. ".svn",
  124. ".tox",
  125. ".venv",
  126. "__pypackages__",
  127. "_build",
  128. "buck-out",
  129. "build",
  130. "dist",
  131. "node_modules",
  132. "venv",
  133. "**/migrations/*.py",
  134. ]
  135. # Allow unused variables when underscore-prefixed.
  136. dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
  137. [tool.ruff.lint.per-file-ignores]
  138. # Ignore deleting imports in __init__.py files as they're actually being used.
  139. "__init__.py" = ["F401"]
  140. "**/settings/label_studio.py" = ["F405"]
  141. "test*.py" = ["F811"]
  142. [tool.blue]
  143. line-length = 119
  144. include = 'label_studio/.*\.py$'
  145. # Exclude a variety of commonly ignored directories, as well as all migrations files.
  146. force-exclude = '''
  147. /(
  148. \.bzr
  149. | \.direnv
  150. | \.eggs
  151. | \.git
  152. | \.github
  153. | \.git-rewrite
  154. | \.hg
  155. | \.mypy_cache
  156. | \.nox
  157. | \.pants.d
  158. | \.pytype
  159. | \.ruff_cache
  160. | \.svn
  161. | \.tox
  162. | \.venv
  163. | \.hg
  164. | _build
  165. | buck-out
  166. | build
  167. | dist
  168. | node_modules
  169. | migrations
  170. | venv
  171. | __pycache__
  172. )/
  173. '''
  174. target-version = ['py310']
  175. [tool.poetry]
  176. packages = [
  177. { include = "label_studio" },
  178. ]
  179. include = [
  180. { path = "web/dist/libs/datamanager/**/*", format = ["sdist", "wheel"] },
  181. { path = "web/dist/libs/editor/**/*", format = ["sdist", "wheel"] },
  182. { path = "web/dist/apps/labelstudio/**/*", format = ["sdist", "wheel"] },
  183. { path = "label_studio/annotation_templates/**/*", format = ["sdist", "wheel"] },
  184. { path = "label_studio/core/static/**/*", format = ["sdist", "wheel"] },
  185. { path = "label_studio/core/static_build/**/*", format = ["sdist", "wheel"] },
  186. { path = "label_studio/core/utils/schema/*.json", format = ["sdist", "wheel"] },
  187. { path = "label_studio/core/templatetags/*.py", format = ["sdist", "wheel"] },
  188. { path = "label_studio/core/version_.py", format = ["sdist", "wheel"] },
  189. { path = "label_studio/core/all_urls.json", format = ["sdist", "wheel"] },
  190. { path = "label_studio/io_storages/**/*.yml", format = ["sdist", "wheel"] },
  191. ]
  192. exclude = [
  193. { path = "label_studio/frontend", format = ["sdist", "wheel"] },
  194. ]
  195. requires-poetry = '>=2.0.0,<3.0.0'
  196. [tool.poetry.dependencies]
  197. python = ">=3.10,<4"
  198. [tool.poetry.group.test.dependencies]
  199. pytest = "7.2.2"
  200. pytest-cov = "5.0.0"
  201. pytest-django = "4.9.0"
  202. pytest-mock = "3.14.0"
  203. tavern = "2.3.0"
  204. fakeredis = "~=2.26.1"
  205. pytest-env = "0.6.2"
  206. responses = "0.13.0"
  207. pytest-xdist = "3.6.1"
  208. psutil = "7.0.0"
  209. freezegun = "~=1.5.1"
  210. pre-commit = "3.3.3"
  211. s3transfer = "0.13.0"
  212. mock = ">=5.1.0"
  213. moto = ">=4.2.6"
  214. requests-mock = "1.12.1"
  215. factory-boy = "^3.3.3"
  216. [tool.poetry.group.build.dependencies]
  217. twine = ">=6.1.0"
  218. packaging = ">=24.2"
  219. [build-system]
  220. requires = ['poetry-core (>=2.0.0,<3.0.0)']
  221. build-backend = "poetry.core.masonry.api"