services/worker/pyproject.toml (86 lines of code) (raw):

[tool.poetry] authors = ["Sylvain Lesage <sylvain.lesage@huggingface.co>"] description = "Worker that processes jobs and stores the responses in the cache" name = "worker" version = "1.0.0" license = "Apache-2.0" [tool.poetry.dependencies] python = "3.9.18" aiohttp = "^3.10.2" aiolimiter = "^1.0.0" environs = "^9.5.0" h5py = "^3.10.0" libcommon = {path = "../../libs/libcommon", develop = true} mirakuru = "^2.4.2" numpy = "^1.22.4" openpyxl = "^3.1.1" pillow = "^10.3.0" polars = ">=0.20.0" prometheus_client = "^0.12.0" py7zr = "^0.20.4" starlette = "^0.37.1" torch = [ { url = "https://download.pytorch.org/whl/cpu/torch-2.3.0%2Bcpu-cp39-cp39-linux_x86_64.whl", markers = "sys_platform == 'linux' and platform_machine != 'aarch64'"}, { url = "https://download.pytorch.org/whl/cpu/torch-2.3.0%2Bcpu-cp39-cp39-linux_x86_64.whl", markers = "sys_platform == 'darwin' and platform_machine != 'arm64'"}, { url = "https://download.pytorch.org/whl/cpu/torch-2.3.0-cp39-none-macosx_11_0_arm64.whl", markers = "sys_platform == 'darwin' and platform_machine == 'arm64'"}, { url = "https://download.pytorch.org/whl/cpu/torch-2.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", markers = "sys_platform == 'linux' and platform_machine == 'aarch64'"}, ] uvicorn = "^0.30.1" zstandard = "^0.22.0" # to include fix for https://github.com/microsoft/presidio/pull/1377 presidio-analyzer = { git = "https://github.com/microsoft/presidio.git", rev = "2348fff508f1a45af92945d5f597ec56bd4faae6", subdirectory = "presidio-analyzer" } [tool.poetry.group.dev.dependencies] bandit = "^1.7.4" moto = "^4.2.5" mypy = "^1.10.0" pandas-stubs = "^1.5.3" pip-audit = "^2.7.3" pytest = "^8.2.2" pytest-asyncio = "^0.23.7" pytest-memray = "^1.6.0" ruff = "^0" types-psutil = "^5.9.5" types-requests = "^2.28.11" [build-system] build-backend = "poetry.core.masonry.api" requires = ["poetry-core>=1.0.0"] [tool.pytest.ini_options] filterwarnings = ["ignore::DeprecationWarning"] markers = [ "integration: tests that require external services", "real_dataset: tests on the Hub" ] [tool.mypy] strict = true # allow calling untyped methods in huggingface_hub (eg: DatasetInfo(...)) untyped_calls_exclude = "huggingface_hub" [[tool.mypy.overrides]] module = [ "aiolimiter.*", "datasets.*", "pyarrow.*", "tqdm.*", "fsspec.*", "boto3.*", "moto.*", "prometheus_client.*" ] ignore_missing_imports = true # ^ prometheus_client is now typed, but we use an old version to stick with the other services [[tool.mypy.overrides]] module = [ "huggingface_hub.*", ] no_implicit_reexport = false [tool.ruff] line-length = 119 src = ["src"] target-version = "py39" [tool.ruff.lint] extend-select = [ "ARG", # flake8-unused-arguments "I", # isort # flake8-pep585: "UP006", # non-pep585-annotation "UP035", # deprecated-import ]