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

[project]
name = "sollol"
version = "0.9.66"
description = "Intelligent Load Balancer for Ollama Clusters - Adaptive Parallelism + VRAM-Aware GPU Routing + Ray/Dask/llama.cpp Distribution"
readme = "README.md"
requires-python = ">=3.8"
license = {text = "MIT"}
authors = [
    {name = "BenevolentJoker-JohnL", email = "benevolentjoker@gmail.com"}
]
keywords = ["ai", "llm", "distributed", "ollama", "load-balancing", "inference", "llama-cpp"]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "Intended Audience :: Science/Research",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
    "Topic :: System :: Distributed Computing",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
]
dependencies = [
    "requests>=2.31.0",
    "httpx>=0.24.0",
    "ipaddress>=1.0.23",
    "ollama>=0.1.0",
    "dask[distributed]>=2024.1.0",
    "ray[default]>=2.0.0",
    "prometheus-client>=0.12.0",
    "rich>=13.7.0",
    "typer>=0.19.0",
    "flask>=2.0.0",
    "flask-cors>=4.0.0",
    "flask-sock>=0.7.0",
    "gevent>=23.9.0",
    "gevent-websocket>=0.10.1",
    "fastapi>=0.104.0",
    "uvicorn>=0.24.0",
    "starlette>=0.27.0",
    "redis>=5.0.0",
    "bokeh>=3.1.0",
    "gpustat>=1.0.0",
]

[project.optional-dependencies]
dev = [
    "pytest>=7.0.0",
    "pytest-asyncio>=1.2.0",
    "pytest-cov>=4.0.0",
    "flake8>=6.0.0",
    "black>=23.0.0",
    "isort>=5.0.0",
    "mypy>=1.0.0",
]
metrics = [
    "influxdb-client>=1.36.0",
]

[project.urls]
Homepage = "https://github.com/BenevolentJoker-JohnL/SOLLOL"
Documentation = "https://github.com/BenevolentJoker-JohnL/SOLLOL/blob/main/README.md"
Repository = "https://github.com/BenevolentJoker-JohnL/SOLLOL"
"Bug Tracker" = "https://github.com/BenevolentJoker-JohnL/SOLLOL/issues"

[project.scripts]
sollol = "sollol.cli:main"

[tool.black]
line-length = 100
target-version = ['py38', 'py39', 'py310', 'py311']

[tool.isort]
profile = "black"
line_length = 100

[tool.ruff]
line-length = 100
target-version = "py38"

[tool.ruff.lint]
# Enable Pyflakes (F) and pycodestyle (E) codes by default
select = ["E", "F"]
# Ignore specific error codes
ignore = [
    "E402",  # Module import not at top of file (valid for conditional imports)
    "E501",  # Line too long (handled by black)
    "E722",  # Bare except (intentional in error handlers)
    "F401",  # Unused import (common in __init__.py)
    "F541",  # f-string without placeholders
    "F811",  # Redefinition of unused import (intentional conditional imports)
    "F841",  # Local variable assigned but never used
]

[tool.ruff.lint.pylint]
# Ignore Pylint warnings for global statements
max-args = 10

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
norecursedirs = ["SynapticLlamas", "venv", "build", "dist", ".git"]
asyncio_mode = "auto"

[tool.mypy]
python_version = "3.8"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false
ignore_missing_imports = true
