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

[project]
name = "foodspec"
version = "1.0.0"
description = "Gold-standard Raman and FTIR spectroscopy toolkit for food science."
readme = "README.md"
requires-python = ">=3.10"
license = { file = "LICENSE" }
authors = [
  { name = "foodspec authors" }
]
classifiers = [
  "Development Status :: 5 - Production/Stable",
  "Intended Audience :: Science/Research",
  "License :: OSI Approved :: MIT License",
  "Programming Language :: Python :: 3",
  "Programming Language :: Python :: 3 :: Only",
  "Programming Language :: Python :: 3.10",
  "Programming Language :: Python :: 3.11",
  "Programming Language :: Python :: 3.12",
  "Programming Language :: Python :: 3.13",
  "Topic :: Scientific/Engineering :: Information Analysis",
  "Topic :: Scientific/Engineering :: Chemistry",
  "Operating System :: OS Independent",
]
dependencies = [
  "numpy>=1.24",
  "pandas>=2.0",
  "scipy>=1.11",
  "scikit-learn>=1.3",
  "statsmodels>=0.14",
  "matplotlib>=3.8",
  "pyyaml>=6.0",
  "typer>=0.9.0",
  "h5py>=3.11.0",
  "xgboost>=1.7.0",
  "lightgbm>=4.0.0",
]

[project.optional-dependencies]
dev = [
  "ruff>=0.5.0",
  "pytest>=8.2.0",
  "pytest-cov>=5.0.0",
  "pytest-timeout>=2.1.0",
  "build>=1.0.0",
  "twine>=4.0.0",
  "mkdocs>=1.6.0,<2.0",
  "mkdocs-material>=9.5.0,<10.0",
  "mkdocstrings-python>=1.10.0,<2.0",
  "mkdocs-git-revision-date-localized-plugin>=1.2.0,<2.0",
]
docs = [
  "mkdocs>=1.6.0,<2.0",
  "mkdocs-material>=9.5.0,<10.0",
  "mkdocstrings-python>=1.10.0,<2.0",
  "mkdocs-git-revision-date-localized-plugin>=1.2.0,<2.0",
]
viz = [
  "matplotlib>=3.8",
]


[project.scripts]
foodspec = "foodspec.cli:app"
foodspec-run-protocol = "foodspec.cli.protocol:main"
foodspec-predict = "foodspec.cli.predict:main"
foodspec-registry = "foodspec.cli.registry:main"
foodspec-publish = "foodspec.cli.publish:main"
foodspec-plugin = "foodspec.cli.plugin:main"
foodspec-library-search = "foodspec.cli.library_search:main"

[project.urls]
Homepage = "https://github.com/chandrasekarnarayana/foodspec"
Documentation = "https://chandrasekarnarayana.github.io/foodspec/"
Source = "https://github.com/chandrasekarnarayana/foodspec"
Issues = "https://github.com/chandrasekarnarayana/foodspec/issues"
Discussions = "https://github.com/chandrasekarnarayana/foodspec/discussions"

[tool.hatch.build.targets.wheel]
packages = ["src/foodspec"]

[tool.ruff]
line-length = 120
target-version = "py310"
src = ["src"]
exclude = ["build", "dist", ".venv", "venv"]

[tool.ruff.lint]
select = ["E", "F", "I", "W"]
ignore = ["E501"]

[tool.ruff.format]
quote-style = "double"

[tool.pytest.ini_options]
minversion = "8.0"
# Coverage requirement: 75% minimum for production code quality
addopts = "--cov=foodspec --cov-report=term-missing --cov-fail-under=75"
testpaths = ["tests"]
python_files = "test_*.py"
python_classes = "Test*"
python_functions = "test_*"
# Disable namespace package discovery to avoid conflicts with stdlib modules (e.g., 'io', 'data')
pythonpath = ["src"]

[tool.coverage.run]
omit = [
  "src/foodspec/cli.py",
  "src/foodspec/preprocess/derivatives.py",
]
