[project]
name = "Whombat"
version = "0.6.4"
description = "Audio Annotation Tool"
authors = [{ name = "Santiago Martinez", email = "santiago.mbal@gmail.com" }]
dependencies = [
  "uvicorn[standard]>=0.30.6",
  "aiosqlite>=0.20.0",
  "passlib>=1.7.4",
  "soundevent[all]>=2.0.1",
  "fastapi[standard]>=0.112.2",
  "pydantic-settings>=2.4.0",
  "fastapi-users[sqlalchemy]>=12.1.3",
  "cachetools>=5.5.0",
  "asyncache>=0.3.1",
  "fastapi-pagination>=0.12.26",
  "alembic>=1.13.2",
  "bcrypt==4.0.1",
  "colorama>=0.4.6",
]
requires-python = ">=3.11"
readme = "README.md"
keywords = ["audio", "annotation", "tool", "bioacoustics", "machine learning"]
license = { file = "LICENSE" }

[project.urls]
Homepage = "https://github.com/mbsantiago/whombat"
Documentation = "https://mbsantiago.github.io/whombat/"
"Isue Tracker" = "https://github.com/mbsantiago/whombat/issues"
Releases = "https://github.com/mbsantiago/whombat/releases"

[project.scripts]
whombat = "whombat.__main__:main"

[project.optional-dependencies]
postgre = ["asyncpg>=0.29.0", "psycopg2-binary>=2.9.9"]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.sdist]
ignore-vcs = true
include = [
  "src/whombat/*.py",
  "src/whombat/migrations/",
  "src/whombat/statics/",
  "src/whombat/user_guide/",
]

[tool.hatch.build.targets.wheel]
artifacts = [
  "src/whombat/migrations/",
  "src/whombat/statics/",
  "src/whombat/user_guide/",
]

[tool.uv]
dev-dependencies = [
  "pytest>=8.3.2",
  "coverage>=7.6.1",
  "pytest-asyncio>=0.24.0",
  "httpx>=0.27.2",
  "tox>=4.18.0",
  "pyright>=1.1.379",
  "ruff>=0.6.3",
  "icecream>=2.1.3",
  "pytest-xdist>=3.6.1",
  "mkdocs>=1.6.1",
  "mkdocs-material>=9.5.34",
  "mkdocstrings[python]>=0.26.0",
  "pytest-cov>=5.0.0",
  "black>=24.8.0",
]

[tool.pyright]
venvPath = "."
venv = ".venv"
include = ["src"]

[tool.pydocstyle]
convention = "numpy"

[tool.ruff]
line-length = 79
target-version = "py312"

[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 60

[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "B", "Q", "I", "D"]
ignore = ["D1"]

[tool.ruff.lint.pydocstyle]
convention = "numpy"

[tool.ruff.lint.isort]
known-local-folder = ["src", "whombat"]

[tool.pytest.ini_options]
asyncio_mode = "auto"
log_level = "INFO"
addopts = "--durations=5 --disable-warnings --color=auto --code-highlight=yes"
asyncio_default_fixture_loop_scope = "session"
