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

[tool.hatch.build.targets.sdist]
exclude = [
  "/.github",
  "/site",
  "/docs",
  "/sandbox.ipynb"
]

[project]
name = "tonik"
version = "0.1.23"
authors = [
  { name="Yannik Behr", email="y.behr@gns.cri.nz" },
  { name="Christof Mueller", email="c.mueller@gns.cri.nz" }
]

description = "Store time series data as HDF5 files and access them through an API."
readme = "README.md"
requires-python = ">=3.11"
classifiers = [
    "Programming Language :: Python :: 3",
    "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
    "Operating System :: OS Independent",
]

dependencies = [
  "xarray[io,accel,parallel]>=2025.6.1,<2026",
  "datashader>=0.18.2,<0.19",
  "h5py>=3.15.1,<4",
  "pandas>=2.3.3,<3",
  "h5netcdf>=1.7.3,<2",
  "uvicorn[standard]>=0.40.0,<0.41",
  "fastapi>=0.128.0,<0.129",
  "matplotlib>=3.10.8,<4",
  "zarr>=3.1.5,<4",
  "s3fs>=2025.12.0,<2026",
  "torch>=2.10.0,<3"
]

[project.optional-dependencies]
dev = ["pytest",
       "httpx>=0.28.1,<0.29",
       "ipykernel>=6.31.0,<7",
       "build>=1.4.0,<2",
       "twine>=6.2.0,<7",
       "mkdocs>=1.6.1,<2",
       "mkdocstrings[python]>=1.0.0,<2",
       "mkdocs-jupyter>=0.25.1,<0.26",
       "zarr[remote-tests]>=3.1.5,<4",
       "moto[s3]>=5.1.19,<6",
       "hatch>=1.16.2,<2"
]

[project.urls]
Homepage = "https://tsc-tools.github.io/tonik"
Issues = "https://github.com/tsc-tools/tonik/issues"

[project.scripts]
tonik_api = "tonik.api:main"
test_data = "tonik.utils:main"
grafana_annotations = "tonik.grafana_annotations:main"

[tool.pytest.ini_options]
log_cli = true
addopts = "-s"

[tool.hatch.envs.test]
dependencies = [
  "coverage[toml]",
  "pytest",
  "httpx"
]

[[tool.hatch.envs.test.matrix]]
python = ["3.11", "3.12", "3.13"]

[tool.hatch.envs.test.scripts]
run-pytest = "pytest tests"
