[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"]
build-backend = "setuptools.build_meta"

[project]
name = "gaitsetpy"
version = "0.2.2"
description = "A Python package for gait analysis using sensor data."
readme = "README.md"
requires-python = ">=3.8"
license = {text = "GPL-3.0"}
authors = [
    {name = "Alohomora Labs", email = "aharshit123456@gmail.com"}
]
keywords = ["gait", "analysis", "sensors", "machine-learning", "health"]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Science/Research",
    "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Topic :: Scientific/Engineering",
]

dependencies = [
    "numpy",
    "pandas",
    "scipy",
    "requests",
    "statsmodels",
    "matplotlib",
    "scikit-learn",
    "joblib",
    "tqdm",
]

[project.optional-dependencies]
deep-learning = ["torch>=1.9.0"]
all = ["torch>=1.9.0"]
dev = [
    "pytest>=7.0",
    "pytest-cov>=4.0",
    "black>=24.0",
    "isort>=5.0",
    "flake8>=6.0",
    "mypy>=1.0",
    "pre-commit>=3.0",
    "bandit>=1.7",
]

[project.urls]
Homepage = "https://github.com/Alohomora-Labs/gaitSetPy"
Documentation = "https://alohomora-labs.github.io/gaitSetPy/gaitsetpy.html"
Repository = "https://github.com/Alohomora-Labs/gaitSetPy"
Issues = "https://github.com/Alohomora-Labs/gaitSetPy/issues"

# Black configuration
[tool.black]
line-length = 100
target-version = ['py38', 'py39', 'py310', 'py311']
include = '\.pyi?$'
extend-exclude = '''
/(
  # directories
  \.eggs
  | \.git
  | \.hg
  | \.mypy_cache
  | \.tox
  | \.venv
  | build
  | dist
  | htmlcov
)/
'''

# isort configuration
[tool.isort]
profile = "black"
line_length = 100
skip_gitignore = true
known_first_party = ["gaitsetpy"]
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]

# pytest configuration
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
    "--verbose",
    "--strict-markers",
    "--tb=short",
    "--cov=gaitsetpy",
    "--cov-report=html",
    "--cov-report=term",
    "--cov-report=xml",
]
markers = [
    "unit: Unit tests for individual components",
    "integration: Integration tests for multiple components",
    "slow: Slow-running tests (deselect with '-m \"not slow\"')",
    "requires_data: Tests requiring actual dataset files",
    "requires_gpu: Tests requiring GPU for execution",
    "visualization: Tests that create visualizations",
]
filterwarnings = [
    "ignore::DeprecationWarning",
    "ignore::PendingDeprecationWarning",
    "ignore::FutureWarning",
]

# Coverage configuration
[tool.coverage.run]
source = ["gaitsetpy"]
omit = [
    "*/tests/*",
    "*/test_*.py",
    "*/__pycache__/*",
    "*/site-packages/*",
]

[tool.coverage.report]
exclude_lines = [
    "pragma: no cover",
    "def __repr__",
    "raise AssertionError",
    "raise NotImplementedError",
    "if __name__ == .__main__.:",
    "if TYPE_CHECKING:",
    "class .*\\bProtocol\\):",
    "@(abc\\.)?abstractmethod",
]

# Bandit configuration
[tool.bandit]
exclude_dirs = ["tests", "docs", ".venv", "venv"]
tests = ["B201", "B301"]
skips = ["B101", "B601"]

# Mypy configuration
[tool.mypy]
python_version = "3.8"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false
ignore_missing_imports = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
check_untyped_defs = true

[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
