[tool.poetry]
authors = ["Sylvain Lesage <sylvain.lesage@huggingface.co>"]
description = "REST API app"
name = "api"
version = "0.1.3"
license = "Apache-2.0"

[tool.poetry.dependencies]
environs = "^9.5.0"
jsonschema = "^4.17.0"
libapi = {path = "../../libs/libapi", develop = true}
pyarrow = "^11.0.0"
python = "3.9.15"
soundfile = ">=0.12.1"
uvicorn = "^0.20.0"
watchdog = { extras = ["watchmedo"], version = "^2.2.1" }

[tool.poetry.group.dev.dependencies]
bandit = "^1.7.4"
black = "^22.12.0"
flake8 = "^3.9.2"
httpx = "^0.23.3"
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-jsonschema = "^4.17.0.4"
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 = ["api"]

[tool.isort]
profile = "black"

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

[tool.mypy]
strict = true
disallow_untyped_calls = false
# ^ call to expected_algorithm.from_jwk forces to set this to false

[[tool.mypy.overrides]]
module = [
    "datasets.*",
    "huggingface_hub.*",
    "prometheus_client.*",
    "pyarrow.*",
    "tqdm.*",
    "fsspec.*"
]
# ^ prometheus_client is now typed, but starlette-prometheus requires an old version
ignore_missing_imports = true
