[tool.poetry]
authors = ["Sylvain Lesage <sylvain.lesage@huggingface.co>"]
description = "Library for utils common to all the services"
name = "libcommon"
version = "0.6.8"
license = "Apache-2.0"

[tool.poetry.dependencies]
appdirs = "^1.4.4"
datasets = {version = "^2.13.1", extras = ["audio", "vision"]}
environs = "^9.5.0"
huggingface-hub = "^0.15.1"
mongo-types = "0.15.1"
mongoengine = "^0.24.2"
networkx = "^3.0"
numba = "0.56.4"
orjson = "^3.8.6"
pandas = "^2.0.1"
psutil = "^5.9.4"
pydub = "^0.25.1"
pymongo = { extras = ["srv"], version = "^3.13.0" }
python = "3.9.15"
pytz = "^2020.1"
requests = "^2.31.0"
soundfile = ">=0.12.1"
starlette-prometheus = "^0.9.0"
tqdm = "^4.65.0"

[tool.poetry.group.dev.dependencies]
bandit = "^1.7.4"
black = "^22.12.0"
flake8 = "^3.9.2"
isort = "^5.12.0"
mypy = "^1.0.0"
pandas-stubs = "^1.5.3"
pip-audit = "^2.5.4"
pytest = "^7.2.1"
pytest-cov = "^2.12.1"
types-psutil = "^5.9.5"
types-pytz = "^2022.1.1"
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 = [
    "real_dataset: tests on the Hub",
    "wip: tests being developed"
]
[tool.coverage.run]
source = ["libcommon"]

[tool.isort]
profile = "black"

[tool.black]
line-length = 119
preview = true

[tool.mypy]
strict = true

[[tool.mypy.overrides]]
module = [
    "datasets.*",
    "networkx.*",
    "huggingface_hub.*",
    "prometheus_client.*",
    "pyarrow.*",
    "tqdm.*",
    "fsspec.*",
]
# ^ huggingface_hub is not typed since version 0.13.0
ignore_missing_imports = true
